From 24519ad23309de511a4bb57fa5073d7f0b730e76 Mon Sep 17 00:00:00 2001 From: hordepfo Date: Wed, 22 Jan 2014 02:30:26 +0000 Subject: [PATCH] Solves app and category buttons focus issues The buttons were grabbing the focus out of the search entry on hover, inducing strange behaviour. Fixes #23 --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 4 ---- usr/lib/linuxmint/mintMenu/plugins/easybuttons.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index c41ebcf..6191780 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -878,9 +878,6 @@ class pluginclass( object ): i.released() i.set_relief( Gtk.ReliefStyle.NONE ) widget.set_relief( Gtk.ReliefStyle.HALF ) - widget.grab_focus() - - self.searchEntry.set_text( "" ) self.applicationsScrolledWindow.get_vadjustment().set_value( 0 ) @@ -1121,7 +1118,6 @@ class pluginclass( object ): #menu.reposition() #self.mintMenuWin.grab() menu.connect( 'deactivate', self.onMenuPopupDeactivate) - self.focusSearchEntry() return True def pos_func(self, menu=None): diff --git a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py index 2d0d90d..1f1d799 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py +++ b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py @@ -283,7 +283,6 @@ class ApplicationLauncher( easyButton ): self.connectSelf( "focus-in-event", self.onFocusIn ) self.connectSelf( "focus-out-event", self.onFocusOut ) - self.connectSelf( "enter-notify-event", self.onEnterNotify ) self.connectSelf( "clicked", self.execute ) @@ -332,9 +331,6 @@ class ApplicationLauncher( easyButton ): def onFocusOut( self, widget, event ): self.set_relief( Gtk.ReliefStyle.NONE ) - def onEnterNotify( self, widget, event ): - self.grab_focus() - def setupLabels( self ): self.addLabel( self.appName )