Do not hide the frame if menushell is active.

This commit is contained in:
Marco Pesenti Gritti
2006-09-19 14:43:42 +02:00
parent 9ff192d0b3
commit ec0debdb30
2 changed files with 32 additions and 5 deletions
+19 -1
View File
@@ -1,9 +1,27 @@
class MenuShell:
import gobject
class MenuShell(gobject.GObject):
__gsignals__ = {
'activated': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ([])),
'deactivated': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ([])),
}
def __init__(self, grid):
gobject.GObject.__init__(self)
self._menu_controller = None
self._grid = grid
def is_active(self):
return (self._menu_controller != None)
def set_active(self, controller):
if controller == None:
self.emit('deactivated')
else:
self.emit('activated')
if self._menu_controller:
self._menu_controller.popdown()
self._menu_controller = controller