[Commits] sugar-toolkit branch master updated.

Tomeu Vizoso tomeu at tomeuvizoso.net
Sun Dec 7 10:50:35 EST 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "/home/olpc-code/git/sugar-toolkit".

The branch, master has been updated
       via  054aaf8590661cd80ffd8f257989f1988648f391 (commit)
      from  3f1509cd225383ce738eb2bd1ee8e20f9b7c7824 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

 src/sugar/graphics/palette.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 054aaf8590661cd80ffd8f257989f1988648f391
Author: Tomeu Vizoso <tomeu at tomeuvizoso.net>
Date:   Sun Dec 7 16:50:25 2008 +0100

    Dont pop down the palette when a submenu opens

diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py
index 5ddaca8..e4f6ab5 100644
--- a/src/sugar/graphics/palette.py
+++ b/src/sugar/graphics/palette.py
@@ -547,6 +547,7 @@ class Palette(gtk.Window):
         self.move(position.x, position.y)
 
     def popup(self, immediate=False):
+        logging.debug('Palette.popup immediate %r' % immediate)
         if self._invoker is not None:
             self._update_full_request()
             self._alignment = self._invoker.get_alignment(self._full_request)
@@ -563,6 +564,7 @@ class Palette(gtk.Window):
         self._secondary_anim.start()
 
     def popdown(self, immediate=False):
+        logging.debug('Palette.popdown immediate %r' % immediate)
         self._popup_anim.stop()
 
         self._mouse_detector.stop()
@@ -625,12 +627,14 @@ class Palette(gtk.Window):
         self.show()
 
     def __enter_notify_event_cb(self, widget, event):
-        if event.detail != gtk.gdk.NOTIFY_INFERIOR:
+        if event.detail != gtk.gdk.NOTIFY_INFERIOR and \
+                event.mode == gtk.gdk.CROSSING_NORMAL:
             self._popdown_anim.stop()
             self._secondary_anim.start()
 
     def __leave_notify_event_cb(self, widget, event):
-        if event.detail != gtk.gdk.NOTIFY_INFERIOR:
+        if event.detail != gtk.gdk.NOTIFY_INFERIOR and \
+                event.mode == gtk.gdk.CROSSING_NORMAL:
             self.popdown()
 
     def __show_cb(self, widget):
@@ -642,6 +646,7 @@ class Palette(gtk.Window):
         self.emit('popup')
 
     def __hide_cb(self, widget):
+        logging.debug('__hide_cb')
         self.menu.set_active(False)
 
         self._secondary_anim.stop()
-----------------------------------------------------------------------


--
/home/olpc-code/git/sugar-toolkit


More information about the Commits mailing list