Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-11-27 16:55:43 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-11-27 18:53:22 (GMT)
commitf19a278e92e29d357409818a36116597b71f2e2f (patch)
tree9e6f23082ae53f6ff21cb859b8c7b14d22bddb7e
parent9c7d980f8281f145b605710b7383b6fa8f1f58b4 (diff)
Owner Icon: deactivate mouse over for the fist time - SL #4221
The icons in all shell views have a grey rectangle background as mouse over feedback, but as the mouse pointer is set in the middle of the view when Sugar is initializated, we get the owner icon hovered, which we don't want. This commit overrides that behaviour, in a similar way that is being done for the palette, in order to don't trigger it the fist time. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/jarabe/desktop/favoritesview.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index 69f8ea3..a9358f6 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -622,6 +622,15 @@ class OwnerIcon(BuddyIcon):
self._palette_enabled = False
self._register_menu = None
+ # This is a workaround to skip the callback for
+ # enter-notify-event in the parent class the first time.
+ def __enter_notify_event_cb(icon, event):
+ self.unset_state_flags(Gtk.StateFlags.PRELIGHT)
+ self.disconnect(self._enter_notify_hid)
+
+ self._enter_notify_hid = self.connect('enter-notify-event',
+ __enter_notify_event_cb)
+
def create_palette(self):
if not self._palette_enabled:
self._palette_enabled = True