aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-07-20 15:17:39 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-07-20 15:17:39 +0000
commit345c34180e2bd2508efad4e34d2274fc2c2eb670 (patch)
treedf3b37fe5c1d8a09240934c6ef05d04c6c0928b9 /src
parent1b0b001e1bb646426aeb67a94a76c2122278a86e (diff)
downloadmsec-345c34180e2bd2508efad4e34d2274fc2c2eb670.tar
msec-345c34180e2bd2508efad4e34d2274fc2c2eb670.tar.gz
msec-345c34180e2bd2508efad4e34d2274fc2c2eb670.tar.bz2
msec-345c34180e2bd2508efad4e34d2274fc2c2eb670.tar.xz
msec-345c34180e2bd2508efad4e34d2274fc2c2eb670.zip
Showing logo when running inside MCC, and add toolbar.
Diffstat (limited to 'src')
-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()