diff --git a/gui/Makefile b/gui/Makefile index d26f0000..a72e58ce 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -12,7 +12,7 @@ fcontextPage.py \ html_util.py \ loginsPage.py \ modulesPage.py \ -polgen.glade \ +polgen.ui \ portsPage.py \ semanagePage.py \ statusPage.py \ diff --git a/gui/polgen.glade b/gui/polgen.ui similarity index 81% rename from gui/polgen.glade rename to gui/polgen.ui index 37c14723..aa4c70af 100644 --- a/gui/polgen.glade +++ b/gui/polgen.ui @@ -1,8 +1,8 @@ - - + + - + False 5 normal @@ -10,14 +10,14 @@ www.redhat.com GPL Daniel Walsh <dwalsh@redhat.com> - translator-credits + translator-credits - + False - + False - + False True @@ -25,10 +25,10 @@ 0 - + - - + + False 12 Add Booleans Dialog @@ -36,25 +36,24 @@ 400 dialog - + True False 6 - + True False end - + gtk-cancel - -6 True True True False True - + False False @@ -62,22 +61,21 @@ - + gtk-add - -5 True True True False True - + False False 1 - + False True @@ -86,7 +84,7 @@ - + True False 2 @@ -94,24 +92,24 @@ 12 6 - + True False 0 Boolean Name - + GTK_FILL - + True False 0 Description - + 1 2 @@ -120,15 +118,15 @@ - + True True - + False False True True - + 1 2 @@ -136,15 +134,15 @@ - + True True - + False False True True - + 1 2 @@ -153,17 +151,21 @@ - + True True 1 - + - - + + cancelbutton1 + okbutton1 + + + False 5 mouse @@ -171,25 +173,24 @@ True True - + True False 24 - + True False end - + gtk-cancel - -6 True True True False True - + False False @@ -197,23 +198,22 @@ - + gtk-add - -5 True True True True False True - + False False 1 - + False True @@ -221,36 +221,40 @@ 0 - + - - + + button5 + button6 + + + True False SELinux Policy Generation Tool - + True False 18 - + True False left False - + True False - + True False 0 <b>Select the policy type for the application or user role you want to confine:</b> True - + False False @@ -259,31 +263,31 @@ - + True False - + True False - + True False 12 - + True False 6 - + True False 0 <b>Applications</b> True - + False False @@ -291,15 +295,15 @@ - + True False - + True False - + False False @@ -307,20 +311,20 @@ - + True False 6 - + Standard Init Daemon True True False - Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d + Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d True True - + False False @@ -328,16 +332,16 @@ - + DBUS System Daemon True True False - Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d + Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d True True init_radiobutton - + False False @@ -345,16 +349,16 @@ - + Internet Services Daemon (inetd) True True False - Internet Services Daemon are daemons started by xinetd + Internet Services Daemon are daemons started by xinetd True True init_radiobutton - + False False @@ -362,16 +366,16 @@ - + Web Application/Script (CGI) True True False - Web Applications/Script (CGI) CGI scripts started by the web server (apache) + Web Applications/Script (CGI) CGI scripts started by the web server (apache) True True init_radiobutton - + False False @@ -379,16 +383,16 @@ - + User Application True True False - User Application are any application that you would like to confine that is started by a user + User Application are any application that you would like to confine that is started by a user True True init_radiobutton - + False False @@ -396,37 +400,37 @@ - + Sandbox True True False - User Application are any application that you would like to confine that is started by a user + User Application are any application that you would like to confine that is started by a user True True init_radiobutton - + False False 5 - + False False 1 - + True True 1 - + False True @@ -434,18 +438,18 @@ - + True False 6 - + True False 0 <b>Login Users</b> True - + False False @@ -453,15 +457,15 @@ - + True False - + True False - + False False @@ -469,21 +473,21 @@ - + True False 6 - + Existing User Roles True True False - Modify an existing login user record. + Modify an existing login user record. True True init_radiobutton - + False False @@ -491,16 +495,16 @@ - + Minimal Terminal User Role True True False - This user will login to a machine only via a terminal or remote login. By default this user will have no setuid, no networking, no su, no sudo. + This user will login to a machine only via a terminal or remote login. By default this user will have no setuid, no networking, no su, no sudo. True True init_radiobutton - + False False @@ -508,16 +512,16 @@ - + Minimal X Windows User Role True True False - This user can login to a machine via X or terminal. By default this user will have no setuid, no networking, no sudo, no su + This user can login to a machine via X or terminal. By default this user will have no setuid, no networking, no sudo, no su True True init_radiobutton - + False False @@ -525,16 +529,16 @@ - + User Role True True False - User with full networking, no setuid applications without transition, no sudo, no su. + User with full networking, no setuid applications without transition, no sudo, no su. True True init_radiobutton - + False False @@ -542,37 +546,37 @@ - + Admin User Role True True False - User with full networking, no setuid applications without transition, no su, can sudo to Root Administration Roles + User with full networking, no setuid applications without transition, no su, can sudo to Root Administration Roles True True init_radiobutton - + False False 4 - + True False 1 - + True True 1 - + False True @@ -580,18 +584,18 @@ - + True False 6 - + True False 0 <b>Root Users</b> True - + False False @@ -599,15 +603,15 @@ - + True False - + True False - + False False @@ -615,96 +619,92 @@ - + True False - + Root Admin User Role True True False - Select Root Administrator User Role, if this user will be used to administer the machine while running as root. This user will not be able to login to the system directly. + Select Root Administrator User Role, if this user will be used to administer the machine while running as root. This user will not be able to login to the system directly. True True init_radiobutton - + False False 0 - + False False 1 - + True True 1 - + True True 2 - + True True 0 - + True True 0 - + True True 1 - - - True - + - - + + True False Main Tab - + False - tab - + True False - + True False 0 <b>Enter name of application or user role:</b> True - + False False @@ -713,7 +713,7 @@ - + True False 3 @@ -721,28 +721,28 @@ 12 6 - + True False 0 Name - + GTK_FILL - + True True - Enter complete path for executable to be confined. - + Enter complete path for executable to be confined. + False False True True - + 1 2 @@ -752,14 +752,14 @@ - + ... True True False True - - + + 2 3 @@ -770,16 +770,16 @@ - + True True - Enter unique name for the confined application or user role. - + Enter unique name for the confined application or user role. + False False True True - + 1 3 @@ -787,12 +787,12 @@ - + True False 0 Executable - + 1 2 @@ -801,12 +801,12 @@ - + True False 0 Init script - + 2 3 @@ -815,16 +815,16 @@ - + True True - Enter complete path to init script used to start the confined application. - + Enter complete path to init script used to start the confined application. + False False True True - + 1 2 @@ -834,14 +834,14 @@ - + ... True True False True - - + + 2 3 @@ -851,42 +851,38 @@ - + True True 1 - - - 1 - + - - + + True False Name Tab - + 1 False - tab - + True False - + True False 0 <b>Select existing role to modify:</b> True - + False False @@ -895,56 +891,52 @@ - + True True automatic automatic in - + True True - Select the user roles that will transiton to the %s domain. + Select the user roles that will transiton to the %s domain. False - + - + True True 1 - - - 2 - + - - + + True False role tab - + 2 False - tab - + True False - + True False 0 <b>Select roles that %s will transition to:</b> True - + False False @@ -953,54 +945,50 @@ - + True True - + True True - Select applications domains that %s will transition to. + Select applications domains that %s will transition to. False - + - + True True 1 - - - 3 - + - - + + True False transition role tab - + 3 False - tab - + True False - + True False 0 <b>Select the user_roles that will transition to %s:</b> True - + False False @@ -1009,53 +997,49 @@ role tab - + True True - + True True - Select the user roles that will transiton to this applications domains. + Select the user roles that will transiton to this applications domains. False - + - + True True 1 - - - 4 - + - - + + True False User Tab - + 4 False - tab - + True False - + True False 0 <b>Select domains that %s will administer:</b> True - + False False @@ -1064,53 +1048,49 @@ role tab - + True True - + True True - Select the domains that you would like this user administer. + Select the domains that you would like this user administer. False - + - + True True 1 - - - 5 - + - - + + True False Admin Tab - + 5 False - tab - + True False - + True False 0 <b>Select additional roles for %s:</b> True - + False False @@ -1119,53 +1099,49 @@ role tab - + True True - + True True - Select the domains that you would like this user administer. + Select the domains that you would like this user administer. False - + - + True True 1 - - - 6 - + - - + + True False Roles Tab - + 6 False - tab - + True False - + True False 0 <b>Enter network ports that %s binds on:</b> True - + False False @@ -1174,18 +1150,18 @@ role tab - + True False 6 - + True False 0 <b>TCP Ports</b> True - + False False @@ -1193,15 +1169,15 @@ role tab - + True False - + True False - + False False @@ -1209,25 +1185,25 @@ role tab - + True False 6 - + True False 12 - + All True True False - Allows %s to bind to any udp port + Allows %s to bind to any udp port True True - + False False @@ -1236,15 +1212,15 @@ role tab - + 600-1024 True True False - Allow %s to call bindresvport with 0. Binding to port 600-1024 + Allow %s to call bindresvport with 0. Binding to port 600-1024 True True - + False False @@ -1253,15 +1229,15 @@ role tab - + Unreserved Ports (>1024) True True False - Enter a comma separated list of udp ports or ranges of ports that %s binds to. Example: 612, 650-660 + Enter a comma separated list of udp ports or ranges of ports that %s binds to. Example: 612, 650-660 True True - + False False @@ -1269,7 +1245,7 @@ role tab 2 - + True True @@ -1277,17 +1253,17 @@ role tab - + True False 12 - + True False 0 Select Ports - + False False @@ -1296,44 +1272,44 @@ role tab - + True True - Allows %s to bind to any udp ports > 1024 - + Allows %s to bind to any udp ports > 1024 + False False True True - + True True 1 - + True True 1 - + True True 1 - + True True 1 - + True True @@ -1341,18 +1317,18 @@ role tab - + True False 6 - + True False 0 <b>UDP Ports</b> True - + False False @@ -1360,15 +1336,15 @@ role tab - + True False - + True False - + False False @@ -1376,25 +1352,25 @@ role tab - + True False 6 - + True False 12 - + All True True False - Allows %s to bind to any udp port + Allows %s to bind to any udp port True True - + False False @@ -1403,15 +1379,15 @@ role tab - + 600-1024 True True False - Allow %s to call bindresvport with 0. Binding to port 600-1024 + Allow %s to call bindresvport with 0. Binding to port 600-1024 True True - + False False @@ -1420,15 +1396,15 @@ role tab - + Unreserved Ports (>1024) True True False - Enter a comma separated list of udp ports or ranges of ports that %s binds to. Example: 612, 650-660 + Enter a comma separated list of udp ports or ranges of ports that %s binds to. Example: 612, 650-660 True True - + False False @@ -1436,7 +1412,7 @@ role tab 2 - + True True @@ -1444,17 +1420,17 @@ role tab - + True False 12 - + True False 0 Select Ports - + False False @@ -1463,80 +1439,76 @@ role tab - + True True - Allows %s to bind to any udp ports > 1024 - + Allows %s to bind to any udp ports > 1024 + False False True True - + True True 1 - + True True 1 - + True True 1 - + True True 1 - + True True 2 - - - 7 - + - - + + True False Network Bind tab - + 7 False - tab - + True False - + True False 0 <b>Select network ports that %s connects to:</b> True - + False False @@ -1545,18 +1517,18 @@ Bind tab - + True False 6 - + True False 0 <b>TCP Ports</b> True - + False False @@ -1564,15 +1536,15 @@ Bind tab - + True False - + True False - + False False @@ -1580,20 +1552,20 @@ Bind tab - + True False 12 - + All True True False - Allows %s to connect to any tcp port + Allows %s to connect to any tcp port True True - + False False @@ -1602,12 +1574,12 @@ Bind tab - + True False 0 Select Ports - + False False @@ -1616,37 +1588,37 @@ Bind tab - + True True - Enter a comma separated list of tcp ports or ranges of ports that %s connects to. Example: 612, 650-660 - + Enter a comma separated list of tcp ports or ranges of ports that %s connects to. Example: 612, 650-660 + False False True True - + True True 2 - + True True 1 - + True True 1 - + True True @@ -1654,18 +1626,18 @@ Bind tab - + True False 6 - + True False 0 <b>UDP Ports</b> True - + False False @@ -1673,15 +1645,15 @@ Bind tab - + True False - + True False - + False False @@ -1689,20 +1661,20 @@ Bind tab - + True False 12 - + All True True False - Allows %s to connect to any udp port + Allows %s to connect to any udp port True True - + False False @@ -1711,12 +1683,12 @@ Bind tab - + True False 0 Select Ports - + False False @@ -1725,73 +1697,69 @@ Bind tab - + True True - Enter a comma separated list of udp ports or ranges of ports that %s connects to. Example: 612, 650-660 - + Enter a comma separated list of udp ports or ranges of ports that %s connects to. Example: 612, 650-660 + False False True True - + True True 2 - + True True 1 - + True True 1 - + True True 2 - - - 8 - + - - + + True False Network Connect Tab - + 8 False - tab - + True False - + True False 0 <b>Select common application traits for %s:</b> True - + False False @@ -1800,19 +1768,19 @@ Connect Tab - + True False 6 - + Writes syslog messages True True False True True - + False False @@ -1820,14 +1788,14 @@ Connect Tab - + Create/Manipulate temporary files in /tmp True True False True True - + False False @@ -1835,14 +1803,14 @@ Connect Tab - + Uses Pam for authentication True True False True True - + False False @@ -1850,14 +1818,14 @@ Connect Tab - + Uses nsswitch or getpw* calls True True False True True - + False False @@ -1865,14 +1833,14 @@ Connect Tab - + Uses dbus True True False True True - + False False @@ -1880,14 +1848,14 @@ Connect Tab - + Sends audit messages True True False True True - + False False @@ -1895,14 +1863,14 @@ Connect Tab - + Interacts with the terminal True True False True True - + False False @@ -1910,57 +1878,53 @@ Connect Tab - + Sends email True True False True True - + False False 7 - + True True 1 - - - 9 - + - - + + True False Common Tab - + 9 False - tab - + True False - + True False 0 <b>Add files/directories that %s manages</b> True - + False False @@ -1969,38 +1933,38 @@ Tab - + True False 12 - + True False 6 - + True True False - + - + True False 0 0 - + True False 2 - + True False gtk-add - + False False @@ -2008,23 +1972,23 @@ Tab - + True False Add File True - + False False 1 - + - + - + False False @@ -2032,28 +1996,28 @@ Tab - + True True False - + - + True False 0 0 - + True False 2 - + True False gtk-add - + False False @@ -2061,23 +2025,23 @@ Tab - + True False Add Directory True - + False False 1 - + - + - + False False @@ -2085,22 +2049,22 @@ Tab - + gtk-delete True True False True - + - + False False 2 - + False False @@ -2109,63 +2073,59 @@ Tab - + True True automatic automatic in - + True True - Files/Directories which the %s "manages". Pid Files, Log Files, /var/lib Files ... + Files/Directories which the %s "manages". Pid Files, Log Files, /var/lib Files ... False - + - + True True 1 - + True True 1 - - - 10 - + - - + + True False Add Tab - + 10 False - tab - + True False - + True False 0 <b>Add booleans from the %s policy:</b> True - + False False @@ -2174,38 +2134,38 @@ Tab - + True False 12 - + True False 6 - + True True False - + - + True False 0 0 - + True False 2 - + True False gtk-add - + False False @@ -2213,23 +2173,23 @@ Tab - + True False Add Boolean True - + False False 1 - + - + - + False False @@ -2237,22 +2197,22 @@ Tab - + gtk-delete True True False True - + - + False False 1 - + False True @@ -2261,61 +2221,57 @@ Tab - + True True automatic automatic in - + True True - Add/Remove booleans used by the %s domain - + Add/Remove booleans used by the %s domain + - + True True 1 - + True True 1 - - - 11 - + - - + + True False - + 11 False - tab - + True False - + True False 0 <b>Which directory you will generate the %s policy?</b> True - + False False @@ -2323,16 +2279,16 @@ Tab - + True False 12 - + True False Policy Directory - + False False @@ -2341,15 +2297,15 @@ Tab - + True True - + False False True True - + True True @@ -2357,20 +2313,20 @@ Tab - + ... True True False True - + False False 2 - + False False @@ -2378,23 +2334,19 @@ Tab 1 - - - 12 - + - - + + True False - + 12 False - tab - + True True @@ -2402,20 +2354,19 @@ Tab - + True False end - + gtk-cancel True True True False True - - + False False @@ -2423,15 +2374,14 @@ Tab - + gtk-go-back True True True False True - - + False False @@ -2439,22 +2389,21 @@ Tab - + gtk-go-forward True True True False True - - + False False 2 - + False False @@ -2462,7 +2411,7 @@ Tab 1 - + - - + + diff --git a/gui/polgengui.py b/gui/polgengui.py index 09723278..cd73ea6d 100644 --- a/gui/polgengui.py +++ b/gui/polgengui.py @@ -97,10 +97,10 @@ def foreach(model, path, iter, selected): ## xml = Gtk.Builder() xml.set_translation_domain(PROGNAME) -if os.access("polgen.glade", os.F_OK): - xml.add_from_file("polgen.glade") +if os.access("polgen.ui", os.F_OK): + xml.add_from_file("polgen.ui") else: - xml.add_from_file("/usr/share/system-config-selinux/polgen.glade") + xml.add_from_file("/usr/share/system-config-selinux/polgen.ui") FILE = 1 DIR = 2 @@ -125,82 +125,82 @@ class childWindow: def __init__(self): self.xml = xml - self.notebook = xml.get_widget("notebook") + self.notebook = xml.get_object("notebook") self.label_dict = {} self.tooltip_dict = {} - label = xml.get_widget("select_label") + label = xml.get_object("select_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_user_roles_label") + label = xml.get_object("select_user_roles_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_dir_label") + label = xml.get_object("select_dir_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_domain_admin_label") + label = xml.get_object("select_domain_admin_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_in_label") + label = xml.get_object("select_in_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_out_label") + label = xml.get_object("select_out_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_common_label") + label = xml.get_object("select_common_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_manages_label") + label = xml.get_object("select_manages_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("select_booleans_label") + label = xml.get_object("select_booleans_label") self.label_dict[label] = label.get_text() - label = xml.get_widget("existing_user_treeview") + label = xml.get_object("existing_user_treeview") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("transition_treeview") + label = xml.get_object("transition_treeview") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_tcp_all_checkbutton") + label = xml.get_object("in_tcp_all_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_tcp_reserved_checkbutton") + label = xml.get_object("in_tcp_reserved_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_tcp_unreserved_checkbutton") + label = xml.get_object("in_tcp_unreserved_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_tcp_entry") + label = xml.get_object("in_tcp_entry") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_udp_all_checkbutton") + label = xml.get_object("in_udp_all_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_udp_reserved_checkbutton") + label = xml.get_object("in_udp_reserved_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_udp_unreserved_checkbutton") + label = xml.get_object("in_udp_unreserved_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("in_udp_entry") + label = xml.get_object("in_udp_entry") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("out_tcp_entry") + label = xml.get_object("out_tcp_entry") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("out_udp_entry") + label = xml.get_object("out_udp_entry") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("out_tcp_all_checkbutton") + label = xml.get_object("out_tcp_all_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("out_udp_all_checkbutton") + label = xml.get_object("out_udp_all_checkbutton") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("boolean_treeview") + label = xml.get_object("boolean_treeview") self.tooltip_dict[label] = label.get_tooltip_text() - label = xml.get_widget("write_treeview") + label = xml.get_object("write_treeview") self.tooltip_dict[label] = label.get_tooltip_text() try: @@ -216,23 +216,26 @@ class childWindow: self.error(str(e)) self.name = "" - xml.signal_connect("on_delete_clicked", self.delete) - xml.signal_connect("on_delete_boolean_clicked", self.delete_boolean) - xml.signal_connect("on_exec_select_clicked", self.exec_select) - xml.signal_connect("on_init_script_select_clicked", self.init_script_select) - xml.signal_connect("on_add_clicked", self.add) - xml.signal_connect("on_add_boolean_clicked", self.add_boolean) - xml.signal_connect("on_add_dir_clicked", self.add_dir) - xml.signal_connect("on_about_clicked", self.on_about_clicked) - xml.get_widget("cancel_button").connect("clicked", self.quit) - self.forward_button = xml.get_widget("forward_button") + handlers = { + "on_delete_clicked": self.delete, + "on_delete_boolean_clicked": self.delete_boolean, + "on_exec_select_clicked": self.exec_select, + "on_init_script_select_clicked": self.init_script_select, + "on_add_clicked": self.add, + "on_add_boolean_clicked": self.add_boolean, + "on_add_dir_clicked": self.add_dir, + "on_about_clicked": self.on_about_clicked + } + xml.connect_signals(handlers) + xml.get_object("cancel_button").connect("clicked", self.quit) + self.forward_button = xml.get_object("forward_button") self.forward_button.connect("clicked", self.forward) - self.back_button = xml.get_widget("back_button") + self.back_button = xml.get_object("back_button") self.back_button.connect("clicked", self.back) - self.boolean_dialog = xml.get_widget("boolean_dialog") - self.boolean_name_entry = xml.get_widget("boolean_name_entry") - self.boolean_description_entry = xml.get_widget("boolean_description_entry") + self.boolean_dialog = xml.get_object("boolean_dialog") + self.boolean_name_entry = xml.get_object("boolean_name_entry") + self.boolean_description_entry = xml.get_object("boolean_description_entry") self.pages = {} for i in sepolicy.generate.USERS: @@ -251,34 +254,34 @@ class childWindow: self.network_buttons = {} - self.in_tcp_all_checkbutton = xml.get_widget("in_tcp_all_checkbutton") - self.in_tcp_reserved_checkbutton = xml.get_widget("in_tcp_reserved_checkbutton") - self.in_tcp_unreserved_checkbutton = xml.get_widget("in_tcp_unreserved_checkbutton") - self.in_tcp_entry = self.xml.get_widget("in_tcp_entry") + self.in_tcp_all_checkbutton = xml.get_object("in_tcp_all_checkbutton") + self.in_tcp_reserved_checkbutton = xml.get_object("in_tcp_reserved_checkbutton") + self.in_tcp_unreserved_checkbutton = xml.get_object("in_tcp_unreserved_checkbutton") + self.in_tcp_entry = self.xml.get_object("in_tcp_entry") self.network_buttons[self.in_tcp_all_checkbutton] = [self.in_tcp_reserved_checkbutton, self.in_tcp_unreserved_checkbutton, self.in_tcp_entry] - self.out_tcp_all_checkbutton = xml.get_widget("out_tcp_all_checkbutton") - self.out_tcp_reserved_checkbutton = xml.get_widget("out_tcp_reserved_checkbutton") - self.out_tcp_unreserved_checkbutton = xml.get_widget("out_tcp_unreserved_checkbutton") - self.out_tcp_entry = self.xml.get_widget("out_tcp_entry") + self.out_tcp_all_checkbutton = xml.get_object("out_tcp_all_checkbutton") + self.out_tcp_reserved_checkbutton = xml.get_object("out_tcp_reserved_checkbutton") + self.out_tcp_unreserved_checkbutton = xml.get_object("out_tcp_unreserved_checkbutton") + self.out_tcp_entry = self.xml.get_object("out_tcp_entry") self.network_buttons[self.out_tcp_all_checkbutton] = [self.out_tcp_entry] - self.in_udp_all_checkbutton = xml.get_widget("in_udp_all_checkbutton") - self.in_udp_reserved_checkbutton = xml.get_widget("in_udp_reserved_checkbutton") - self.in_udp_unreserved_checkbutton = xml.get_widget("in_udp_unreserved_checkbutton") - self.in_udp_entry = self.xml.get_widget("in_udp_entry") + self.in_udp_all_checkbutton = xml.get_object("in_udp_all_checkbutton") + self.in_udp_reserved_checkbutton = xml.get_object("in_udp_reserved_checkbutton") + self.in_udp_unreserved_checkbutton = xml.get_object("in_udp_unreserved_checkbutton") + self.in_udp_entry = self.xml.get_object("in_udp_entry") self.network_buttons[self.in_udp_all_checkbutton] = [self.in_udp_reserved_checkbutton, self.in_udp_unreserved_checkbutton, self.in_udp_entry] - self.out_udp_all_checkbutton = xml.get_widget("out_udp_all_checkbutton") - self.out_udp_entry = self.xml.get_widget("out_udp_entry") + self.out_udp_all_checkbutton = xml.get_object("out_udp_all_checkbutton") + self.out_udp_entry = self.xml.get_object("out_udp_entry") self.network_buttons[self.out_udp_all_checkbutton] = [self.out_udp_entry] for b in self.network_buttons.keys(): b.connect("clicked", self.network_all_clicked) - self.boolean_treeview = self.xml.get_widget("boolean_treeview") + self.boolean_treeview = self.xml.get_object("boolean_treeview") 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.SortType.ASCENDING) @@ -287,7 +290,7 @@ class childWindow: 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_treeview = self.xml.get_object("role_treeview") self.role_store = Gtk.ListStore(GObject.TYPE_STRING) self.role_treeview.set_model(self.role_store) self.role_treeview.get_selection().set_mode(Gtk.SelectionMode.MULTIPLE) @@ -295,7 +298,7 @@ class childWindow: 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_treeview = self.xml.get_object("existing_user_treeview") self.existing_user_store = Gtk.ListStore(GObject.TYPE_STRING) self.existing_user_treeview.set_model(self.existing_user_store) self.existing_user_store.set_sort_column_id(0, Gtk.SortType.ASCENDING) @@ -306,9 +309,9 @@ class childWindow: iter = self.role_store.append() self.role_store.set_value(iter, 0, i[:-2]) - self.in_tcp_reserved_checkbutton = xml.get_widget("in_tcp_reserved_checkbutton") + self.in_tcp_reserved_checkbutton = xml.get_object("in_tcp_reserved_checkbutton") - self.transition_treeview = self.xml.get_widget("transition_treeview") + self.transition_treeview = self.xml.get_object("transition_treeview") self.transition_store = Gtk.ListStore(GObject.TYPE_STRING) self.transition_treeview.set_model(self.transition_store) self.transition_treeview.get_selection().set_mode(Gtk.SelectionMode.MULTIPLE) @@ -316,7 +319,7 @@ class childWindow: 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_treeview = self.xml.get_object("user_transition_treeview") 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.SelectionMode.MULTIPLE) @@ -330,7 +333,7 @@ class childWindow: iter = self.existing_user_store.append() self.existing_user_store.set_value(iter, 0, i[:-2]) - self.admin_treeview = self.xml.get_widget("admin_treeview") + self.admin_treeview = self.xml.get_object("admin_treeview") self.admin_store = Gtk.ListStore(GObject.TYPE_STRING) self.admin_treeview.set_model(self.admin_store) self.admin_treeview.get_selection().set_mode(Gtk.SelectionMode.MULTIPLE) @@ -385,7 +388,7 @@ 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_object("cancel_button").set_label(Gtk.STOCK_CLOSE) else: self.current_page = self.current_page + 1 self.notebook.set_current_page(self.pages[type][self.current_page]) @@ -605,7 +608,7 @@ class childWindow: self.__add(DIR) def on_about_clicked(self, args): - dlg = xml.get_widget("about_dialog") + dlg = xml.get_object("about_dialog") dlg.run() dlg.hide() @@ -614,43 +617,43 @@ class childWindow: def setupScreen(self): # Bring in widgets from glade file. - self.mainWindow = self.xml.get_widget("main_window") - self.druid = self.xml.get_widget("druid") + self.mainWindow = self.xml.get_object("main_window") + self.druid = self.xml.get_object("druid") self.type = 0 - self.name_entry = self.xml.get_widget("name_entry") + self.name_entry = self.xml.get_object("name_entry") self.name_entry.connect("insert_text", self.on_name_entry_changed) self.name_entry.connect("focus_out_event", self.on_focus_out_event) - self.exec_entry = self.xml.get_widget("exec_entry") - self.exec_button = self.xml.get_widget("exec_button") - self.init_script_entry = self.xml.get_widget("init_script_entry") - self.init_script_button = self.xml.get_widget("init_script_button") - self.output_entry = self.xml.get_widget("output_entry") + self.exec_entry = self.xml.get_object("exec_entry") + self.exec_button = self.xml.get_object("exec_button") + self.init_script_entry = self.xml.get_object("init_script_entry") + self.init_script_button = self.xml.get_object("init_script_button") + self.output_entry = self.xml.get_object("output_entry") self.output_entry.set_text(os.getcwd()) - self.xml.get_widget("output_button").connect("clicked", self.output_button_clicked) + self.xml.get_object("output_button").connect("clicked", self.output_button_clicked) - self.xwindows_user_radiobutton = self.xml.get_widget("xwindows_user_radiobutton") - self.terminal_user_radiobutton = self.xml.get_widget("terminal_user_radiobutton") - self.root_user_radiobutton = self.xml.get_widget("root_user_radiobutton") - self.login_user_radiobutton = self.xml.get_widget("login_user_radiobutton") - self.admin_user_radiobutton = self.xml.get_widget("admin_user_radiobutton") - self.existing_user_radiobutton = self.xml.get_widget("existing_user_radiobutton") + self.xwindows_user_radiobutton = self.xml.get_object("xwindows_user_radiobutton") + self.terminal_user_radiobutton = self.xml.get_object("terminal_user_radiobutton") + self.root_user_radiobutton = self.xml.get_object("root_user_radiobutton") + self.login_user_radiobutton = self.xml.get_object("login_user_radiobutton") + self.admin_user_radiobutton = self.xml.get_object("admin_user_radiobutton") + self.existing_user_radiobutton = self.xml.get_object("existing_user_radiobutton") - self.user_radiobutton = self.xml.get_widget("user_radiobutton") - self.init_radiobutton = self.xml.get_widget("init_radiobutton") - self.inetd_radiobutton = self.xml.get_widget("inetd_radiobutton") - self.dbus_radiobutton = self.xml.get_widget("dbus_radiobutton") - self.cgi_radiobutton = self.xml.get_widget("cgi_radiobutton") - self.sandbox_radiobutton = self.xml.get_widget("sandbox_radiobutton") - self.tmp_checkbutton = self.xml.get_widget("tmp_checkbutton") - self.uid_checkbutton = self.xml.get_widget("uid_checkbutton") - self.pam_checkbutton = self.xml.get_widget("pam_checkbutton") - self.dbus_checkbutton = self.xml.get_widget("dbus_checkbutton") - self.audit_checkbutton = self.xml.get_widget("audit_checkbutton") - self.terminal_checkbutton = self.xml.get_widget("terminal_checkbutton") - self.mail_checkbutton = self.xml.get_widget("mail_checkbutton") - self.syslog_checkbutton = self.xml.get_widget("syslog_checkbutton") - self.view = self.xml.get_widget("write_treeview") - self.file_dialog = self.xml.get_widget("filechooserdialog") + self.user_radiobutton = self.xml.get_object("user_radiobutton") + self.init_radiobutton = self.xml.get_object("init_radiobutton") + self.inetd_radiobutton = self.xml.get_object("inetd_radiobutton") + self.dbus_radiobutton = self.xml.get_object("dbus_radiobutton") + self.cgi_radiobutton = self.xml.get_object("cgi_radiobutton") + self.sandbox_radiobutton = self.xml.get_object("sandbox_radiobutton") + self.tmp_checkbutton = self.xml.get_object("tmp_checkbutton") + self.uid_checkbutton = self.xml.get_object("uid_checkbutton") + self.pam_checkbutton = self.xml.get_object("pam_checkbutton") + self.dbus_checkbutton = self.xml.get_object("dbus_checkbutton") + self.audit_checkbutton = self.xml.get_object("audit_checkbutton") + self.terminal_checkbutton = self.xml.get_object("terminal_checkbutton") + self.mail_checkbutton = self.xml.get_object("mail_checkbutton") + self.syslog_checkbutton = self.xml.get_object("syslog_checkbutton") + self.view = self.xml.get_object("write_treeview") + self.file_dialog = self.xml.get_object("filechooserdialog") self.store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_INT) self.view.set_model(self.store)