Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib/sugar/graphics/palette.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sugar/graphics/palette.py')
-rw-r--r--lib/sugar/graphics/palette.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sugar/graphics/palette.py b/lib/sugar/graphics/palette.py
index a4cef8f..a24a806 100644
--- a/lib/sugar/graphics/palette.py
+++ b/lib/sugar/graphics/palette.py
@@ -148,6 +148,7 @@ class Palette(gtk.Window):
# Just assume xthickness and ythickness are the same
self.set_border_width(self.style.xthickness)
self.connect('realize', self._realize_cb)
+ self.connect('destroy', self.__destroy_cb)
self.palette_state = self.PRIMARY
@@ -217,6 +218,12 @@ class Palette(gtk.Window):
self._mouse_detector = MouseSpeedDetector(self, 200, 5)
self._mouse_detector.connect('motion-slow', self._mouse_slow_cb)
+ def __destroy_cb(self, palette):
+ self.set_group_id(None)
+
+ if self._palette_popup_sid is not None:
+ _palette_observer.disconnect(self._palette_popup_sid)
+
def _add_menu(self):
self._menu_box = gtk.VBox()
self._secondary_box.pack_start(self._menu_box)