Ticket #4221: 0001-Owner-Icon-deactivate-mouse-over-for-the-fist-time-S.patch

File 0001-Owner-Icon-deactivate-mouse-over-for-the-fist-time-S.patch, 1.7 KB (added by manuq, 11 years ago)

Candidate patch.

  • src/jarabe/desktop/favoritesview.py

    From 5aacebba1be87cdd2ef458e80b91210cb490564c Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Tue, 27 Nov 2012 13:55:43 -0300
    Subject: [PATCH shell] Owner Icon: deactivate mouse over for the fist time -
     SL #4221
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    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>
    ---
     src/jarabe/desktop/favoritesview.py | 9 +++++++++
     1 file changed, 9 insertions(+)
    
    diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
    index 69f8ea3..a9358f6 100644
    a b class OwnerIcon(BuddyIcon): 
    622622        self._palette_enabled = False
    623623        self._register_menu = None
    624624
     625        # This is a workaround to skip the callback for
     626        # enter-notify-event in the parent class the first time.
     627        def __enter_notify_event_cb(icon, event):
     628            self.unset_state_flags(Gtk.StateFlags.PRELIGHT)
     629            self.disconnect(self._enter_notify_hid)
     630
     631        self._enter_notify_hid = self.connect('enter-notify-event',
     632                                              __enter_notify_event_cb)
     633
    625634    def create_palette(self):
    626635        if not self._palette_enabled:
    627636            self._palette_enabled = True