Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/canvas
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-09-19 12:43:42 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-09-19 12:43:42 (GMT)
commitec0debdb303917aca1381af3ed5379598110bb5b (patch)
tree22652bc8ea80a3a44e15f02c3ac8e0ebde161434 /sugar/canvas
parent9ff192d0b3ab7ed3259e1f934eb4421e3ff9032d (diff)
Do not hide the frame if menushell is active.
Diffstat (limited to 'sugar/canvas')
-rw-r--r--sugar/canvas/MenuShell.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/sugar/canvas/MenuShell.py b/sugar/canvas/MenuShell.py
index fad35f4..9b86902 100644
--- a/sugar/canvas/MenuShell.py
+++ b/sugar/canvas/MenuShell.py
@@ -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