gui: remove the status bar
PATCH 1/4 gui: remove the status bar
The status bar of system-config-selinux's main window is not used and takes some room. Remove it.
--- gui/system-config-selinux.ui | 19 ------------------- 1 file changed, 19 deletions(-)
gui/system-config-selinux.ui +0 -19
@@ -1862,25 +1862,6 @@ Level</property> <property name="position">1</property> </packing> </child> - <child> - <object class="GtkStatusbar"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">10</property> - <property name="margin_right">10</property> - <property name="margin_start">10</property> - <property name="margin_end">10</property> - <property name="margin_top">6</property> - <property name="margin_bottom">6</property> - <property name="orientation">vertical</property> - <property name="spacing">2</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> </object> </child> <child type="titlebar">
Signature · 1 line
2.14.2
PATCH 2/4 gui: fix parsing of "semodule -lfull" in tab Modules
The output of "semodule -lfull" changed from "module version" to "priority module kind". Update system-config-selinux to use this new format in its tab "Policy Module".
--- gui/modulesPage.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
gui/modulesPage.py +13 -6
@@ -58,7 +58,8 @@ class modulesPage(semanagePage): self.module_filter.connect("activate", self.filter_changed) self.audit_enabled = False - self.store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING) + self.store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING, + GObject.TYPE_STRING) self.view.set_model(self.store) self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) col = Gtk.TreeViewColumn(_("Module Name"), Gtk.CellRendererText(), text=0)
@@ -66,7 +67,7 @@ class modulesPage(semanagePage): col.set_resizable(True) self.view.append_column(col) self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) - col = Gtk.TreeViewColumn(_("Version"), Gtk.CellRendererText(), text=1) + col = Gtk.TreeViewColumn(_("Priority"), Gtk.CellRendererText(), text=1) self.enable_audit_button = xml.get_object("enableAuditButton") self.enable_audit_button.connect("clicked", self.enable_audit) self.new_button = xml.get_object("newModuleButton")
@@ -74,6 +75,11 @@ class modulesPage(semanagePage): col.set_sort_column_id(1) col.set_resizable(True) self.view.append_column(col) + self.store.set_sort_column_id(2, Gtk.SortType.ASCENDING) + col = Gtk.TreeViewColumn(_("Kind"), Gtk.CellRendererText(), text=2) + col.set_sort_column_id(2) + col.set_resizable(True) + self.view.append_column(col) self.store.set_sort_func(1, self.sort_int, "") status, self.policy_type = selinux.selinux_getpolicytype()
@@ -95,16 +101,17 @@ class modulesPage(semanagePage): self.filter = filter self.store.clear() try: - fd = Popen("semodule -l", shell=True, stdout=PIPE).stdout + fd = Popen("semodule -lfull", shell=True, stdout=PIPE).stdout l = fd.readlines() fd.close() for i in l: - module, ver, newline = i.split('\t') - if not (self.match(module, filter) or self.match(ver, filter)): + priority, module, kind = i.decode('utf-8').split() + if not (self.match(module, filter) or self.match(priority, filter)): continue iter = self.store.append() self.store.set_value(iter, 0, module.strip()) - self.store.set_value(iter, 1, ver.strip()) + self.store.set_value(iter, 1, priority.strip()) + self.store.set_value(iter, 2, kind.strip()) except: pass self.view.get_selection().select_path((0,))
Signature · 1 line
2.14.2
PATCH 3/4 gui: delete overridden definition of usersPage.delete()
In reply to Nicolas IoossFunction delete() is defined twice in class usersPage and the first one invoke semanagePage.delete(), which does not exist.
--- gui/usersPage.py | 4 ---- 1 file changed, 4 deletions(-)
gui/usersPage.py +0 -4
@@ -91,10 +91,6 @@ class usersPage(semanagePage): self.store.set_value(iter, 2, dict[k][3]) self.view.get_selection().select_path((0,)) - def delete(self): - if semanagePage.delete(self) == Gtk.ResponseType.NO: - return None - def dialogInit(self): store, iter = self.view.get_selection().get_selected() self.selinuxUserEntry.set_text(store.get_value(iter, 0))
Signature · 1 line
2.14.2
PATCH 4/4 gui: remove mappingsPage
In reply to Nicolas IoossThis page is not used anywhere and seems to be an incomplete version of loginsPage.
--- gui/Makefile | 1 - gui/mappingsPage.py | 60 ----------------------------------------------------- 2 files changed, 61 deletions(-) delete mode 100644 gui/mappingsPage.py
gui/Makefile +0 -1
@@ -11,7 +11,6 @@ domainsPage.py \ fcontextPage.py \ html_util.py \ loginsPage.py \ -mappingsPage.py \ modulesPage.py \ polgen.glade \ portsPage.py \
gui/mappingsPage.py deleted +0 -60
60 lines not on this page · raw message
Signature · 1 line
2.14.2
Quoted 4 lines · Nicolas Iooss
The status bar of system-config-selinux's main window is not used and takes some room. Remove it.
Signed-off-by Nicolas Iooss <[email protected]>
Merged this whole set. It all worked for me when i ran it in the tree, I also realized that i havent packaged the gui for gentoo. I'll do that soon.
-- Jason