[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5902 - grc/trunk/src/Graphics
From: |
jblum |
Subject: |
[Commit-gnuradio] r5902 - grc/trunk/src/Graphics |
Date: |
Wed, 4 Jul 2007 10:56:31 -0600 (MDT) |
Author: jblum
Date: 2007-07-04 10:56:30 -0600 (Wed, 04 Jul 2007)
New Revision: 5902
Modified:
grc/trunk/src/Graphics/Bars.py
Log:
minor gui fixes
Modified: grc/trunk/src/Graphics/Bars.py
===================================================================
--- grc/trunk/src/Graphics/Bars.py 2007-07-04 16:17:47 UTC (rev 5901)
+++ grc/trunk/src/Graphics/Bars.py 2007-07-04 16:56:30 UTC (rev 5902)
@@ -94,14 +94,12 @@
gtk.Toolbar.__init__(self)
self.set_style(gtk.TOOLBAR_ICONS)
for action_name in TOOLBAR_LIST:
- if action_name == None:
- spacer = gtk.SeparatorToolItem()
- self.add(spacer)
- else: #add a tool item
+ if action_name: #add a tool item
action = get_action_from_name(action_name)
+ self.add(action.create_tool_item())
+ #this reset of the tooltip property is required
(after creating the tool item) for the tooltip to show
action.set_property('tooltip',
action.get_property('tooltip'))
- self.add(action.create_tool_item())
-
+ else: self.add(gtk.SeparatorToolItem())
class MenuBar(gtk.MenuBar):
"""The gtk menu bar with actions added from the menu bar list."""
@@ -115,18 +113,17 @@
"""
gtk.MenuBar.__init__(self)
for main_action,action_names in MENU_BAR_LIST:
- # Create the main menu item
+ #create the main menu item
main_menu_item = main_action.create_menu_item()
self.append(main_menu_item)
- # Create the menu
+ #create the menu
main_menu = gtk.Menu()
main_menu_item.set_submenu(main_menu)
for action_name in action_names:
- if action_name == None:
- spacer = gtk.SeparatorMenuItem()
- main_menu.append(spacer)
- else: #append a menu item
- menu_item =
get_action_from_name(action_name).create_menu_item()
- main_menu.append(menu_item)
+ if action_name: #append a menu item
+ action =
get_action_from_name(action_name)
+
main_menu.append(action.create_menu_item())
+ else: main_menu.append(gtk.SeparatorMenuItem())
+ main_menu.show_all() #this show all is required for the
separators to show
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5902 - grc/trunk/src/Graphics,
jblum <=