Message-ID: <1506359265.5963.11.camel@tycho.nsa.gov> From: Stephen Smalley To: Nicolas Iooss , selinux@tycho.nsa.gov Date: Mon, 25 Sep 2017 13:07:45 -0400 In-Reply-To: <20170920065654.6143-1-nicolas.iooss@m4x.org> References: <20170920065654.6143-1-nicolas.iooss@m4x.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Subject: Re: [PATCH 1/1] gui: port to Python 3 by migrating to PyGI List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: On Wed, 2017-09-20 at 08:56 +0200, Nicolas Iooss wrote: > PyGTK has been deprecated in favor of PyGI+GTK and thus has never > been > ported to python3. Using pygi-convert.sh from > https://git.gnome.org/browse/pygobject/tree/pygi-convert.sh helps > migrating most of the API but gnome-python. > > The glade file has been converted to GtkBuilder using > >   gtk-builder-convert system-config-selinux.glade system-config- > selinux.ui > > and some fixes in order to provide an application window (object > GnomeApp disappeared, GtkVBox is deprecated, etc.). The associated > Python code also needed some modifications in order to migrate to > GtkBuilder. > > The result has been tested on Arch Linux with Python 3.6. There are > some > bugs in the GUI itself, for which patches will be sent afterwards. Thanks, applied. > > Signed-off-by: Nicolas Iooss > --- >  gui/Makefile                    |    2 +- >  gui/booleansPage.py             |   56 +- >  gui/domainsPage.py              |   25 +- >  gui/fcontextPage.py             |   33 +- >  gui/loginsPage.py               |   28 +- >  gui/modulesPage.py              |   41 +- >  gui/polgengui.py                |  118 +- >  gui/portsPage.py                |   41 +- >  gui/semanagePage.py             |   52 +- >  gui/statusPage.py               |   36 +- >  gui/system-config-selinux.glade | 3005 --------------------------- > ------------ >  gui/system-config-selinux.py    |   69 +- >  gui/system-config-selinux.ui    | 2043 ++++++++++++++++++++++++++ >  gui/usersPage.py                |   24 +- >  14 files changed, 2281 insertions(+), 3292 deletions(-) >  delete mode 100644 gui/system-config-selinux.glade >  create mode 100644 gui/system-config-selinux.ui > > diff --git a/gui/Makefile b/gui/Makefile > index 4fc2c1a133be..ac844b6b9198 100644 > --- a/gui/Makefile > +++ b/gui/Makefile > @@ -17,8 +17,8 @@ polgen.glade \ >  portsPage.py \ >  semanagePage.py \ >  statusPage.py \ > -system-config-selinux.glade \ >  system-config-selinux.png \ > +system-config-selinux.ui \ >  usersPage.py >   >  all: $(TARGETS) system-config-selinux.py polgengui.py > diff --git a/gui/booleansPage.py b/gui/booleansPage.py > index a5d04bf5b90c..7849bea26a06 100644 > --- a/gui/booleansPage.py > +++ b/gui/booleansPage.py > @@ -18,13 +18,8 @@ >  # You should have received a copy of the GNU General Public License >  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >  # > -import string > -import gtk > -import gtk.glade > -import os > -import gobject >  import sys > -import tempfile > +from gi.repository import Gdk, GObject, Gtk >  import seobject >  import semanagePage >   > @@ -61,8 +56,6 @@ except: >          import __builtin__ >          __builtin__.__dict__['_'] = unicode >   > -from glob import fnmatch > - >   >  class Modifier: >   > @@ -94,56 +87,53 @@ class booleansPage: >   >      def __init__(self, xml, doDebug=None): >          self.xml = xml > -        self.window = > self.xml.get_widget("mainWindow").get_root_window() > +        self.window = > self.xml.get_object("mainWindow").get_root_window() >          self.local = False >          self.types = [] >          self.selinuxsupport = True >          self.typechanged = False >          self.doDebug = doDebug > -        self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) > -        self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR) > +        self.busy_cursor = Gdk.Cursor.new(Gdk.CursorType.WATCH) > +        self.ready_cursor = Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR) >   >          # Bring in widgets from glade file. > -        self.typeHBox = xml.get_widget("typeHBox") > -        self.booleanSW = xml.get_widget("booleanSW") > -        self.booleansFilter = xml.get_widget("booleansFilter") > +        self.booleansFilter = xml.get_object("booleansFilter") >          self.booleansFilter.connect("focus_out_event", > self.filter_changed) >          self.booleansFilter.connect("activate", self.filter_changed) > +        self.booleansFilter.connect("changed", self.filter_changed) >   > -        self.booleansView = xml.get_widget("booleansView") > -        self.typeLabel = xml.get_widget("typeLabel") > -        self.modifySeparator = xml.get_widget("modifySeparator") > +        self.booleansView = xml.get_object("booleansView") >   > -        self.revertButton = xml.get_widget("booleanRevertButton") > +        self.revertButton = xml.get_object("booleanRevertButton") >          self.revertButton.set_sensitive(self.local) >          self.revertButton.connect("clicked", self.on_revert_clicked) > -        listStore = gtk.ListStore(gobject.TYPE_STRING) > -        cell = gtk.CellRendererText() > +        listStore = Gtk.ListStore(GObject.TYPE_STRING) > +        cell = Gtk.CellRendererText() >   > -        self.store = gtk.ListStore(gobject.TYPE_BOOLEAN, > gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) > -        self.store.set_sort_column_id(1, gtk.SORT_ASCENDING) > +        self.store = Gtk.ListStore(GObject.TYPE_BOOLEAN, > GObject.TYPE_STRING, GObject.TYPE_STRING, GObject.TYPE_STRING) > +        self.store.set_sort_column_id(1, Gtk.SortType.ASCENDING) >          self.booleansView.set_model(self.store) >   > -        checkbox = gtk.CellRendererToggle() > +        checkbox = Gtk.CellRendererToggle() >          checkbox.connect("toggled", self.boolean_toggled) > -        col = gtk.TreeViewColumn('Active', checkbox, active=ACTIVE) > +        col = Gtk.TreeViewColumn('Active', checkbox, active=ACTIVE) >          col.set_clickable(True) >          col.set_sort_column_id(ACTIVE) >          self.booleansView.append_column(col) >   > -        col = gtk.TreeViewColumn("Module", gtk.CellRendererText(), > text=MODULE) > +        col = Gtk.TreeViewColumn("Module", Gtk.CellRendererText(), > text=MODULE) >          col.set_sort_column_id(MODULE) >          col.set_resizable(True) >          self.booleansView.append_column(col) >   > -        col = gtk.TreeViewColumn("Description", > gtk.CellRendererText(), text=DESC) > -        col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) > +        col = Gtk.TreeViewColumn("Description", > Gtk.CellRendererText(), text=DESC) > +        col.set_sizing(Gtk.TreeViewColumnSizing.FIXED) >          col.set_fixed_width(400) >          col.set_sort_column_id(DESC) >          col.set_resizable(True) >          self.booleansView.append_column(col) >   > -        col = gtk.TreeViewColumn("Name", gtk.CellRendererText(), > text=BOOLEAN) > +        col = Gtk.TreeViewColumn("Name", Gtk.CellRendererText(), > text=BOOLEAN) >          col.set_sort_column_id(BOOLEAN) >          col.set_resizable(True) >          self.booleansView.set_search_equal_func(self.__search) > @@ -152,10 +142,10 @@ class booleansPage: >          self.load(self.filter) >   >      def error(self, message): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, > -                                gtk.BUTTONS_CLOSE, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.ERROR, > +                                Gtk.ButtonsType.CLOSE, >                                  message) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          dlg.run() >          dlg.destroy() > @@ -178,11 +168,11 @@ class booleansPage: >   >      def deleteDialog(self): >          store, iter = > self.booleansView.get_selection().get_selected() > -        if iter == None: > +        if iter is None: >              return >          boolean = store.get_value(iter, BOOLEAN) >          # change cursor > -        if boolean == None: > +        if boolean is None: >              return >          try: >              self.wait() > diff --git a/gui/domainsPage.py b/gui/domainsPage.py > index 66f882a4e1b6..bad5140d8c59 100644 > --- a/gui/domainsPage.py > +++ b/gui/domainsPage.py > @@ -16,19 +16,14 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade >  import os >  try: >      from subprocess import getstatusoutput >  except ImportError: >      from commands import getstatusoutput >   > -import gobject >  import sys > -import seobject > -import selinux > +from gi.repository import GObject, Gtk >  import sepolicy >  from semanagePage import * >   > @@ -58,26 +53,26 @@ class domainsPage(semanagePage): >   >      def __init__(self, xml): >          semanagePage.__init__(self, xml, "domains", _("Process > Domain")) > -        self.domain_filter = xml.get_widget("domainsFilterEntry") > +        self.domain_filter = xml.get_object("domainsFilterEntry") >          self.domain_filter.connect("focus_out_event", > self.filter_changed) >          self.domain_filter.connect("activate", self.filter_changed) >   > -        self.store = gtk.ListStore(gobject.TYPE_STRING, > gobject.TYPE_STRING) > +        self.store = Gtk.ListStore(GObject.TYPE_STRING, > GObject.TYPE_STRING) >          self.view.set_model(self.store) > -        self.store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Domain Name"), > gtk.CellRendererText(), text=0) > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Domain Name"), > Gtk.CellRendererText(), text=0) >          col.set_sort_column_id(0) >          col.set_resizable(True) >          self.view.append_column(col) > -        self.store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Mode"), gtk.CellRendererText(), > text=1) > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Mode"), Gtk.CellRendererText(), > text=1) >          col.set_sort_column_id(1) >          col.set_resizable(True) >          self.view.append_column(col) >          self.view.get_selection().connect("changed", > self.itemSelected) >   > -        self.permissive_button = xml.get_widget("permissiveButton") > -        self.enforcing_button = xml.get_widget("enforcingButton") > +        self.permissive_button = xml.get_object("permissiveButton") > +        self.enforcing_button = xml.get_object("enforcingButton") >   >          self.domains = sepolicy.get_all_entrypoint_domains() >          self.load() > @@ -112,7 +107,7 @@ class domainsPage(semanagePage): >   >      def itemSelected(self, selection): >          store, iter = selection.get_selected() > -        if iter == None: > +        if iter is None: >              return >          p = store.get_value(iter, 1) == _("Permissive") >          self.permissive_button.set_sensitive(not p) > diff --git a/gui/fcontextPage.py b/gui/fcontextPage.py > index 2e26666e9049..a6577ef75faf 100644 > --- a/gui/fcontextPage.py > +++ b/gui/fcontextPage.py > @@ -16,10 +16,7 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import gtk > -import gtk.glade > -import os > -import gobject > +from gi.repository import GObject, Gtk >  import seobject >  try: >      from subprocess import getstatusoutput > @@ -73,40 +70,40 @@ class fcontextPage(semanagePage): >   >      def __init__(self, xml): >          semanagePage.__init__(self, xml, "fcontext", _("File > Labeling")) > -        self.fcontextFilter = xml.get_widget("fcontextFilterEntry") > +        self.fcontextFilter = xml.get_object("fcontextFilterEntry") >          self.fcontextFilter.connect("focus_out_event", > self.filter_changed) >          self.fcontextFilter.connect("activate", self.filter_changed) >   > -        self.store = gtk.ListStore(gobject.TYPE_STRING, > gobject.TYPE_STRING, gobject.TYPE_STRING) > -        self.view = xml.get_widget("fcontextView") > +        self.store = Gtk.ListStore(GObject.TYPE_STRING, > GObject.TYPE_STRING, GObject.TYPE_STRING) > +        self.view = xml.get_object("fcontextView") >          self.view.set_model(self.store) >          self.view.set_search_equal_func(self.search) >   > -        col = gtk.TreeViewColumn(_("File\nSpecification"), > gtk.CellRendererText(), text=SPEC_COL) > -        col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) > +        col = Gtk.TreeViewColumn(_("File\nSpecification"), > Gtk.CellRendererText(), text=SPEC_COL) > +        col.set_sizing(Gtk.TreeViewColumnSizing.FIXED) >          col.set_fixed_width(250) >   >          col.set_sort_column_id(SPEC_COL) >          col.set_resizable(True) >          self.view.append_column(col) > -        col = gtk.TreeViewColumn(_("Selinux\nFile Type"), > gtk.CellRendererText(), text=TYPE_COL) > +        col = Gtk.TreeViewColumn(_("Selinux\nFile Type"), > Gtk.CellRendererText(), text=TYPE_COL) >   > -        col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) > +        col.set_sizing(Gtk.TreeViewColumnSizing.FIXED) >          col.set_fixed_width(250) >          col.set_sort_column_id(TYPE_COL) >          col.set_resizable(True) >          self.view.append_column(col) > -        col = gtk.TreeViewColumn(_("File\nType"), > gtk.CellRendererText(), text=2) > +        col = Gtk.TreeViewColumn(_("File\nType"), > Gtk.CellRendererText(), text=2) >          col.set_sort_column_id(FTYPE_COL) >          col.set_resizable(True) >          self.view.append_column(col) >   > -        self.store.set_sort_column_id(SPEC_COL, gtk.SORT_ASCENDING) > +        self.store.set_sort_column_id(SPEC_COL, > Gtk.SortType.ASCENDING) >          self.load() > -        self.fcontextEntry = xml.get_widget("fcontextEntry") > -        self.fcontextFileTypeCombo = > xml.get_widget("fcontextFileTypeCombo") > -        self.fcontextTypeEntry = xml.get_widget("fcontextTypeEntry") > -        self.fcontextMLSEntry = xml.get_widget("fcontextMLSEntry") > +        self.fcontextEntry = xml.get_object("fcontextEntry") > +        self.fcontextFileTypeCombo = > xml.get_object("fcontextFileTypeCombo") > +        self.fcontextTypeEntry = xml.get_object("fcontextTypeEntry") > +        self.fcontextMLSEntry = xml.get_object("fcontextMLSEntry") >   >      def match(self, fcon_dict, k, filter): >          try: > @@ -192,7 +189,7 @@ class fcontextPage(semanagePage): >          mls = self.fcontextMLSEntry.get_text().strip() >          list_model = self.fcontextFileTypeCombo.get_model() >          it = self.fcontextFileTypeCombo.get_active_iter() > -        ftype = list_model.get_value(it,0) > +        ftype = list_model.get_value(it, 0) >          self.wait() >          (rc, out) = getstatusoutput("semanage fcontext -a -t %s -r > %s -f '%s' '%s'" % (type, mls, > seobject.file_type_str_to_option[ftype], fspec)) >          self.ready() > diff --git a/gui/loginsPage.py b/gui/loginsPage.py > index 1f35a57bc73a..b67eb8bc42af 100644 > --- a/gui/loginsPage.py > +++ b/gui/loginsPage.py > @@ -16,17 +16,13 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade > -import os > -import gobject >  import sys >  try: >      from subprocess import getstatusoutput >  except ImportError: >      from commands import getstatusoutput >   > +from gi.repository import GObject, Gtk >  import seobject >  from semanagePage import * >   > @@ -57,23 +53,23 @@ class loginsPage(semanagePage): >      def __init__(self, xml): >          self.firstTime = False >          semanagePage.__init__(self, xml, "logins", _("User > Mapping")) > -        self.store = gtk.ListStore(gobject.TYPE_STRING, > 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.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Login\nName"), > gtk.CellRendererText(), text=0) > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Login\nName"), > Gtk.CellRendererText(), text=0) >          col.set_sort_column_id(0) >          col.set_resizable(True) >          self.view.append_column(col) > -        col = gtk.TreeViewColumn(_("SELinux\nUser"), > gtk.CellRendererText(), text=1) > +        col = Gtk.TreeViewColumn(_("SELinux\nUser"), > Gtk.CellRendererText(), text=1) >          col.set_resizable(True) >          self.view.append_column(col) > -        col = gtk.TreeViewColumn(_("MLS/\nMCS Range"), > gtk.CellRendererText(), text=2) > +        col = Gtk.TreeViewColumn(_("MLS/\nMCS Range"), > Gtk.CellRendererText(), text=2) >          col.set_resizable(True) >          self.view.append_column(col) >          self.load() > -        self.loginsNameEntry = xml.get_widget("loginsNameEntry") > -        self.loginsSelinuxUserCombo = > xml.get_widget("loginsSelinuxUserCombo") > -        self.loginsMLSEntry = xml.get_widget("loginsMLSEntry") > +        self.loginsNameEntry = xml.get_object("loginsNameEntry") > +        self.loginsSelinuxUserCombo = > xml.get_object("loginsSelinuxUserCombo") > +        self.loginsMLSEntry = xml.get_object("loginsMLSEntry") >   >      def load(self, filter=""): >          self.filter = filter > @@ -91,12 +87,12 @@ class loginsPage(semanagePage): >          self.view.get_selection().select_path((0,)) >   >      def __dialogSetup(self): > -        if self.firstTime == True: > +        if self.firstTime: >              return >          self.firstTime = True > -        liststore = gtk.ListStore(gobject.TYPE_STRING) > +        liststore = Gtk.ListStore(GObject.TYPE_STRING) >          self.loginsSelinuxUserCombo.set_model(liststore) > -        cell = gtk.CellRendererText() > +        cell = Gtk.CellRendererText() >          self.loginsSelinuxUserCombo.pack_start(cell, True) >          self.loginsSelinuxUserCombo.add_attribute(cell, 'text', 0) >   > diff --git a/gui/modulesPage.py b/gui/modulesPage.py > index 37678966866f..c7fde9ea1ef8 100644 > --- a/gui/modulesPage.py > +++ b/gui/modulesPage.py > @@ -16,21 +16,16 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade > -import os > +import sys > +from subprocess import Popen, PIPE >  try: >      from subprocess import getstatusoutput >  except ImportError: >      from commands import getstatusoutput >   > -import gobject > -import sys > -import seobject > +from gi.repository import GObject, Gtk >  import selinux >  from semanagePage import * > -from subprocess import Popen, PIPE >   >  ## >  ## I18N > @@ -58,23 +53,23 @@ class modulesPage(semanagePage): >   >      def __init__(self, xml): >          semanagePage.__init__(self, xml, "modules", _("Policy > Module")) > -        self.module_filter = xml.get_widget("modulesFilterEntry") > +        self.module_filter = xml.get_object("modulesFilterEntry") >          self.module_filter.connect("focus_out_event", > self.filter_changed) >          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) >          self.view.set_model(self.store) > -        self.store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Module Name"), > gtk.CellRendererText(), text=0) > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Module Name"), > Gtk.CellRendererText(), text=0) >          col.set_sort_column_id(0) >          col.set_resizable(True) >          self.view.append_column(col) > -        self.store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Version"), > gtk.CellRendererText(), text=1) > -        self.enable_audit_button = > xml.get_widget("enableAuditButton") > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Version"), > 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_widget("newModuleButton") > +        self.new_button = xml.get_object("newModuleButton") >          self.new_button.connect("clicked", self.new_module) >          col.set_sort_column_id(1) >          col.set_resizable(True) > @@ -170,20 +165,20 @@ class modulesPage(semanagePage): >          return >   >      def addDialog(self): > -        dialog = gtk.FileChooserDialog(_("Load Policy Module"), > +        dialog = Gtk.FileChooserDialog(_("Load Policy Module"), >                                         None, > -                                       gtk.FILE_CHOOSER_ACTION_OPEN, > -                                       (gtk.STOCK_CANCEL, > gtk.RESPONSE_CANCEL, > -                                        gtk.STOCK_OPEN, > gtk.RESPONSE_OK)) > -        dialog.set_default_response(gtk.RESPONSE_OK) > +                                       Gtk.FileChooserAction.OPEN, > +                                       (Gtk.STOCK_CANCEL, > Gtk.ResponseType.CANCEL, > +                                        Gtk.STOCK_OPEN, > Gtk.ResponseType.OK)) > +        dialog.set_default_response(Gtk.ResponseType.OK) >   > -        filter = gtk.FileFilter() > +        filter = Gtk.FileFilter() >          filter.set_name("Policy Files") >          filter.add_pattern("*.pp") >          dialog.add_filter(filter) >   >          response = dialog.run() > -        if response == gtk.RESPONSE_OK: > +        if response == Gtk.ResponseType.OK: >              self.add(dialog.get_filename()) >          dialog.destroy() >   > diff --git a/gui/polgengui.py b/gui/polgengui.py > index 7460cce2911c..af6b822b86b8 100644 > --- a/gui/polgengui.py > +++ b/gui/polgengui.py > @@ -22,11 +22,11 @@ >  # >  import signal >  import string > -import gtk > -import gtk.glade > +import gi > +gi.require_version('Gtk', '3.0') > +from gi.repository import Gtk >  import os > -import gobject > -import gnome > +from gi.repository import GObject >  import sys >  try: >      import sepolicy > @@ -79,8 +79,6 @@ except: >          import __builtin__ >          __builtin__.__dict__['_'] = unicode >   > -gnome.program_init("SELinux Policy Generation Tool", "5") > - >  version = "1.0" >   >  sys.path.append('/usr/share/system-config-selinux') > @@ -95,10 +93,12 @@ def foreach(model, path, iter, selected): >  ## >  ## Pull in the Glade file >  ## > +xml = Gtk.Builder() > +xml.set_translation_domain(PROGNAME) >  if os.access("polgen.glade", os.F_OK): > -    xml = gtk.glade.XML("polgen.glade", domain=PROGNAME) > +    xml.add_from_file("polgen.glade") >  else: > -    xml = gtk.glade.XML("/usr/share/system-config- > selinux/polgen.glade", domain=PROGNAME) > +    xml.add_from_file("/usr/share/system-config- > selinux/polgen.glade") >   >  FILE = 1 >  DIR = 2 > @@ -277,27 +277,27 @@ class childWindow: >              b.connect("clicked", self.network_all_clicked) >   >          self.boolean_treeview = > self.xml.get_widget("boolean_treeview") > -        self.boolean_store = gtk.ListStore(gobject.TYPE_STRING, > gobject.TYPE_STRING) > +        self.boolean_store = Gtk.ListStore(GObject.TYPE_STRING, > GObject.TYPE_STRING) >          self.boolean_treeview.set_model(self.boolean_store) > -        self.boolean_store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Name"), gtk.CellRendererText(), > text=0) > +        self.boolean_store.set_sort_column_id(0, > Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Name"), Gtk.CellRendererText(), > text=0) >          self.boolean_treeview.append_column(col) > -        col = gtk.TreeViewColumn(_("Description"), > gtk.CellRendererText(), text=1) > +        col = Gtk.TreeViewColumn(_("Description"), > Gtk.CellRendererText(), text=1) >          self.boolean_treeview.append_column(col) >   >          self.role_treeview = self.xml.get_widget("role_treeview") > -        self.role_store = gtk.ListStore(gobject.TYPE_STRING) > +        self.role_store = Gtk.ListStore(GObject.TYPE_STRING) >          self.role_treeview.set_model(self.role_store) > -        self.role_treeview.get_selection().set_mode(gtk.SELECTION_MU > LTIPLE) > -        self.role_store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Role"), gtk.CellRendererText(), > text=0) > +        self.role_treeview.get_selection().set_mode(Gtk.SelectionMod > e.MULTIPLE) > +        self.role_store.set_sort_column_id(0, > Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Role"), Gtk.CellRendererText(), > text=0) >          self.role_treeview.append_column(col) >   >          self.existing_user_treeview = > self.xml.get_widget("existing_user_treeview") > -        self.existing_user_store = > gtk.ListStore(gobject.TYPE_STRING) > +        self.existing_user_store = > Gtk.ListStore(GObject.TYPE_STRING) >          self.existing_user_treeview.set_model(self.existing_user_sto > re) > -        self.existing_user_store.set_sort_column_id(0, > gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Existing_User"), > gtk.CellRendererText(), text=0) > +        self.existing_user_store.set_sort_column_id(0, > Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Existing_User"), > Gtk.CellRendererText(), text=0) >          self.existing_user_treeview.append_column(col) >   >          for i in self.all_roles: > @@ -307,19 +307,19 @@ class childWindow: >          self.in_tcp_reserved_checkbutton = > xml.get_widget("in_tcp_reserved_checkbutton") >   >          self.transition_treeview = > self.xml.get_widget("transition_treeview") > -        self.transition_store = gtk.ListStore(gobject.TYPE_STRING) > +        self.transition_store = Gtk.ListStore(GObject.TYPE_STRING) >          self.transition_treeview.set_model(self.transition_store) > -        self.transition_treeview.get_selection().set_mode(gtk.SELECT > ION_MULTIPLE) > -        self.transition_store.set_sort_column_id(0, > gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Application"), > gtk.CellRendererText(), text=0) > +        self.transition_treeview.get_selection().set_mode(Gtk.Select > ionMode.MULTIPLE) > +        self.transition_store.set_sort_column_id(0, > Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Application"), > Gtk.CellRendererText(), text=0) >          self.transition_treeview.append_column(col) >   >          self.user_transition_treeview = > self.xml.get_widget("user_transition_treeview") > -        self.user_transition_store = > gtk.ListStore(gobject.TYPE_STRING) > +        self.user_transition_store = > Gtk.ListStore(GObject.TYPE_STRING) >          self.user_transition_treeview.set_model(self.user_transition > _store) > -        self.user_transition_treeview.get_selection().set_mode(gtk.S > ELECTION_MULTIPLE) > -        self.user_transition_store.set_sort_column_id(0, > gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Application"), > gtk.CellRendererText(), text=0) > +        self.user_transition_treeview.get_selection().set_mode(Gtk.S > electionMode.MULTIPLE) > +        self.user_transition_store.set_sort_column_id(0, > Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Application"), > Gtk.CellRendererText(), text=0) >          self.user_transition_treeview.append_column(col) >   >          for i in self.all_users: > @@ -329,11 +329,11 @@ class childWindow: >              self.existing_user_store.set_value(iter, 0, i[:-2]) >   >          self.admin_treeview = self.xml.get_widget("admin_treeview") > -        self.admin_store = gtk.ListStore(gobject.TYPE_STRING) > +        self.admin_store = Gtk.ListStore(GObject.TYPE_STRING) >          self.admin_treeview.set_model(self.admin_store) > -        self.admin_treeview.get_selection().set_mode(gtk.SELECTION_M > ULTIPLE) > -        self.admin_store.set_sort_column_id(0, gtk.SORT_ASCENDING) > -        col = gtk.TreeViewColumn(_("Application"), > gtk.CellRendererText(), text=0) > +        self.admin_treeview.get_selection().set_mode(Gtk.SelectionMo > de.MULTIPLE) > +        self.admin_store.set_sort_column_id(0, > Gtk.SortType.ASCENDING) > +        col = Gtk.TreeViewColumn(_("Application"), > Gtk.CellRendererText(), text=0) >          self.admin_treeview.append_column(col) >   >          try: > @@ -383,17 +383,17 @@ class childWindow: >   >          if self.pages[type][self.current_page] == self.FINISH_PAGE: >              self.generate_policy() > -            self.xml.get_widget("cancel_button").set_label(gtk.STOCK > _CLOSE) > +            self.xml.get_widget("cancel_button").set_label(Gtk.STOCK > _CLOSE) >          else: >              self.current_page = self.current_page + 1 >              self.notebook.set_current_page(self.pages[type][self.cur > rent_page]) >              if self.pages[type][self.current_page] == > self.FINISH_PAGE: > -                self.forward_button.set_label(gtk.STOCK_APPLY) > +                self.forward_button.set_label(Gtk.STOCK_APPLY) >   >      def back(self, arg): >          type = self.get_type() >          if self.pages[type][self.current_page] == self.FINISH_PAGE: > -            self.forward_button.set_label(gtk.STOCK_GO_FORWARD) > +            self.forward_button.set_label(Gtk.STOCK_GO_FORWARD) >   >          self.current_page = self.current_page - 1 >          self.notebook.set_current_page(self.pages[type][self.current > _page]) > @@ -406,30 +406,30 @@ class childWindow: >              b.set_sensitive(not active) >   >      def verify(self, message, title=""): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, > -                                gtk.BUTTONS_YES_NO, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, > +                                Gtk.ButtonsType.YES_NO, >                                  message) >          dlg.set_title(title) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          rc = dlg.run() >          dlg.destroy() >          return rc >   >      def info(self, message): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, > -                                gtk.BUTTONS_OK, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, > +                                Gtk.ButtonsType.OK, >                                  message) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          dlg.run() >          dlg.destroy() >   >      def error(self, message): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, > -                                gtk.BUTTONS_CLOSE, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.ERROR, > +                                Gtk.ButtonsType.CLOSE, >                                  message) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          dlg.run() >          dlg.destroy() > @@ -550,7 +550,7 @@ class childWindow: >          self.boolean_description_entry.set_text("") >          rc = self.boolean_dialog.run() >          self.boolean_dialog.hide() > -        if rc == gtk.RESPONSE_CANCEL: > +        if rc == Gtk.ResponseType.CANCEL: >              return >          iter = self.boolean_store.append() >          self.boolean_store.set_value(iter, 0, > self.boolean_name_entry.get_text()) > @@ -559,7 +559,7 @@ class childWindow: >      def __add(self, type): >          rc = self.file_dialog.run() >          self.file_dialog.hide() > -        if rc == gtk.RESPONSE_CANCEL: > +        if rc == Gtk.ResponseType.CANCEL: >              return >          for i in self.file_dialog.get_filenames(): >              iter = self.store.append() > @@ -569,29 +569,29 @@ class childWindow: >      def exec_select(self, args): >          self.file_dialog.set_select_multiple(0) >          self.file_dialog.set_title(_("Select executable file to be > confined.")) > -        self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN) > +        self.file_dialog.set_action(Gtk.FileChooserAction.OPEN) >          self.file_dialog.set_current_folder("/usr/sbin") >          rc = self.file_dialog.run() >          self.file_dialog.hide() > -        if rc == gtk.RESPONSE_CANCEL: > +        if rc == Gtk.ResponseType.CANCEL: >              return >          self.exec_entry.set_text(self.file_dialog.get_filename()) >   >      def init_script_select(self, args): >          self.file_dialog.set_select_multiple(0) >          self.file_dialog.set_title(_("Select init script file to be > confined.")) > -        self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN) > +        self.file_dialog.set_action(Gtk.FileChooserAction.OPEN) >          self.file_dialog.set_current_folder("/etc/rc.d/init.d") >          rc = self.file_dialog.run() >          self.file_dialog.hide() > -        if rc == gtk.RESPONSE_CANCEL: > +        if rc == Gtk.ResponseType.CANCEL: >              return >          self.init_script_entry.set_text(self.file_dialog.get_filenam > e()) >   >      def add(self, args): >          self.file_dialog.set_title(_("Select file(s) that confined > application creates or writes")) >          self.file_dialog.set_current_folder("/") > -        self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN) > +        self.file_dialog.set_action(Gtk.FileChooserAction.OPEN) >          self.file_dialog.set_select_multiple(1) >          self.__add(FILE) >   > @@ -599,7 +599,7 @@ class childWindow: >          self.file_dialog.set_title(_("Select directory(s) that the > confined application owns and writes into")) >          self.file_dialog.set_current_folder("/") >          self.file_dialog.set_select_multiple(1) > -        self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_F > OLDER) > +        self.file_dialog.set_action(Gtk.FileChooserAction.SELECT_FOL > DER) >          self.__add(DIR) >   >      def on_about_clicked(self, args): > @@ -608,7 +608,7 @@ class childWindow: >          dlg.hide() >   >      def quit(self, args): > -        gtk.main_quit() > +        Gtk.main_quit() >   >      def setupScreen(self): >          # Bring in widgets from glade file. > @@ -650,20 +650,20 @@ class childWindow: >          self.view = self.xml.get_widget("write_treeview") >          self.file_dialog = self.xml.get_widget("filechooserdialog") >   > -        self.store = gtk.ListStore(gobject.TYPE_STRING, > gobject.TYPE_INT) > +        self.store = Gtk.ListStore(GObject.TYPE_STRING, > GObject.TYPE_INT) >          self.view.set_model(self.store) > -        col = gtk.TreeViewColumn("", gtk.CellRendererText(), text=0) > +        col = Gtk.TreeViewColumn("", Gtk.CellRendererText(), text=0) >          col.set_resizable(True) >          self.view.append_column(col) >          self.view.get_selection().select_path((0,)) >   >      def output_button_clicked(self, *args): >          self.file_dialog.set_title(_("Select directory to generate > policy files in")) > -        self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_F > OLDER) > +        self.file_dialog.set_action(Gtk.FileChooserAction.SELECT_FOL > DER) >          self.file_dialog.set_select_multiple(0) >          rc = self.file_dialog.run() >          self.file_dialog.hide() > -        if rc == gtk.RESPONSE_CANCEL: > +        if rc == Gtk.ResponseType.CANCEL: >              return >          self.output_entry.set_text(self.file_dialog.get_filename()) >   > @@ -675,11 +675,11 @@ class childWindow: >          name = entry.get_text() >          if self.name != name: >              if name in self.all_types: > -                if self.verify(_("Type %s_t already defined in > current policy.\nDo you want to continue?") % name, _("Verify Name")) > == gtk.RESPONSE_NO: > +                if self.verify(_("Type %s_t already defined in > current policy.\nDo you want to continue?") % name, _("Verify Name")) > == Gtk.ResponseType.NO: >                      entry.set_text("") >                      return False >              if name in self.all_modules: > -                if self.verify(_("Module %s already loaded in > current policy.\nDo you want to continue?") % name, _("Verify Name")) > == gtk.RESPONSE_NO: > +                if self.verify(_("Module %s already loaded in > current policy.\nDo you want to continue?") % name, _("Verify Name")) > == Gtk.ResponseType.NO: >                      entry.set_text("") >                      return False >   > @@ -770,7 +770,7 @@ class childWindow: >          self.mainWindow.connect("destroy", self.quit) >   >          self.mainWindow.show_all() > -        gtk.main() > +        Gtk.main() >   >  if __name__ == "__main__": >      signal.signal(signal.SIGINT, signal.SIG_DFL) > diff --git a/gui/portsPage.py b/gui/portsPage.py > index b8fdaad3e9bd..30f58383bc1d 100644 > --- a/gui/portsPage.py > +++ b/gui/portsPage.py > @@ -16,12 +16,8 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade > -import os > -import gobject >  import sys > +from gi.repository import GObject, Gtk >  import seobject >   >  TYPE_COL = 0 > @@ -62,18 +58,19 @@ class portsPage(semanagePage): >   >      def __init__(self, xml): >          semanagePage.__init__(self, xml, "ports", _("Network Port")) > -        xml.signal_connect("on_group_clicked", > self.on_group_clicked) > +        group_listview = xml.get_object("listViewButton") > +        group_listview.connect("clicked", self.on_group_clicked) >          self.group = False > -        self.ports_filter = xml.get_widget("portsFilterEntry") > +        self.ports_filter = xml.get_object("portsFilterEntry") >          self.ports_filter.connect("focus_out_event", > self.filter_changed) >          self.ports_filter.connect("activate", self.filter_changed) > -        self.ports_name_entry = xml.get_widget("portsNameEntry") > -        self.ports_protocol_combo = > xml.get_widget("portsProtocolCombo") > -        self.ports_number_entry = xml.get_widget("portsNumberEntry") > -        self.ports_mls_entry = xml.get_widget("portsMLSEntry") > -        self.ports_add_button = xml.get_widget("portsAddButton") > -        self.ports_properties_button = > xml.get_widget("portsPropertiesButton") > -        self.ports_delete_button = > xml.get_widget("portsDeleteButton") > +        self.ports_name_entry = xml.get_object("portsNameEntry") > +        self.ports_protocol_combo = > xml.get_object("portsProtocolCombo") > +        self.ports_number_entry = xml.get_object("portsNumberEntry") > +        self.ports_mls_entry = xml.get_object("portsMLSEntry") > +        self.ports_add_button = xml.get_object("portsAddButton") > +        self.ports_properties_button = > xml.get_object("portsPropertiesButton") > +        self.ports_delete_button = > xml.get_object("portsDeleteButton") >          liststore = self.ports_protocol_combo.get_model() >          iter = liststore.get_iter_first() >          self.ports_protocol_combo.set_active_iter(iter) > @@ -90,28 +87,28 @@ class portsPage(semanagePage): >                  self.group_load(filter) >   >      def init_store(self): > -        self.store = gtk.ListStore(gobject.TYPE_STRING, > gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) > +        self.store = Gtk.ListStore(GObject.TYPE_STRING, > GObject.TYPE_STRING, GObject.TYPE_STRING, GObject.TYPE_STRING) >          self.view.set_model(self.store) > -        self.store.set_sort_column_id(0, gtk.SORT_ASCENDING) > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) >   >          self.view.set_search_equal_func(self.search) > -        col = gtk.TreeViewColumn(_("SELinux Port\nType"), > gtk.CellRendererText(), text=TYPE_COL) > +        col = Gtk.TreeViewColumn(_("SELinux Port\nType"), > Gtk.CellRendererText(), text=TYPE_COL) >          col.set_sort_column_id(TYPE_COL) >          col.set_resizable(True) >          self.view.append_column(col) > -        self.store.set_sort_column_id(TYPE_COL, gtk.SORT_ASCENDING) > +        self.store.set_sort_column_id(TYPE_COL, > Gtk.SortType.ASCENDING) >   > -        col = gtk.TreeViewColumn(_("Protocol"), > gtk.CellRendererText(), text=PROTOCOL_COL) > +        col = Gtk.TreeViewColumn(_("Protocol"), > Gtk.CellRendererText(), text=PROTOCOL_COL) >          col.set_sort_column_id(PROTOCOL_COL) >          col.set_resizable(True) >          self.view.append_column(col) >   > -        self.mls_col = gtk.TreeViewColumn(_("MLS/MCS\nLevel"), > gtk.CellRendererText(), text=MLS_COL) > +        self.mls_col = Gtk.TreeViewColumn(_("MLS/MCS\nLevel"), > Gtk.CellRendererText(), text=MLS_COL) >          self.mls_col.set_resizable(True) >          self.mls_col.set_sort_column_id(MLS_COL) >          self.view.append_column(self.mls_col) >   > -        col = gtk.TreeViewColumn(_("Port"), gtk.CellRendererText(), > text=PORT_COL) > +        col = Gtk.TreeViewColumn(_("Port"), Gtk.CellRendererText(), > text=PORT_COL) >          col.set_sort_column_id(PORT_COL) >          col.set_resizable(True) >          self.view.append_column(col) > @@ -139,7 +136,7 @@ class portsPage(semanagePage): >                  continue >              iter = self.store.append() >              if k[0] == k[1]: > -                self.store.set_value(iter, PORT_COL, k[0]) > +                self.store.set_value(iter, PORT_COL, str(k[0])) >              else: >                  rec = "%s-%s" % k[:2] >                  self.store.set_value(iter, PORT_COL, rec) > diff --git a/gui/semanagePage.py b/gui/semanagePage.py > index 27367f333e29..560ec077f023 100644 > --- a/gui/semanagePage.py > +++ b/gui/semanagePage.py > @@ -16,13 +16,8 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade > -import os > -import gobject >  import sys > -import seobject > +from gi.repository import Gdk, Gtk >   >  ## >  ## I18N > @@ -47,24 +42,25 @@ except: >   >   >  def idle_func(): > -    while gtk.events_pending(): > -        gtk.main_iteration() > +    while Gtk.events_pending(): > +        Gtk.main_iteration() >   >   >  class semanagePage: >   >      def __init__(self, xml, name, description): >          self.xml = xml > -        self.window = > self.xml.get_widget("mainWindow").get_root_window() > -        self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) > -        self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR) > +        self.window = > self.xml.get_object("mainWindow").get_root_window() > +        self.busy_cursor = Gdk.Cursor.new(Gdk.CursorType.WATCH) > +        self.ready_cursor = Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR) >   >          self.local = False > -        self.view = xml.get_widget("%sView" % name) > -        self.dialog = xml.get_widget("%sDialog" % name) > -        self.filter_entry = xml.get_widget("%sFilterEntry" % name) > +        self.view = xml.get_object("%sView" % name) > +        self.dialog = xml.get_object("%sDialog" % name) > +        self.filter_entry = xml.get_object("%sFilterEntry" % name) >          self.filter_entry.connect("focus_out_event", > self.filter_changed) >          self.filter_entry.connect("activate", self.filter_changed) > +        self.filter_entry.connect("changed", self.filter_changed) >   >          self.view.connect("row_activated", self.rowActivated) >          self.view.get_selection().connect("changed", > self.itemSelected) > @@ -81,7 +77,7 @@ class semanagePage: >      def get_description(self): >          return self.description >   > -    def itemSelected(self, args): > +    def itemSelected(self, selection): >          return >   >      def filter_changed(self, *arg): > @@ -110,28 +106,28 @@ class semanagePage: >          self.propertiesDialog() >   >      def verify(self, message, title=""): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, > -                                gtk.BUTTONS_YES_NO, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, > +                                Gtk.ButtonsType.YES_NO, >                                  message) >          dlg.set_title(title) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          rc = dlg.run() >          dlg.destroy() >          return rc >   >      def error(self, message): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, > -                                gtk.BUTTONS_CLOSE, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.ERROR, > +                                Gtk.ButtonsType.CLOSE, >                                  message) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          dlg.run() >          dlg.destroy() >   >      def deleteDialog(self): >          store, it = self.view.get_selection().get_selected() > -        if (it is not None) and (self.verify(_("Are you sure you > want to delete %s '%s'?" % (self.description, store.get_value(it, > 0))), _("Delete %s" % self.description)) == gtk.RESPONSE_YES): > +        if (it is not None) and (self.verify(_("Are you sure you > want to delete %s '%s'?" % (self.description, store.get_value(it, > 0))), _("Delete %s" % self.description)) == Gtk.ResponseType.YES): >              self.delete() >   >      def use_menus(self): > @@ -140,11 +136,11 @@ class semanagePage: >      def addDialog(self): >          self.dialogClear() >          self.dialog.set_title(_("Add %s" % self.description)) > -        self.dialog.set_position(gtk.WIN_POS_MOUSE) > +        self.dialog.set_position(Gtk.WindowPosition.MOUSE) >   > -        while self.dialog.run() == gtk.RESPONSE_OK: > +        while self.dialog.run() == Gtk.ResponseType.OK: >              try: > -                if self.add() == False: > +                if not self.add(): >                      continue >                  break >              except ValueError as e: > @@ -154,10 +150,10 @@ class semanagePage: >      def propertiesDialog(self): >          self.dialogInit() >          self.dialog.set_title(_("Modify %s" % self.description)) > -        self.dialog.set_position(gtk.WIN_POS_MOUSE) > -        while self.dialog.run() == gtk.RESPONSE_OK: > +        self.dialog.set_position(Gtk.WindowPosition.MOUSE) > +        while self.dialog.run() == Gtk.ResponseType.OK: >              try: > -                if self.modify() == False: > +                if not self.modify(): >                      continue >                  break >              except ValueError as e: > diff --git a/gui/statusPage.py b/gui/statusPage.py > index 23d0d0f6121e..766854b19cba 100644 > --- a/gui/statusPage.py > +++ b/gui/statusPage.py > @@ -16,23 +16,14 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade >  import os > -import gobject >  import sys > -import tempfile > +from gi.repository import Gtk >  import selinux >   >  INSTALLPATH = '/usr/share/system-config-selinux' >  sys.path.append(INSTALLPATH) >   > -try: > -    from subprocess import getstatusoutput > -except ImportError: > -    from commands import getstatusoutput > - >  ENFORCING = 1 >  PERMISSIVE = 0 >  DISABLED = -1 > @@ -71,12 +62,11 @@ class statusPage: >   >          self.type = selinux.selinux_getpolicytype() >          # Bring in widgets from glade file. > -        self.typeHBox = xml.get_widget("typeHBox") > -        self.selinuxTypeOptionMenu = > xml.get_widget("selinuxTypeOptionMenu") > -        self.typeLabel = xml.get_widget("typeLabel") > -        self.enabledOptionMenu = xml.get_widget("enabledOptionMenu") > -        self.currentOptionMenu = xml.get_widget("currentOptionMenu") > -        self.relabel_checkbutton = > xml.get_widget("relabelCheckbutton") > +        self.selinuxTypeOptionMenu = > xml.get_object("selinuxTypeOptionMenu") > +        self.typeLabel = xml.get_object("typeLabel") > +        self.enabledOptionMenu = xml.get_object("enabledOptionMenu") > +        self.currentOptionMenu = xml.get_object("currentOptionMenu") > +        self.relabel_checkbutton = > xml.get_object("relabelCheckbutton") >          self.relabel_checkbutton.set_active(self.is_relabel()) >          self.relabel_checkbutton.connect("toggled", > self.on_relabel_toggle) >          if self.get_current_mode() == ENFORCING or > self.get_current_mode() == PERMISSIVE: > @@ -90,7 +80,7 @@ class statusPage: >              self.currentOptionMenu.set_active(0) >              self.currentOptionMenu.set_sensitive(False) >   > -        if self.read_selinux_config() == None: > +        if self.read_selinux_config() is None: >              self.selinuxsupport = False >          else: >              self.enabledOptionMenu.connect("changed", > self.enabled_changed) > @@ -131,10 +121,10 @@ class statusPage: >                  os.unlink(RELABELFILE) >   >      def verify(self, message): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, > -                                gtk.BUTTONS_YES_NO, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, > +                                Gtk.ButtonsType.YES_NO, >                                  message) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          rc = dlg.run() >          dlg.destroy() > @@ -144,7 +134,7 @@ class statusPage: >          type = self.get_type() >          enabled = self.enabledOptionMenu.get_active() >          if self.initialtype != type: > -            if self.verify(_("Changing the policy type will cause a > relabel of the entire file system on the next boot. Relabeling takes > a long time depending on the size of the file system.  Do you wish to > continue?")) == gtk.RESPONSE_NO: > +            if self.verify(_("Changing the policy type will cause a > relabel of the entire file system on the next boot. Relabeling takes > a long time depending on the size of the file system.  Do you wish to > continue?")) == Gtk.ResponseType.NO: >                  menu.set_active(self.typeHistory) >                  return None >   > @@ -158,12 +148,12 @@ class statusPage: >          type = self.get_type() >   >          if self.initEnabled != DISABLED and enabled == DISABLED: > -            if self.verify(_("Changing to SELinux disabled requires > a reboot.  It is not recommended.  If you later decide to turn > SELinux back on, the system will be required to relabel.  If you just > want to see if SELinux is causing a problem on your system, you can > go to permissive mode which will only log errors and not enforce > SELinux policy.  Permissive mode does not require a reboot    Do you > wish to continue?")) == gtk.RESPONSE_NO: > +            if self.verify(_("Changing to SELinux disabled requires > a reboot.  It is not recommended.  If you later decide to turn > SELinux back on, the system will be required to relabel.  If you just > want to see if SELinux is causing a problem on your system, you can > go to permissive mode which will only log errors and not enforce > SELinux policy.  Permissive mode does not require a reboot    Do you > wish to continue?")) == Gtk.ResponseType.NO: >                  combo.set_active(self.enabled) >                  return None >   >          if self.initEnabled == DISABLED and enabled < 2: > -            if self.verify(_("Changing to SELinux enabled will cause > a relabel of the entire file system on the next boot. Relabeling > takes a long time depending on the size of the file system.  Do you > wish to continue?")) == gtk.RESPONSE_NO: > +            if self.verify(_("Changing to SELinux enabled will cause > a relabel of the entire file system on the next boot. Relabeling > takes a long time depending on the size of the file system.  Do you > wish to continue?")) == Gtk.ResponseType.NO: >                  combo.set_active(self.enabled) >                  return None >              self.relabel_checkbutton.set_active(True) > diff --git a/gui/system-config-selinux.glade b/gui/system-config- > selinux.glade > deleted file mode 100644 > index 4547b3fd669c..000000000000 > --- a/gui/system-config-selinux.glade > +++ /dev/null > @@ -1,3005 +0,0 @@ > - > - td">; > - > - > - > - > - > - > -  5 > -  False > -  system-config- > selinux > -  Copyright (c)2006 > Red Hat, Inc. > -Copyright (c) 2006 Dan Walsh <dwalsh@redhat.com> > -  False > -  Daniel Walsh <dwalsh@redhat.com> > - > -   comments="TRANSLATORS: Replace this string with your names, one name > per line.">translator-credits > -  system-config-selinux.png > - > - > - > -  Add SELinux Login > Mapping > -  GTK_WINDOW_TOPLEVEL > -  GTK_WIN_POS_NONE > -  False > -  True > -  False > -  True > -  False > -  False > -  GDK_WINDOW_TYPE_HINT_DIALOG > -  GDK_GRAVITY_NORTH_WEST > -  True > -  False > -  True > - > -   > -     > -      True > -      False > -      0 > - > -       > - > -   True > -   GTK_BUTTONBOX_END > - > -    > -      > -       True > -       True > -       True > -       gtk-cancel > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -6 > -      > -    > - > -    > -      > -       True > -       True > -       True > -       gtk-ok > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -5 > -      > -    > - > - > -   0 > -   False > -   True > -   GTK_PACK_END > - > -       > - > -       > - > -   True > -   False > -   0 > - > -    > -      > -       True > -       3 > -       2 > -       False > -       4 > -       6 > - > -        > - > -   True > -   Login > Name > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   0 > -   1 > -   fill > -    > - > -        > - > -        > - > -   True > -   SELinux > User > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   1 > -   2 > -   fill > -    > - > -        > - > -        > - > -   True > -   MLS/MCS > Range > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   2 > -   3 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   0 > -   1 > -    > - > -        > - > -        > - id="loginsSelinuxUserCombo"> > -   True > -   False > -   True > - > - > -   1 > -   2 > -   1 > -   2 > -   fill > -   fill > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   2 > -   3 > -    > - > -        > -      > -      > -       5 > -       True > -       True > -      > -    > - > - > -   0 > -   True > -   True > - > -       > -     > -   > - > - > - > -  Add SELinux Network > Ports > -  GTK_WINDOW_TOPLEVEL > -  GTK_WIN_POS_NONE > -  False > -  True > -  False > -  True > -  False > -  False > -  GDK_WINDOW_TYPE_HINT_DIALOG > -  GDK_GRAVITY_NORTH_WEST > -  True > -  False > -  True > - > -   > -     > -      True > -      False > -      0 > - > -       > - > -   True > -   GTK_BUTTONBOX_END > - > -    > -      > -       True > -       True > -       True > -       gtk-cancel > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -6 > -      > -    > - > -    > -      > -       True > -       True > -       True > -       gtk-ok > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -5 > -      > -    > - > - > -   0 > -   False > -   True > -   GTK_PACK_END > - > -       > - > -       > - > -   True > -   False > -   0 > - > -    > -      > -       True > -       4 > -       2 > -       False > -       4 > -       6 > - > -        > - > -   True > -   Port > Number > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   0 > -   1 > -   fill > -    > - > -        > - > -        > - > -   True > -    translatable="yes">Protocol > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   1 > -   2 > -   fill > -    > - > -        > - > -        > - > -   True > -   SELinux > Type > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   2 > -   3 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   0 > -   1 > -    > - > -        > - > -        > - > -   True > -   tcp > -udp > -   False > -   True > - > - > -   1 > -   2 > -   1 > -   2 > -   fill > -   fill > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   2 > -   3 > -    > - > -        > - > -        > - > -   True > -   MLS/MCS > -Level > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   3 > -   4 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   3 > -   4 > -    > - > -        > -      > -      > -       5 > -       True > -       True > -      > -    > - > - > -   0 > -   True > -   True > - > -       > -     > -   > - > - > - > -  Add SELinux Login > Mapping > -  GTK_WINDOW_TOPLEVEL > -  GTK_WIN_POS_NONE > -  False > -  True > -  False > -  True > -  False > -  False > -  GDK_WINDOW_TYPE_HINT_DIALOG > -  GDK_GRAVITY_NORTH_WEST > -  True > -  False > -  True > - > -   > -     > -      True > -      False > -      0 > - > -       > - > -   True > -   GTK_BUTTONBOX_END > - > -    > -      > -       True > -       True > -       True > -       gtk-cancel > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -6 > -      > -    > - > -    > -      > -       True > -       True > -       True > -       gtk-ok > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -5 > -      > -    > - > - > -   0 > -   False > -   True > -   GTK_PACK_END > - > -       > - > -       > - > -   True > -   False > -   0 > - > -    > -      > -       True > -       4 > -       2 > -       False > -       4 > -       6 > - > -        > - > -   True > -   File > Specification > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   0 > -   1 > -   fill > -    > - > -        > - > -        > - > -   True > -   File > Type > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   1 > -   2 > -   fill > -    > - > -        > - > -        > - > -   True > -   SELinux > Type > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   2 > -   3 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   0 > -   1 > -    > - > -        > - > -        > - id="fcontextFileTypeCombo"> > -   True > -   all > files > -regular file > -directory > -character device > -block device > -socket file > -symbolic link > -named pipe > - > -   False > -   True > - > - > -   1 > -   2 > -   1 > -   2 > -   fill > -   fill > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   2 > -   3 > -    > - > -        > - > -        > - > -   True > -    translatable="yes">MLS > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   3 > -   4 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   3 > -   4 > -    > - > -        > -      > -      > -       5 > -       True > -       True > -      > -    > - > - > -   0 > -   True > -   True > - > -       > -     > -   > - > - > - > -  Add SELinux > User > -  GTK_WINDOW_TOPLEVEL > -  GTK_WIN_POS_NONE > -  False > -  True > -  False > -  True > -  False > -  False > -  GDK_WINDOW_TYPE_HINT_DIALOG > -  GDK_GRAVITY_NORTH_WEST > -  True > -  False > -  True > - > -   > -     > -      True > -      False > -      0 > - > -       > - > -   True > -   GTK_BUTTONBOX_END > - > -    > -      > -       True > -       True > -       True > -       gtk-cancel > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -6 > -      > -    > - > -    > -      > -       True > -       True > -       True > -       gtk-ok > -       True > -       GTK_RELIEF_NORMAL > -       True > -       -5 > -      > -    > - > - > -   0 > -   False > -   True > -   GTK_PACK_END > - > -       > - > -       > - > -   True > -   False > -   0 > - > -    > -      > -       True > -       3 > -       2 > -       False > -       4 > -       6 > - > -        > - > -   True > -   SELinux > User > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   0 > -   1 > -   fill > -    > - > -        > - > -        > - > -   True > -   MLS/MCS > Range > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   1 > -   2 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   1 > -   2 > -    > - > -        > - > -        > - > -   True > -   SELinux > Roles > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   0 > -   1 > -   2 > -   3 > -   fill > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   2 > -   3 > -    > - > -        > - > -        > - > -   True > -   True > -   True > -   True > -   0 > -    translatable="yes"> > -   True > -   * > -    name="activates_default">False > - > - > -   1 > -   2 > -   0 > -   1 > -    > - > -        > -      > -      > -       5 > -       True > -       True > -      > -    > - > - > -   0 > -   True > -   True > - > -       > -     > -   > - > - > - > -  800 > -  500 > -  SELinux > Administration > -  GTK_WINDOW_TOPLEVEL > -  GTK_WIN_POS_NONE > -  False > -  True > -  False > -  system-config-selinux.png > -  True > -  False > -  False > -  GDK_WINDOW_TYPE_HINT_NORMAL > -  GDK_GRAVITY_NORTH_WEST > -  True > -  False > -  True > - > -   > -     > -      True > -      True > - > -       > - > -   True > -   GTK_SHADOW_NONE > - > -    > -      > -       True > -        name="pack_direction">GTK_PACK_DIRECTION_LTR > -        name="child_pack_direction">GTK_PACK_DIRECTION_LTR > - > -        > - > -   True > -    name="stock_item">GNOMEUIINFO_MENU_FILE_TREE > - > -    > -      > - > -        > - id="add_menu_item"> > -   True > -    translatable="yes">Add > -    name="use_underline">True > -    handler="on_add_clicked" last_modification_time="Sat, 17 Mar 2007 > 12:21:12 GMT"/> > -    modifiers="GDK_CONTROL_MASK" signal="activate"/> > - > -    > -      > -        name="visible">True > -       gtk- > add > -        name="icon_size">1 > -       0.5 > -       0.5 > -       0 > -       0 > -      > -    > - > -        > - > -        > - id="properties_menu_item"> > -   True > -    translatable="yes">_Properties > -    name="use_underline">True > -    handler="on_properties_clicked" last_modification_time="Sat, 17 Mar > 2007 12:21:12 GMT"/> > -    modifiers="GDK_CONTROL_MASK" signal="activate"/> > - > -    > -      > -        name="visible">True > -       gtk- > properties > -        name="icon_size">1 > -       0.5 > -       0.5 > -       0 > -       0 > -      > -    > - > -        > - > -        > - id="delete_menu_item"> > -   True > -    translatable="yes">_Delete > -    name="use_underline">True > -    handler="on_delete_clicked" last_modification_time="Sat, 17 Mar 2007 > 12:21:12 GMT"/> > -    signal="activate"/> > - > -    > -      > -        name="visible">True > -       gtk- > delete > -        name="icon_size">1 > -       0.5 > -       0.5 > -       0 > -       0 > -      > -    > - > -        > - > -        > - > -   True > -    name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM > -    handler="on_quit_activate" last_modification_time="Fri, 06 Oct 2006 > 13:58:19 GMT"/> > - > -        > -      > -    > - > -        > - > -        > - > -   True > -    name="stock_item">GNOMEUIINFO_MENU_HELP_TREE > - > -    > -      > - > -        > - > -   True > -    name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM > -    handler="on_about_activate" last_modification_time="Fri, 06 Oct 2006 > 13:58:02 GMT"/> > - > -        > -      > -    > - > -        > -      > -    > - > - > -   BONOBO_DOCK_TOP > -   0 > -   0 > -   0 > -    name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_N > EVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED > - > -       > - > -       > - > -   True > -   True > - > -    > -      > -       5 > -       True > -       0 > -       0.5 > -        name="shadow_type">GTK_SHADOW_NONE > - > -        > - > -   True > -   0.5 > -   0.5 > -   1 > -   1 > -   0 > -   0 > -   12 > -   0 > - > -    > -      > -       True > -        translatable="yes">Select Management Object > -       True > -        name="headers_visible">False > -       False > -       False > -       True > -        name="fixed_height_mode">False > -        name="hover_selection">False > -       False > -      > -    > - > -        > - > -        > - > -   True > -    translatable="yes"><b>Select:</b> > -   False > -   True > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   label_item > - > -        > -      > -      > -       False > -       True > -      > -    > - > -    > -      > -       True > -       False > -       True > -       GTK_POS_TOP > -       False > -       False > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -       4 > -       2 > -       False > -       5 > -       5 > - > -        > - > -   True > -    translatable="yes">System Default Enforcing Mode > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   0 > -   1 > -   0 > -    name="bottom_attach">1 > -   fill > -    > - > -        > - > -        > - id="enabledOptionMenu"> > -   True > -    translatable="yes">Disabled > -Permissive > -Enforcing > - > -    name="add_tearoffs">False > -    name="focus_on_click">True > - > - > -   1 > -   2 > -   0 > -    name="bottom_attach">1 > -   fill > - > -        > - > -        > - > -   True > -    translatable="yes">Current Enforcing Mode > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   0 > -   1 > -   1 > -    name="bottom_attach">2 > -   fill > -    > - > -        > - > -        > - id="currentOptionMenu"> > -   True > -    translatable="yes"> > -    name="add_tearoffs">False > -    name="focus_on_click">True > - > - > -   1 > -   2 > -   1 > -    name="bottom_attach">2 > -   fill > -   fill > - > -        > - > -        > - > -   True > -    translatable="yes">System Default Policy Type: > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   0 > -   1 > -   2 > -    name="bottom_attach">3 > -   fill > -    > - > -        > - > -        > - id="selinuxTypeOptionMenu"> > -   True > -    translatable="yes"> > -    name="add_tearoffs">False > -    name="focus_on_click">True > - > - > -   1 > -   2 > -   2 > -    name="bottom_attach">3 > -   fill > -   fill > - > -        > - > -        > - id="relabelCheckbutton"> > -   True > -    translatable="yes">Select if you wish to relabel then entire file > system on next reboot.  Relabeling can take a very long time, > depending on the size of the system.  If you are changing policy > types or going from disabled to enforcing, a relabel is > required. > -   True > -    name="relief">GTK_RELIEF_NORMAL > -    name="focus_on_click">True > -   False > -    name="inconsistent">False > -    name="draw_indicator">True > - > -    > -      id="alignment4"> > -        name="visible">True > -       0.5 > -       0.5 > -       0 > -       0 > -        name="top_padding">0 > -        name="bottom_padding">0 > -        name="left_padding">0 > -        name="right_padding">0 > - > -        > - > -    name="visible">True > -    name="homogeneous">False > -    name="spacing">2 > - > -    > -      id="image2"> > -        name="visible">True > -       gtk- > refresh > -        name="icon_size">4 > -        name="xalign">0.5 > -        name="yalign">0.5 > -        name="xpad">0 > -        name="ypad">0 > -      > -      > -        name="padding">0 > -        name="expand">False > -        name="fill">False > -      > -    > - > -    > -      id="label49"> > -        name="visible">True > -        translatable="yes">Relabel on next reboot. > -        name="use_underline">True > -        name="use_markup">False > -        name="justify">GTK_JUSTIFY_LEFT > -        name="wrap">False > -        name="selectable">False > -        name="xalign">0.5 > -        name="yalign">0.5 > -        name="xpad">0 > -        name="ypad">0 > -        name="ellipsize">PANGO_ELLIPSIZE_NONE > -       - > 1 > -        name="single_line_mode">False > -        name="angle">0 > -      > -      > -        name="padding">0 > -        name="expand">False > -        name="fill">False > -      > -    > - > -        > -      > -    > - > - > -   0 > -   2 > -   3 > -    name="bottom_attach">4 > -   fill > -   fill > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label37 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       True > -       True > - > -        > - id="booleanRevertButton"> > -   True > -    translatable="yes">Revert boolean setting to system > default > -   gtk-revert-to- > saved > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton34"> > -   True > -    translatable="yes">Toggle between Customized and All > Booleans > -    translatable="yes">Customized > -    name="use_underline">True > -   gtk- > find > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_local_clicked" last_modification_time="Wed, 19 Sep 2007 > 19:14:08 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="booleansFilter"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_booleansFilter_changed" last_modification_time="Fri, 06 > Apr 2007 12:39:26 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       10 > -       False > -       True > -      > -    > - > -    > -      id="scrolledwindow18"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - id="booleansView"> > -   True > -    translatable="yes">Boolean > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label50 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       True > -       True > - > -        > - id="toolbutton5"> > -   True > -    translatable="yes">Add File Context > -   gtk- > add > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:27:03 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton6"> > -   True > -    translatable="yes">Modify File Context > -   gtk- > properties > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_properties_clicked" last_modification_time="Mon, 16 Jan > 2006 18:26:51 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton7"> > -   True > -    translatable="yes">Delete File Context > -   gtk- > delete > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="customizedButton"> > -   True > -    translatable="yes">Toggle between all and customized file > context > -    translatable="yes">Customized > -    name="use_underline">True > -   gtk- > find > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_local_clicked" last_modification_time="Wed, 19 Sep 2007 > 19:14:08 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="fcontextFilterEntry"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_fcontextFilter_changed" last_modification_time="Mon, 05 > Nov 2007 21:22:11 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      id="scrolledwindow19"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - id="fcontextView"> > -   True > -    translatable="yes">File Labeling > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label38 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       True > -       True > - > -        > - id="toolbutton8"> > -   True > -    translatable="yes">Add SELinux User Mapping > -   gtk- > add > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:27:03 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton29"> > -   True > -    translatable="yes">Modify SELinux User Mapping > -   gtk- > properties > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_properties_clicked" last_modification_time="Wed, 15 Nov > 2006 16:38:33 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton10"> > -   True > -    translatable="yes">Delete SELinux User Mapping > -   gtk- > delete > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="loginsFilterEntry"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_booleansFilter_changed" last_modification_time="Fri, 06 > Apr 2007 12:39:26 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       5 > -       False > -       True > -      > -    > - > -    > -      id="scrolledwindow16"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - > -   True > -    translatable="yes">User Mapping > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label39 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       True > -       True > - > -        > - id="toolbutton14"> > -   True > -    translatable="yes">Add User > -   gtk- > add > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:27:03 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton15"> > -   True > -    translatable="yes">Modify User > -   gtk- > properties > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_properties_clicked" last_modification_time="Mon, 16 Jan > 2006 18:26:51 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton16"> > -   True > -    translatable="yes">Delete User > -   gtk- > delete > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="usersFilterEntry"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_booleansFilter_changed" last_modification_time="Fri, 06 > Apr 2007 12:39:26 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       5 > -       False > -       True > -      > -    > - > -    > -      id="scrolledwindow11"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - > -   True > -    translatable="yes">SELinux User > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label41 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       False > -       True > - > -        > - id="portsAddButton"> > -   True > -    translatable="yes">Add Network Port > -   gtk- > add > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:27:03 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="portsPropertiesButton"> > -   True > -    translatable="yes">Edit Network Port > -   gtk- > properties > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_properties_clicked" last_modification_time="Mon, 16 Jan > 2006 18:26:51 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="portsDeleteButton"> > -   True > -    translatable="yes">Delete Network Port > -   gtk- > delete > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - > -   True > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > - > -    > -      id="vseparator1"> > -        name="width_request">32 > -        name="visible">True > -      > -    > - > - > -   False > -    name="homogeneous">False > - > -        > - > -        > - id="listViewButton"> > -   True > -    translatable="yes">Toggle between Customized and All Ports > -    translatable="yes">Group View > -    name="use_underline">True > -   gtk- > indent > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_group_clicked" last_modification_time="Mon, 01 Oct 2007 > 21:31:19 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton35"> > -   True > -    translatable="yes">Toggle between Customized and All Ports > -    translatable="yes">Customized > -    name="use_underline">True > -   gtk- > find > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_local_clicked" last_modification_time="Wed, 19 Sep 2007 > 19:14:08 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="portsFilterEntry"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_booleansFilter_changed" last_modification_time="Fri, 06 > Apr 2007 12:39:26 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       5 > -       False > -       True > -      > -    > - > -    > -      id="scrolledwindow13"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - > -   True > -    translatable="yes">Network Port > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label42 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       True > -       True > - > -        > - id="newModuleButton"> > -   True > -    translatable="yes">Generate new policy module > -   gtk- > new > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_new_clicked" last_modification_time="Sat, 17 Mar 2007 > 15:53:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton23"> > -   True > -    translatable="yes">Load policy module > -   gtk- > add > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:27:03 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="toolbutton25"> > -   True > -    translatable="yes">Remove loadable policy module > -   gtk- > remove > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - > -   True > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > - > -    > -      id="vseparator2"> > -        name="width_request">10 > -        name="visible">True > -      > -    > - > - > -   False > -    name="homogeneous">False > - > -        > - > -        > - id="enableAuditButton"> > -   True > -    translatable="yes">Enable/Disable additional audit rules, that are > normally not reported in the log files. > -    translatable="yes">Enable Audit > -    name="use_underline">True > -   gtk-zoom- > in > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_disable_audit_clicked" last_modification_time="Wed, 15 > Nov 2006 16:29:34 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="modulesFilterEntry"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_booleansFilter_changed" last_modification_time="Fri, 06 > Apr 2007 12:39:26 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       5 > -       False > -       True > -      > -    > - > -    > -      id="scrolledwindow15"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - id="modulesView"> > -   True > -    translatable="yes">Policy Module > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label44 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > - > -        > - > -   True > -   False > -   0 > - > -    > -      > -       True > -        name="orientation">GTK_ORIENTATION_HORIZONTAL > -        name="toolbar_style">GTK_TOOLBAR_BOTH > -       True > -       True > - > -        > - id="permissiveButton"> > -   True > -    translatable="yes">Change process mode to permissive. > -    translatable="yes">Permissive > -    name="use_underline">True > -   gtk-dialog- > warning > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:27:03 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > - > -        > - id="enforcingButton"> > -   True > -    translatable="yes">Change process mode to enforcing > -    translatable="yes">Enforcing > -    name="use_underline">True > -   gtk-dialog- > error > -    name="visible_horizontal">True > -    name="visible_vertical">True > -    name="is_important">False > -    handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 > 18:26:29 GMT"/> > - > - > -   False > -    name="homogeneous">True > - > -        > -      > -      > -       0 > -       False > -       False > -      > -    > - > -    > -      > -       True > -       False > -       0 > - > -        > - > -   True > -    translatable="yes">Filter > -    name="use_underline">False > -    name="use_markup">False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -    name="selectable">False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -    name="single_line_mode">False > -   0 > - > - > -   10 > -   False > -   False > - > -        > - > -        > - id="domainsFilterEntry"> > -   True > -   True > -   True > -    name="visibility">True > -   0 > -    translatable="yes"> > -   True > -    name="invisible_char">• > -    name="activates_default">False > -    handler="on_booleansFilter_changed" last_modification_time="Fri, 06 > Apr 2007 12:39:26 GMT"/> > - > - > -   0 > -   True > -   True > - > -        > -      > -      > -       5 > -       False > -       True > -      > -    > - > -    > -      id="scrolledwindow20"> > -       True > -       True > -        name="hscrollbar_policy">GTK_POLICY_ALWAYS > -        name="vscrollbar_policy">GTK_POLICY_ALWAYS > -        name="shadow_type">GTK_SHADOW_NONE > -        name="window_placement">GTK_CORNER_TOP_LEFT > - > -        > - id="domainsView"> > -   True > -    translatable="yes">Process Domain > -   True > -    name="headers_visible">True > -    name="rules_hint">False > -    name="reorderable">False > -    name="enable_search">True > -    name="fixed_height_mode">False > -    name="hover_selection">False > -    name="hover_expand">False > - > -        > -      > -      > -       0 > -       True > -       True > -      > -    > - > - > -   False > -   True > - > -        > - > -        > - > -   True > -    translatable="yes">label59 > -   False > -   False > -    name="justify">GTK_JUSTIFY_LEFT > -   False > -   False > -   0.5 > -   0.5 > -   0 > -   0 > -    name="ellipsize">PANGO_ELLIPSIZE_NONE > -   -1 > -   False > -   0 > - > - > -   tab > - > -        > -      > -      > -       True > -       True > -      > -    > - > -       > -     > -     > -      0 > -      True > -      True > -     > -   > - > -   > -     > -      True > -      True > -      True > -     > -     > -      0 > -      True > -      True > -     > -   > - > - > - > diff --git a/gui/system-config-selinux.py b/gui/system-config- > selinux.py > index ed41e981efb1..ce7c74b1333c 100644 > --- a/gui/system-config-selinux.py > +++ b/gui/system-config-selinux.py > @@ -20,20 +20,19 @@ >  # along with this program; if not, write to the Free Software >  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >  # > +import os >  import signal > -import string >  import sys > +import gi > +gi.require_version('Gtk', '3.0') >  try: > -    import gtk > +    from gi.repository import Gtk >  except RuntimeError as e: >      print("system-config-selinux:", e) >      print("This is a graphical application and requires DISPLAY to > be set.") >      sys.exit(1) >   > -import gtk.glade > -import os > -import gobject > -import gnome > +from gi.repository import GObject >  import statusPage >  import booleansPage >  import loginsPage > @@ -64,8 +63,6 @@ except: >          import __builtin__ >          __builtin__.__dict__['_'] = unicode >   > -gnome.program_init("SELinux Management Tool", "5") > - >  version = "1.0" >   >  sys.path.append('/usr/share/system-config-selinux') > @@ -74,10 +71,12 @@ sys.path.append('/usr/share/system-config- > selinux') >  ## >  ## Pull in the Glade file >  ## > -if os.access("system-config-selinux.glade", os.F_OK): > -    xml = gtk.glade.XML("system-config-selinux.glade", > domain=PROGNAME) > +xml = Gtk.Builder() > +xml.set_translation_domain(PROGNAME) > +if os.access("system-config-selinux.ui", os.F_OK): > +    xml.add_from_file("system-config-selinux.ui") >  else: > -    xml = gtk.glade.XML("/usr/share/system-config-selinux/system- > config-selinux.glade", domain=PROGNAME) > +    xml.add_from_file("/usr/share/system-config-selinux/system- > config-selinux.ui") >   >   >  class childWindow: > @@ -85,11 +84,16 @@ class childWindow: >      def __init__(self): >          self.tabs = [] >          self.xml = xml > -        xml.signal_connect("on_quit_activate", self.destroy) > -        xml.signal_connect("on_delete_clicked", self.delete) > -        xml.signal_connect("on_add_clicked", self.add) > -        xml.signal_connect("on_properties_clicked", self.properties) > -        xml.signal_connect("on_local_clicked", > self.on_local_clicked) > +        xml.connect_signals({ > +            "on_quit_activate": self.destroy, > +            "on_delete_clicked": self.delete, > +            "on_add_clicked": self.add, > +            "on_properties_clicked": self.properties, > +            "on_local_clicked": self.on_local_clicked, > +            "on_policy_activate": self.policy, > +            "on_logging_activate": self.logging, > +            "on_about_activate": self.on_about_activate, > +        }) >          self.add_page(statusPage.statusPage(xml)) >          if selinux.is_selinux_enabled() > 0: >              try: > @@ -103,20 +107,15 @@ class childWindow: >              except ValueError as e: >                  self.error(e.message) >   > -        xml.signal_connect("on_quit_activate", self.destroy) > -        xml.signal_connect("on_policy_activate", self.policy) > -        xml.signal_connect("on_logging_activate", self.logging) > -        xml.signal_connect("on_about_activate", > self.on_about_activate) > - > -        self.add_menu = xml.get_widget("add_menu_item") > -        self.properties_menu = > xml.get_widget("properties_menu_item") > -        self.delete_menu = xml.get_widget("delete_menu_item") > +        self.add_menu = xml.get_object("add_menu_item") > +        self.properties_menu = > xml.get_object("properties_menu_item") > +        self.delete_menu = xml.get_object("delete_menu_item") >   >      def error(self, message): > -        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, > -                                gtk.BUTTONS_CLOSE, > +        dlg = Gtk.MessageDialog(None, 0, Gtk.MessageType.ERROR, > +                                Gtk.ButtonsType.CLOSE, >                                  message) > -        dlg.set_position(gtk.WIN_POS_MOUSE) > +        dlg.set_position(Gtk.WindowPosition.MOUSE) >          dlg.show_all() >          dlg.run() >          dlg.destroy() > @@ -143,12 +142,12 @@ class childWindow: >          self.tabs[self.notebook.get_current_page()].on_local_clicked > (button) >   >      def on_about_activate(self, args): > -        dlg = xml.get_widget("aboutWindow") > +        dlg = xml.get_object("aboutWindow") >          dlg.run() >          dlg.hide() >   >      def destroy(self, args): > -        gtk.main_quit() > +        Gtk.main_quit() >   >      def use_menus(self, use_menus): >          self.add_menu.set_sensitive(use_menus) > @@ -166,13 +165,13 @@ class childWindow: >   >      def setupScreen(self): >          # Bring in widgets from glade file. > -        self.mainWindow = self.xml.get_widget("mainWindow") > -        self.notebook = self.xml.get_widget("notebook") > -        self.view = self.xml.get_widget("selectView") > +        self.mainWindow = self.xml.get_object("mainWindow") > +        self.notebook = self.xml.get_object("notebook") > +        self.view = self.xml.get_object("selectView") >          self.view.get_selection().connect("changed", > self.itemSelected) > -        self.store = gtk.ListStore(gobject.TYPE_STRING) > +        self.store = Gtk.ListStore(GObject.TYPE_STRING) >          self.view.set_model(self.store) > -        col = gtk.TreeViewColumn("", gtk.CellRendererText(), text=0) > +        col = Gtk.TreeViewColumn("", Gtk.CellRendererText(), text=0) >          col.set_resizable(True) >          self.view.append_column(col) >   > @@ -189,7 +188,7 @@ class childWindow: >          self.mainWindow.connect("destroy", self.destroy) >   >          self.mainWindow.show_all() > -        gtk.main() > +        Gtk.main() >   >  if __name__ == "__main__": >      signal.signal(signal.SIGINT, signal.SIG_DFL) > diff --git a/gui/system-config-selinux.ui b/gui/system-config- > selinux.ui > new file mode 100644 > index 000000000000..c3f261a10d8d > --- /dev/null > +++ b/gui/system-config-selinux.ui > @@ -0,0 +1,2043 @@ > + > + > + > + > +   > +   > +    system-config-selinux > +    False > +    5 > +    normal > +    Copyright (c)2006 > Red Hat, Inc. > +Copyright (c) 2006 Dan Walsh <dwalsh@redhat.com> > +    Daniel Walsh <dwalsh@redhat.com> > + > +     comments="TRANSLATORS: Replace this string with your names, one name > per line.">translator-credits > +    system-config-selinux.png > +     > +       > +        False > +         > +           > +            False > +           > +           > +            False > +            False > +            0 > +           > +         > +       > +     > +     > +       > +     > +   > +   > +    True > +    False > +    gtk-add > +   > +   > +    True > +    False > +    gtk-properties > +   > +   > +    True > +    False > +    gtk-delete > +   > +   > +    False > +    Add SELinux Login > Mapping > +    dialog > +     > +       > +        True > +        False > +         > +           > +            True > +            False > +            end > +             > +               > +                gtk-cancel > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                0 > +               > +             > +             > +               > +                gtk-ok > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                1 > +               > +             > +           > +           > +            False > +            True > +            end > +            0 > +           > +         > +         > +           > +            True > +            False > +            vertical > +             > +               > +                True > +                False > +                4 > +                6 > +                 > +                   > +                    True > +                    False > +                    Login > Name > +                   > +                   > +                    0 > +                    0 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">SELinux User > +                   > +                   > +                    0 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">MLS/MCS Range > +                   > +                   > +                    0 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    0 > +                   > +                 > +                 > +                   id="loginsSelinuxUserCombo"> > +                    True > +                    False > +                   > +                   > +                    1 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    2 > +                   > +                 > +               > +               > +                True > +                True > +                5 > +                0 > +               > +             > +           > +           > +            True > +            True > +            1 > +           > +         > +       > +     > +     > +      cancelbutton1 > +      okbutton1 > +     > +     > +       > +     > +   > +   > +     > +       > +       > +     > +     > +       > +        tcp > +       > +       > +        udp > +       > +     > +   > +   > +    False > +    Add SELinux Network > Ports > +    dialog > +     > +       > +        True > +        False > +         > +           > +            True > +            False > +            end > +             > +               > +                gtk-cancel > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                0 > +               > +             > +             > +               > +                gtk-ok > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                1 > +               > +             > +           > +           > +            False > +            True > +            end > +            0 > +           > +         > +         > +           > +            True > +            False > +            vertical > +             > +               > +                True > +                False > +                4 > +                6 > +                 > +                   > +                    True > +                    False > +                    Port > Number > +                   > +                   > +                    0 > +                    0 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">Protocol > +                   > +                   > +                    0 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">SELinux Type > +                   > +                   > +                    0 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    0 > +                   > +                 > +                 > +                   id="portsProtocolCombo"> > +                    True > +                    False > +                    model1 > +                     > +                       id="renderer1"/> > +                       > +                        0 > +                       > +                     > +                   > +                   > +                    1 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">MLS/MCS > +Level > +                   > +                   > +                    0 > +                    3 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    3 > +                   > +                 > +               > +               > +                True > +                True > +                5 > +                0 > +               > +             > +           > +           > +            True > +            True > +            1 > +           > +         > +       > +     > +     > +      button1 > +      button2 > +     > +     > +       > +     > +   > +   > +     > +       > +       > +     > +     > +       > +        all files > +       > +       > +        regular file > +       > +       > +        directory > +       > +       > +        character device > +       > +       > +        block device > +       > +       > +        socket file > +       > +       > +        symbolic link > +       > +       > +        named pipe > +       > +     > +   > +   > +    False > +    Add SELinux Login > Mapping > +    dialog > +     > +       > +        True > +        False > +         > +           > +            True > +            False > +            end > +             > +               > +                gtk-cancel > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                0 > +               > +             > +             > +               > +                gtk-ok > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                1 > +               > +             > +           > +           > +            False > +            True > +            end > +            0 > +           > +         > +         > +           > +            True > +            False > +            vertical > +             > +               > +                True > +                False > +                4 > +                6 > +                 > +                   > +                    True > +                    False > +                    File > Specification > +                   > +                   > +                    0 > +                    0 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    File > Type > +                   > +                   > +                    0 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">SELinux Type > +                   > +                   > +                    0 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    0 > +                   > +                 > +                 > +                   id="fcontextFileTypeCombo"> > +                    True > +                    False > +                    model2 > +                     > +                       id="renderer2"/> > +                       > +                        0 > +                       > +                     > +                   > +                   > +                    1 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">MLS > +                   > +                   > +                    0 > +                    3 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    3 > +                   > +                 > +               > +               > +                True > +                True > +                5 > +                0 > +               > +             > +           > +           > +            True > +            True > +            1 > +           > +         > +       > +     > +     > +      button5 > +      button6 > +     > +     > +       > +     > +   > +   > +     > +       > +       > +     > +     > +       > +        Disabled > +       > +       > +        Permissive > +       > +       > +        Enforcing > +       > +     > +   > +   > +    False > +    SELinux > Administration > +    800 > +    500 > +    system-config-selinux.png > +     > +       > +        True > +        False > +        vertical > +         > +           > +            True > +            False > +             > +               > +                True > +                False > +                 translatable="yes">_File > +                True > +                 > +                   > +                    True > +                    False > +                     > +                       id="add_menu_item"> > +                         translatable="yes">_Add > +                        True > +                        False > +                         name="use_underline">True > +                        image13 > +                        False > +                         handler="on_add_clicked" swapped="no"/> > +                         modifiers="GDK_CONTROL_MASK"/> > +                       > +                     > +                     > +                       id="properties_menu_item"> > +                         translatable="yes">_Properties > +                        True > +                        False > +                         name="use_underline">True > +                        image14 > +                        False > +                         handler="on_properties_clicked" swapped="no"/> > +                         modifiers="GDK_CONTROL_MASK"/> > +                       > +                     > +                     > +                       id="delete_menu_item"> > +                         translatable="yes">_Delete > +                        True > +                        False > +                         name="use_underline">True > +                        image15 > +                        False > +                         signal="activate"/> > +                       > +                     > +                     > +                       > +                        gtk-quit > +                        True > +                        False > +                         name="use_underline">True > +                        True > +                         handler="on_quit_activate" swapped="no"/> > +                       > +                     > +                   > +                 > +               > +             > +             > +               > +                True > +                False > +                 translatable="yes">_Help > +                True > +                 > +                   > +                    True > +                    False > +                     > +                       > +                        gtk-about > +                        True > +                        False > +                         name="use_underline">True > +                        True > +                         handler="on_about_activate" swapped="no"/> > +                       > +                     > +                   > +                 > +               > +             > +           > +           > +            False > +            True > +            0 > +           > +         > +         > +           > +            True > +            True > +             > +               > +                True > +                False > +                5 > +                0 > +                none > +                 > +                   > +                    True > +                    False > +                    12 > +                     > +                       > +                        True > +                        True > +                         translatable="yes">Select Management Object > +                         name="headers_visible">False > +                         > +                           > +                         > +                       > +                     > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes"><b>Select:</b> > +                    True > +                   > +                 > +               > +               > +                True > +                False > +               > +             > +             > +               > +                True > +                False > +                False > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                        5 > +                        5 > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">System Default Enforcing Mode > +                           > +                           > +                             name="left_attach">0 > +                            0 > +                           > +                         > +                         > +                           id="enabledOptionMenu"> > +                            True > +                             name="can_focus">False > +                            True > +                            model3 > +                             > +                               id="renderer3"/> > +                               > +                                0 > +                               > +                             > +                           > +                           > +                             name="left_attach">1 > +                            0 > +                           > +                         > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Current Enforcing Mode > +                           > +                           > +                             name="left_attach">0 > +                            1 > +                           > +                         > +                         > +                           id="currentOptionMenu"> > +                            True > +                             name="can_focus">False > +                            True > +                           > +                           > +                             name="left_attach">1 > +                            1 > +                           > +                         > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">System Default Policy Type: > +                           > +                           > +                             name="left_attach">0 > +                            2 > +                           > +                         > +                         > +                           id="selinuxTypeOptionMenu"> > +                            True > +                             name="can_focus">False > +                            True > +                           > +                           > +                             name="left_attach">1 > +                            2 > +                           > +                         > +                         > +                           id="relabelCheckbutton"> > +                            True > +                             name="can_focus">True > +                             name="receives_default">False > +                             translatable="yes">Select if you wish to relabel then entire file > system on next reboot.  Relabeling can take a very long time, > depending on the size of the system.  If you are changing policy > types or going from disabled to enforcing, a relabel is > required. > +                             name="hexpand">False > +                             name="draw_indicator">True > +                             > +                               id="alignment4"> > +                                 name="visible">True > +                                 name="can_focus">False > +                                 name="hexpand">True > +                                0 > +                                0 > +                                 > +                                   > +                                     name="visible">True > +                                     name="can_focus">False > +                                     name="hexpand">True > +                                     name="spacing">2 > +                                     > +                                       id="image2"> > +                                         name="visible">True > +                                         name="can_focus">False > +                                        gtk- > refresh > +                                       > +                                       > +                                         name="expand">False > +                                         name="fill">False > +                                         name="position">0 > +                                       > +                                     > +                                     > +                                       id="label49"> > +                                         name="visible">True > +                                         name="can_focus">False > +                                         translatable="yes">Relabel on next reboot. > +                                         name="use_underline">True > +                                       > +                                       > +                                         name="expand">False > +                                         name="fill">False > +                                         name="position">1 > +                                       > +                                     > +                                   > +                                 > +                               > +                             > +                           > +                           > +                             name="left_attach">0 > +                            3 > +                            2 > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        end > +                        0 > +                       > +                     > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="booleanRevertButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Revert boolean setting to system > default > +                            gtk-revert-to- > saved > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton34"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Toggle between Customized and All > Booleans > +                             translatable="yes">Customized > +                             name="use_underline">True > +                            gtk- > find > +                             handler="on_local_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="booleansFilter"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        True > +                        10 > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow18"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="booleansView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">Boolean > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="toolbutton5"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Add File Context > +                            gtk- > add > +                             handler="on_add_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton6"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Modify File Context > +                            gtk- > properties > +                             handler="on_properties_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton7"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Delete File Context > +                            gtk- > delete > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="customizedButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Toggle between all and customized file > context > +                             translatable="yes">Customized > +                             name="use_underline">True > +                            gtk- > find > +                             handler="on_local_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="fcontextFilterEntry"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow19"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="fcontextView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">File Labeling > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="toolbutton8"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Add SELinux User Mapping > +                            gtk- > add > +                             handler="on_add_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton29"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Modify SELinux User Mapping > +                            gtk- > properties > +                             handler="on_properties_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton10"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Delete SELinux User Mapping > +                            gtk- > delete > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="loginsFilterEntry"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        True > +                        5 > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow16"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="loginsView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">User Mapping > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    3 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="toolbutton14"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Add User > +                            gtk- > add > +                             handler="on_add_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton15"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Modify User > +                            gtk- > properties > +                             handler="on_properties_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton16"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Delete User > +                            gtk- > delete > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="usersFilterEntry"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        True > +                        5 > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow11"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="usersView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">SELinux User > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    4 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="portsAddButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Add Network Port > +                            gtk- > add > +                             handler="on_add_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="portsPropertiesButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Edit Network Port > +                            gtk- > properties > +                             handler="on_properties_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="portsDeleteButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Delete Network Port > +                            gtk- > delete > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolitem2"> > +                            True > +                             name="can_focus">False > +                             > +                               id="vseparator1"> > +                                 name="width_request">32 > +                                 name="visible">True > +                                 name="can_focus">False > +                                 name="orientation">vertical > +                               > +                             > +                           > +                           > +                            False > +                             name="homogeneous">False > +                           > +                         > +                         > +                           id="listViewButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Toggle between Customized and All Ports > +                             translatable="yes">Group View > +                             name="use_underline">True > +                            gtk- > indent > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton35"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Toggle between Customized and All Ports > +                             translatable="yes">Customized > +                             name="use_underline">True > +                            gtk- > find > +                             handler="on_local_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="portsFilterEntry"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        True > +                        5 > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow13"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="portsView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">Network Port > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    5 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="newModuleButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Generate new policy module > +                            gtk- > new > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton23"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Load policy module > +                            gtk- > add > +                             handler="on_add_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolbutton25"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Remove loadable policy module > +                            gtk- > remove > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="toolitem3"> > +                            True > +                             name="can_focus">False > +                             > +                               id="vseparator2"> > +                                 name="width_request">10 > +                                 name="visible">True > +                                 name="can_focus">False > +                                 name="orientation">vertical > +                               > +                             > +                           > +                           > +                            False > +                             name="homogeneous">False > +                           > +                         > +                         > +                           id="enableAuditButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Enable/Disable additional audit rules, that are > normally not reported in the log files. > +                             translatable="yes">Enable Audit > +                             name="use_underline">True > +                            gtk-zoom- > in > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="modulesFilterEntry"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        True > +                        5 > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow15"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="modulesView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">Policy Module > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    6 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                    vertical > +                     > +                       > +                        True > +                        False > +                         name="toolbar_style">both > +                         > +                           id="permissiveButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Change process mode to permissive. > +                             translatable="yes">Permissive > +                             name="use_underline">True > +                            gtk-dialog- > warning > +                             handler="on_add_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                         > +                           id="enforcingButton"> > +                            True > +                             name="can_focus">False > +                             translatable="yes">Change process mode to enforcing > +                             translatable="yes">Enforcing > +                             name="use_underline">True > +                            gtk-dialog- > error > +                             handler="on_delete_clicked" swapped="no"/> > +                           > +                           > +                            False > +                             name="homogeneous">True > +                           > +                         > +                       > +                       > +                        False > +                        False > +                        0 > +                       > +                     > +                     > +                       > +                        True > +                        False > +                         > +                           > +                            True > +                             name="can_focus">False > +                             translatable="yes">Filter > +                           > +                           > +                            False > +                            False > +                            10 > +                            0 > +                           > +                         > +                         > +                           id="domainsFilterEntry"> > +                            True > +                             name="can_focus">True > +                             name="invisible_char">• > +                           > +                           > +                            True > +                            True > +                            1 > +                           > +                         > +                       > +                       > +                        False > +                        True > +                        5 > +                        1 > +                       > +                     > +                     > +                       id="scrolledwindow20"> > +                        True > +                        True > +                         name="hscrollbar_policy">always > +                         name="vscrollbar_policy">always > +                         > +                           id="domainsView"> > +                            True > +                             name="can_focus">True > +                             translatable="yes">Process Domain > +                             > +                               > +                             > +                           > +                         > +                       > +                       > +                        True > +                        True > +                        2 > +                       > +                     > +                   > +                   > +                    7 > +                   > +                 > +               > +               > +                True > +                True > +               > +             > +           > +           > +            True > +            True > +            1 > +           > +         > +         > +           > +            True > +            False > +            10 > +            10 > +            10 > +            10 > +            6 > +            6 > +            vertical > +            2 > +           > +           > +            False > +            False > +            2 > +           > +         > +       > +     > +     > +       > +     > +   > +   > +    False > +    Add SELinux > User > +    dialog > +     > +       > +        True > +        False > +         > +           > +            True > +            False > +            end > +             > +               > +                gtk-cancel > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                0 > +               > +             > +             > +               > +                gtk-ok > +                True > +                True > +                True > +                False > +                True > +               > +               > +                True > +                True > +                1 > +               > +             > +           > +           > +            False > +            True > +            end > +            0 > +           > +         > +         > +           > +            True > +            False > +            vertical > +             > +               > +                True > +                False > +                4 > +                6 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">SELinux User > +                   > +                   > +                    0 > +                    0 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">MLS/MCS Range > +                   > +                   > +                    0 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    1 > +                   > +                 > +                 > +                   > +                    True > +                    False > +                     translatable="yes">SELinux Roles > +                   > +                   > +                    0 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    2 > +                   > +                 > +                 > +                   > +                    True > +                    True > +                    * > +                   > +                   > +                    1 > +                    0 > +                   > +                 > +               > +               > +                True > +                True > +                5 > +                0 > +               > +             > +           > +           > +            True > +            True > +            1 > +           > +         > +       > +     > +     > +      button7 > +      button8 > +     > +     > +       > +     > +   > + > diff --git a/gui/usersPage.py b/gui/usersPage.py > index 75b054737088..9d09bda2171f 100644 > --- a/gui/usersPage.py > +++ b/gui/usersPage.py > @@ -16,17 +16,13 @@ >  ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >   >  ## Author: Dan Walsh > -import string > -import gtk > -import gtk.glade > -import os > -import gobject >  import sys >  try: >      from subprocess import getstatusoutput >  except ImportError: >      from commands import getstatusoutput >   > +from gi.repository import GObject, Gtk >  import seobject >  from semanagePage import * >   > @@ -57,27 +53,27 @@ class usersPage(semanagePage): >      def __init__(self, xml): >          semanagePage.__init__(self, xml, "users", _("SELinux User")) >   > -        self.store = gtk.ListStore(gobject.TYPE_STRING, > gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, > gobject.TYPE_STRING) > +        self.store = Gtk.ListStore(GObject.TYPE_STRING, > GObject.TYPE_STRING, GObject.TYPE_STRING, GObject.TYPE_STRING, > GObject.TYPE_STRING) >          self.view.set_model(self.store) > -        self.store.set_sort_column_id(0, gtk.SORT_ASCENDING) > +        self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) >   > -        col = gtk.TreeViewColumn(_("SELinux\nUser"), > gtk.CellRendererText(), text=0) > +        col = Gtk.TreeViewColumn(_("SELinux\nUser"), > Gtk.CellRendererText(), text=0) >          col.set_sort_column_id(0) >          col.set_resizable(True) >          self.view.append_column(col) >   > -        col = gtk.TreeViewColumn(_("MLS/\nMCS Range"), > gtk.CellRendererText(), text=1) > +        col = Gtk.TreeViewColumn(_("MLS/\nMCS Range"), > Gtk.CellRendererText(), text=1) >          col.set_resizable(True) >          self.view.append_column(col) >   > -        col = gtk.TreeViewColumn(_("SELinux Roles"), > gtk.CellRendererText(), text=2) > +        col = Gtk.TreeViewColumn(_("SELinux Roles"), > Gtk.CellRendererText(), text=2) >          col.set_resizable(True) >          self.view.append_column(col) >   >          self.load() > -        self.selinuxUserEntry = xml.get_widget("selinuxUserEntry") > -        self.mlsRangeEntry = xml.get_widget("mlsRangeEntry") > -        self.selinuxRolesEntry = xml.get_widget("selinuxRolesEntry") > +        self.selinuxUserEntry = xml.get_object("selinuxUserEntry") > +        self.mlsRangeEntry = xml.get_object("mlsRangeEntry") > +        self.selinuxRolesEntry = xml.get_object("selinuxRolesEntry") >   >      def load(self, filter=""): >          self.filter = filter > @@ -96,7 +92,7 @@ class usersPage(semanagePage): >          self.view.get_selection().select_path((0,)) >   >      def delete(self): > -        if semanagePage.delete(self) == gtk.RESPONSE_NO: > +        if semanagePage.delete(self) == Gtk.ResponseType.NO: >              return None >   >      def dialogInit(self):