[Pkg-sugar-commit] [sugar-toolkit] 02/07: fix regressions introduced by 29582de6 (fix for SL#1742)

Jonas Smedegaard dr at jones.dk
Thu Apr 16 18:52:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v0.92.1
in repository sugar-toolkit.

commit 76997b7f101ed9dc624d21729ba6b0a8adda1108
Author: Sascha Silbe <silbe at activitycentral.com>
Date:   Thu Mar 3 14:30:30 2011 +0100

    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 at activitycentral.com>
    Acked-by: Simon Schampijer <simon at laptop.org>
---
 src/sugar/graphics/palettewindow.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit.git



More information about the pkg-sugar-commit mailing list