aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/msec/msecgui.py48
1 files changed, 34 insertions, 14 deletions
diff --git a/src/msec/msecgui.py b/src/msec/msecgui.py
index d0c3f3b..ad07922 100755
--- a/src/msec/msecgui.py
+++ b/src/msec/msecgui.py
@@ -171,20 +171,40 @@ class MsecGui:
menuitem.set_sensitive(False)
menu.add(menuitem)
- # creating logo
- banner = gtk.HBox(homogeneous=False, spacing=10)
- try:
- # logo
- image = gtk.Image()
- pixbuf = gtk.gdk.pixbuf_new_from_file("%s/%s" % (config.MSEC_DIR, BANNER))
- image.set_from_pixbuf(pixbuf)
- banner.pack_start(image, False, False)
- label = gtk.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)
- except:
- print "Banner %s Not found" % ("%s/%s" % (config.MSEC_DIR, BANNER))
+ # creating logo if running inside mcc
+ if embed:
+ banner = gtk.HBox(homogeneous=False, spacing=10)
+ try:
+ # logo
+ image = gtk.Image()
+ pixbuf = gtk.gdk.pixbuf_new_from_file("%s/%s" % (config.MSEC_DIR, BANNER))
+ image.set_from_pixbuf(pixbuf)
+ banner.pack_start(image, False, False)
+ label = gtk.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)
+ except:
+ print "Banner %s Not found" % ("%s/%s" % (config.MSEC_DIR, BANNER))
+
+ # toolbar
+ toolbar = gtk.Toolbar()
+ toolbar.set_style(gtk.TOOLBAR_ICONS)
+ toolbar.set_tooltips(True)
+
+ toolbar_item = gtk.ToolButton("Save")
+ toolbar_item.set_stock_id(gtk.STOCK_SAVE)
+ toolbar_item.connect("clicked", self.ok)
+ toolbar_item.set_tooltip_text(_("Save and apply current policy"))
+ toolbar.insert(toolbar_item, -1)
+
+ toolbar_item = gtk.ToolButton("Quit")
+ toolbar_item.set_stock_id(gtk.STOCK_QUIT)
+ toolbar_item.connect("clicked", self.quit)
+ toolbar_item.set_tooltip_text(_("Quit"))
+ toolbar.insert(toolbar_item, -1)
+
+ main_vbox.pack_start(toolbar, False, False)
# creating tabs
self.notebook = gtk.Notebook()