aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/msec/msecgui.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/msec/msecgui.py b/src/msec/msecgui.py
index 1dfab59..085e757 100755
--- a/src/msec/msecgui.py
+++ b/src/msec/msecgui.py
@@ -210,13 +210,13 @@ class MsecGui:
# building menus
for topmenu, items in menus:
# file menu
- filemenu = Gtk.MenuItem(topmenu, use_underline=True)
+ filemenu = Gtk.MenuItem(label=topmenu, use_underline=True)
menubar.add(filemenu)
menu = Gtk.Menu()
filemenu.set_submenu(menu)
group = None
for submenu, callback in items:
- menuitem = Gtk.MenuItem(submenu, use_underline=True)
+ menuitem = Gtk.MenuItem(label=submenu, use_underline=True)
#menuitem = Gtk.MenuItem(submenu)
if callback:
menuitem.connect('activate', callback)
@@ -487,7 +487,7 @@ class MsecGui:
GObject.TYPE_INT)
# treeview
- treeview = Gtk.TreeView(lstore)
+ treeview = Gtk.TreeView(model=lstore)
treeview.set_rules_hint(True)
treeview.set_search_column(self.COLUMN_DESCR)
@@ -569,7 +569,7 @@ class MsecGui:
"""Builds the security summary UI"""
vbox = Gtk.VBox(homogeneous=False, spacing=20)
- table = Gtk.Table(4, 4, False)
+ table = Gtk.Table(n_rows=4, n_columns=4, homogeneous=False)
def create_security_item(table, row, text, icon=None):
# show logo
@@ -601,7 +601,7 @@ class MsecGui:
label.set_property("yalign", 0.5)
table.attach(label, 2, 3, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
- button = Gtk.Button(_("Configure"))
+ button = Gtk.Button(label=_("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, 0)
@@ -615,7 +615,7 @@ class MsecGui:
label.set_property("xalign", 0.0)
label.set_property("yalign", 0.5)
table.attach(label, 2, 3, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
- button = Gtk.Button(_("Update now"))
+ button = Gtk.Button(label=_("Update now"))
button.connect('clicked', self.run_configure_app, tools.UPDATE_CMD)
table.attach(button, 3, 4, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
@@ -643,7 +643,7 @@ class MsecGui:
label.set_property("yalign", 0.5)
table.attach(label, 2, 3, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
- button = Gtk.Button(_("Configure"))
+ button = Gtk.Button(label=_("Configure"))
button.connect('clicked', lambda x: self.main_notebook.set_current_page(1))
table.attach(button, 3, 4, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
@@ -664,13 +664,13 @@ class MsecGui:
table.attach(label, 2, 3, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
h = Gtk.HBox()
- button = Gtk.Button(_("Show results"))
+ button = Gtk.Button(label=_("Show results"))
if updated_n:
button.connect('clicked', self.show_test_results, logfile)
else:
button.set_sensitive(False)
h.pack_start(button, False, False, 0)
- button = Gtk.Button(_("Run now"))
+ button = Gtk.Button(label=_("Run now"))
button.connect('clicked', self.run_periodic_check, check)
h.pack_start(button, False, False, 0)
table.attach(h, 3, 4, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0)
@@ -829,7 +829,7 @@ class MsecGui:
GObject.TYPE_INT)
# treeview
- treeview = Gtk.TreeView(lstore)
+ treeview = Gtk.TreeView(model=lstore)
treeview.set_rules_hint(True)
treeview.set_search_column(self.COLUMN_LEVEL_DESCR)
treeview.connect('row-activated', self.level_changed, lstore)
@@ -894,7 +894,7 @@ class MsecGui:
# notifications by email
hbox = Gtk.HBox()
- self.notify_mail = Gtk.CheckButton(_("Send security alerts by email to:"))
+ self.notify_mail = Gtk.CheckButton(label=_("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, 0)
@@ -916,7 +916,7 @@ class MsecGui:
self.notify_mail_changed(self.notify_mail, hbox)
# notifications on desktop
- self.notify_desktop = Gtk.CheckButton(_("Display security alerts on desktop"))
+ self.notify_desktop = Gtk.CheckButton(label=_("Display security alerts on desktop"))
if self.msecconfig.get("NOTIFY_WARN") == "yes":
self.notify_desktop.set_active(True)
self.notify_desktop.connect('clicked', self.notify_changed, None)
@@ -1100,7 +1100,7 @@ class MsecGui:
periodic_checks = self.msecconfig.get("CHECK_SECURITY")
- self.periodic_checks = Gtk.CheckButton(_("Enable periodic security checks"))
+ self.periodic_checks = Gtk.CheckButton(label=_("Enable periodic security checks"))
if periodic_checks == "yes":
self.periodic_checks.set_active(True)
vbox.pack_start(self.periodic_checks, False, False, 0)
@@ -1152,7 +1152,7 @@ class MsecGui:
)
# treeview
- treeview = Gtk.TreeView(lstore)
+ treeview = Gtk.TreeView(model=lstore)
treeview.set_rules_hint(True)
treeview.set_search_column(self.COLUMN_EXCEPTION)
@@ -1189,12 +1189,12 @@ class MsecGui:
hbox = Gtk.HBox(homogeneous=True, spacing=10)
# add
- button = Gtk.Button(_("Add a rule"))
+ button = Gtk.Button(label=_("Add a rule"))
button.connect('clicked', self.add_exception, lstore)
hbox.pack_start(button, False, False, 0)
# delete
- button = Gtk.Button(_("Delete"))
+ button = Gtk.Button(label=_("Delete"))
button.connect('clicked', self.remove_exception, treeview)
hbox.pack_start(button, False, False, 0)
@@ -1224,7 +1224,7 @@ class MsecGui:
GObject.TYPE_STRING)
# treeview
- treeview = Gtk.TreeView(lstore)
+ treeview = Gtk.TreeView(model=lstore)
treeview.set_rules_hint(True)
treeview.set_search_column(self.COLUMN_DESCR)
@@ -1316,12 +1316,12 @@ class MsecGui:
# hbox.pack_start(button, False, 0)
# add
- button = Gtk.Button(_("Add a rule"))
+ button = Gtk.Button(label=_("Add a rule"))
button.connect('clicked', self.add_permission_check, lstore)
hbox.pack_start(button, False, False, 0)
# delete
- button = Gtk.Button(_("Delete"))
+ button = Gtk.Button(label=_("Delete"))
button.connect('clicked', self.remove_permission_check, treeview)
hbox.pack_start(button, False, False, 0)