diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-02-09 19:06:34 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-02-09 19:32:07 +0100 |
commit | e46238ed5e9020de9d3c95cf3f134ca9ac527e27 (patch) | |
tree | 3dd804cd118c574ccccd0fc72b680a93477c35e9 | |
parent | 3b648feb5cb907218702c9e469cff98dba7524d3 (diff) | |
download | msec-e46238ed5e9020de9d3c95cf3f134ca9ac527e27.tar msec-e46238ed5e9020de9d3c95cf3f134ca9ac527e27.tar.gz msec-e46238ed5e9020de9d3c95cf3f134ca9ac527e27.tar.bz2 msec-e46238ed5e9020de9d3c95cf3f134ca9ac527e27.tar.xz msec-e46238ed5e9020de9d3c95cf3f134ca9ac527e27.zip |
fix automatic conversion of pack_start()
-rwxr-xr-x | src/msec/msecgui.py | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/msec/msecgui.py b/src/msec/msecgui.py index 5304560..6308463 100755 --- a/src/msec/msecgui.py +++ b/src/msec/msecgui.py @@ -189,7 +189,7 @@ class MsecGui: # menu menubar = Gtk.MenuBar() - main_vbox.pack_start(menubar, False, False) + main_vbox.pack_start(menubar, False, False, 0) menus = [ (_("_File"), [ @@ -229,11 +229,11 @@ class MsecGui: image = Gtk.Image() pixbuf = GdkPixbuf.Pixbuf.new_from_file("%s/%s" % (config.MSEC_DIR, BANNER)) image.set_from_pixbuf(pixbuf) - banner.pack_start(image, False, False) + banner.pack_start(image, False, False, 0) label = Gtk.Label(label=_("MSEC: System Security and Audit")) label.modify_font(Pango.FontDescription("13")) - banner.pack_start(label, False, False) - main_vbox.pack_start(banner, False, False) + banner.pack_start(label, False, False, 0) + main_vbox.pack_start(banner, False, False, 0) except: print "Banner %s Not found" % ("%s/%s" % (config.MSEC_DIR, BANNER)) @@ -577,7 +577,7 @@ class MsecGui: image = Gtk.Image() pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon) image.set_from_pixbuf(pixbuf) - banner.pack_start(image, False, False) + banner.pack_start(image, False, False, 0) table.attach(banner, 0, 1, row, row+1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0) except: print "Unable to load icon %s: %s" % (icon, sys.exc_value) @@ -601,7 +601,7 @@ class MsecGui: button = Gtk.Button(_("Configure")) button.connect('clicked', self.run_configure_app, tools.FIREWALL_CMD) table.attach(button, 3, 4, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0) - vbox.pack_start(table, False, False) + vbox.pack_start(table, False, False, 0) row += 1 @@ -666,10 +666,10 @@ class MsecGui: button.connect('clicked', self.show_test_results, logfile) else: button.set_sensitive(False) - h.pack_start(button, False, False) + h.pack_start(button, False, False, 0) button = Gtk.Button(_("Run now")) button.connect('clicked', self.run_periodic_check, check) - h.pack_start(button, False, False) + h.pack_start(button, False, False, 0) table.attach(h, 3, 4, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0) row += 1 @@ -801,14 +801,14 @@ class MsecGui: entry = Gtk.Label(label=LEVEL_SECURITY_TEXT) entry.set_use_markup(True) - vbox.pack_start(entry, False, False) + vbox.pack_start(entry, False, False, 0) # none self.msec_enabled = Gtk.CheckButton(label=_("Enable MSEC tool")) if self.base_level != config.NONE_LEVEL: self.msec_enabled.set_active(True) self.msec_enabled.connect('clicked', self.enable_disable_msec) - vbox.pack_start(self.msec_enabled, False, False) + vbox.pack_start(self.msec_enabled, False, False, 0) # security levels self.levels_frame = Gtk.Frame(_("Select the base security level")) @@ -893,7 +893,7 @@ class MsecGui: self.notify_mail = Gtk.CheckButton(_("Send security alerts by email to:")) if self.msecconfig.get("MAIL_WARN") == "yes": self.notify_mail.set_active(True) - hbox.pack_start(self.notify_mail, False, False) + hbox.pack_start(self.notify_mail, False, False, 0) # email address self.email_entry = Gtk.Entry() @@ -903,7 +903,7 @@ class MsecGui: self.email_entry.set_text(email) self.email_entry.connect('changed', self.change_email) hbox.pack_start(self.email_entry, False, False, 5) - vbox.pack_start(hbox, False, False) + vbox.pack_start(hbox, False, False, 0) # updating the mail address/checkbox relationship self.notify_mail.connect('clicked', self.notify_mail_changed, self.email_entry) @@ -916,7 +916,7 @@ class MsecGui: if self.msecconfig.get("NOTIFY_WARN") == "yes": self.notify_desktop.set_active(True) self.notify_desktop.connect('clicked', self.notify_changed, None) - vbox.pack_start(self.notify_desktop, False, False) + vbox.pack_start(self.notify_desktop, False, False, 0) self.checkboxes_callbacks["NOTIFY_WARN"] = (self.notify_changed, self.notify_desktop, None) return vbox @@ -1062,7 +1062,7 @@ class MsecGui: entry = Gtk.Label(label=SYSTEM_SECURITY_TEXT) entry.set_use_markup(True) - vbox.pack_start(entry, False, False) + vbox.pack_start(entry, False, False, 0) # system security options options_view, model = self.create_treeview(config.SETTINGS_SYSTEM) @@ -1077,7 +1077,7 @@ class MsecGui: entry = Gtk.Label(label=NETWORK_SECURITY_TEXT) entry.set_use_markup(True) - vbox.pack_start(entry, False, False) + vbox.pack_start(entry, False, False, 0) # network security options options_view, model = self.create_treeview(config.SETTINGS_NETWORK) @@ -1092,14 +1092,14 @@ class MsecGui: entry = Gtk.Label(label=PERIODIC_SECURITY_TEXT) entry.set_use_markup(True) - vbox.pack_start(entry, False, False) + vbox.pack_start(entry, False, False, 0) periodic_checks = self.msecconfig.get("CHECK_SECURITY") self.periodic_checks = Gtk.CheckButton(_("Enable periodic security checks")) if periodic_checks == "yes": self.periodic_checks.set_active(True) - vbox.pack_start(self.periodic_checks, False, False) + vbox.pack_start(self.periodic_checks, False, False, 0) # network security options options_view, model = self.create_treeview(config.SETTINGS_PERIODIC) @@ -1135,7 +1135,7 @@ class MsecGui: entry = Gtk.Label(label=EXCEPTIONS_TEXT) entry.set_use_markup(True) - vbox.pack_start(entry, False, False) + vbox.pack_start(entry, False, False, 0) sw = Gtk.ScrolledWindow() sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) @@ -1187,14 +1187,14 @@ class MsecGui: # add button = Gtk.Button(_("Add a rule")) button.connect('clicked', self.add_exception, lstore) - hbox.pack_start(button, False) + hbox.pack_start(button, False, 0) # delete button = Gtk.Button(_("Delete")) button.connect('clicked', self.remove_exception, treeview) - hbox.pack_start(button, False) + hbox.pack_start(button, False, 0) - vbox.pack_start(hbox, False, False) + vbox.pack_start(hbox, False, False, 0) return vbox @@ -1204,7 +1204,7 @@ class MsecGui: entry = Gtk.Label(label=PERMISSIONS_SECURITY_TEXT) entry.set_use_markup(True) - vbox.pack_start(entry, False, False) + vbox.pack_start(entry, False, False, 0) sw = Gtk.ScrolledWindow() sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) @@ -1299,34 +1299,34 @@ class MsecGui: # # up # button = Gtk.Button(_("Up")) # button.connect('clicked', self.move_rule_up, lstore) - # hbox.pack_start(button, False) + # hbox.pack_start(button, False, 0) # # down # button = Gtk.Button(_("Down")) # button.connect('clicked', self.move_rule_up, lstore) - # hbox.pack_start(button, False) + # hbox.pack_start(button, False, 0) # # default # button = Gtk.Button(_("Reset to default level permissions")) # button.connect('clicked', self.reset_permissions, lstore) - # hbox.pack_start(button, False) + # hbox.pack_start(button, False, 0) # add button = Gtk.Button(_("Add a rule")) button.connect('clicked', self.add_permission_check, lstore) - hbox.pack_start(button, False) + hbox.pack_start(button, False, 0) # delete button = Gtk.Button(_("Delete")) button.connect('clicked', self.remove_permission_check, treeview) - hbox.pack_start(button, False) + hbox.pack_start(button, False, 0) ## edit #button = Gtk.Button(_("Edit")) #button.connect('clicked', self.move_rule_up, lstore) - #hbox.pack_start(button, False) + #hbox.pack_start(button, False, 0) - vbox.pack_start(hbox, False, False) + vbox.pack_start(hbox, False, False, 0) return vbox @@ -1432,7 +1432,7 @@ class MsecGui: label = Gtk.Label(label=_("Editing exception. Please select the correspondent msec check and exception value\n")) label.set_line_wrap(True) label.set_use_markup(True) - dialog.vbox.pack_start(label, False, False) + dialog.vbox.pack_start(label, False, False, 0) # module hbox = Gtk.HBox() @@ -1447,7 +1447,7 @@ class MsecGui: if not module: entry_module.set_active(0) hbox.pack_start(entry_module, True, True, 0) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) # exception hbox = Gtk.HBox() @@ -1455,7 +1455,7 @@ class MsecGui: entry_exception = Gtk.Entry() entry_exception.set_text(exception) hbox.pack_start(entry_exception, True, True, 0) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) dialog.show_all() response = dialog.run() @@ -1526,7 +1526,7 @@ class MsecGui: hbox.pack_start(entry_file, True, True, 0) sizegroup1.add_widget(label) sizegroup2.add_widget(entry_file) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) label = Gtk.Label(_("Please specify new file owner and permissions, or use 'current' to keep current settings.")) label.set_line_wrap(True) @@ -1542,7 +1542,7 @@ class MsecGui: hbox.pack_start(entry_user, True, True, 0) sizegroup1.add_widget(label) sizegroup2.add_widget(entry_user) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) # group hbox = Gtk.HBox() @@ -1553,7 +1553,7 @@ class MsecGui: hbox.pack_start(entry_group, True, True, 0) sizegroup1.add_widget(label) sizegroup2.add_widget(entry_group) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) # perm hbox = Gtk.HBox() @@ -1564,7 +1564,7 @@ class MsecGui: hbox.pack_start(entry_perm, True, True, 0) sizegroup1.add_widget(label) sizegroup2.add_widget(entry_perm) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) label = Gtk.Label(label=_("To enforce additional ACL (Access Control List) on file, specify them in the following format:\nuser1:acl,user2:acl\nRefer to 'man setfacl' for details.")) label.set_line_wrap(True) @@ -1580,7 +1580,7 @@ class MsecGui: hbox.pack_start(entry_acl, True, True, 0) sizegroup1.add_widget(label) sizegroup2.add_widget(entry_acl) - dialog.vbox.pack_start(hbox, False, False) + dialog.vbox.pack_start(hbox, False, False, 0) dialog.show_all() response = dialog.run() |