From f19a278e92e29d357409818a36116597b71f2e2f Mon Sep 17 00:00:00 2001 From: Manuel QuiƱones Date: Tue, 27 Nov 2012 16:55:43 +0000 Subject: 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 Acked-by: Simon Schampijer --- 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 -- cgit v0.9.1