From 8560efebeaece0c24fdabac309ef592ca3864620 Mon Sep 17 00:00:00 2001 From: hordepfo Date: Wed, 22 Jan 2014 03:20:56 +0000 Subject: [PATCH 1/2] Fixes search entry losing typing focus When the search entry was out of focus and types were redirected to it, if the current selected application was hidden by the filtering, both the holder and entry lost focus. This stopped the typing event redirection. Now the entry is always focused when typing. --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index c41ebcf..9f5a0c1 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -887,6 +887,8 @@ class pluginclass( object ): # Forward all text to the search box def keyPress( self, widget, event ): if event.string.strip() != "" or event.keyval == Gdk.KEY_BackSpace: + self.searchEntry.grab_focus() + gtk.gtk_editable_set_position(hash(self.searchEntry), -1) self.searchEntry.event( event ) return True From 42a0e8cd47b7c066565aee1394e3b1f5d787c0f4 Mon Sep 17 00:00:00 2001 From: hordepfo Date: Wed, 22 Jan 2014 03:56:22 +0000 Subject: [PATCH 2/2] Clear search entry when switching from Apps to Favorites Took two clicks because of a loop in the logic (setting to empty also invokes setting the tab). Fixes #44 --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 9f5a0c1..5625356 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -571,8 +571,9 @@ class pluginclass( object ): elif tabNum == 1: notebook.set_current_page( 1 ) - self.lastActiveTab = tabNum self.focusSearchEntry() + self.lastActiveTab = tabNum + def Todos( self ):