Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <silbe@activitycentral.com>2011-03-03 13:30:30 (GMT)
committer Sascha Silbe <silbe@activitycentral.com>2011-03-27 14:39:04 (GMT)
commit85e714ecb1e00e2652a6700a6868c698010c8c3e (patch)
treeb9368bd3c5d871a7609e1d0b5336fa1de42e3af4
parentca02d59e116200cf689bf24ff61f025973d394ec (diff)
fix regressions introduced by 29582de6 (fix for SL#1742)
GTK pops down the palette before it invokes the actions on the menu item. We need to postpone destruction of the palette until after all signals have propagated from the menu item to the palette owner. Symptoms included the "View Details" palette menu item in the Journal list view not working. Signed-off-by: Sascha Silbe <silbe@activitycentral.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar/graphics/palettewindow.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index ee9be96..5281e54 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -643,7 +643,13 @@ class Invoker(gobject.GObject):
if self._palette is not None:
self._palette.popdown(immediate=True)
self._palette.props.invoker = None
- self._palette.destroy()
+ # GTK pops down the palette before it invokes the actions on the
+ # menu item. We need to postpone destruction of the palette until
+ # after all signals have propagated from the menu item to the
+ # palette owner.
+ gobject.idle_add(lambda old_palette=self._palette:
+ old_palette.destroy(),
+ priority=gobject.PRIORITY_LOW)
self._palette = palette