Only try to pop down the submenus if we still have a _Menu #1338

This commit is contained in:
Tomeu Vizoso 2009-09-13 18:02:40 +02:00
parent 0159bc7b52
commit 850a78c59a
2 changed files with 4 additions and 5 deletions

View File

@ -943,8 +943,6 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self.set_palette(Palette(text))
palette = property(get_palette, set_palette)
class CellRendererIcon(gtk.GenericCellRenderer):

View File

@ -209,6 +209,7 @@ class Palette(PaletteWindow):
def _popdown_submenus(self):
# TODO explicit hiding of subitems
# should be removed after fixing #1301
if self.menu is not None:
for menu_item in self.menu.get_children():
if menu_item.props.submenu is not None:
menu_item.props.submenu.popdown()