From 285376b04963962925b2166d926fec4e980aaa12 Mon Sep 17 00:00:00 2001 From: Karthik T Date: Thu, 24 Oct 2013 00:51:19 +0800 Subject: [PATCH 1/4] Fix mouse focus bug with favorites menu If you click on favorites and click on any area outside menu -> nothing happens This is because the mouse is grabed by window. Fix this by registering a callback instead of immediately grabbing(not sure why this was added by Michael) Frankly this code can use some DRY love --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 4628fd7..ae5db47 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -949,7 +949,8 @@ class pluginclass( object ): mTree.show_all() gtk.gtk_menu_popup(hash(mTree), None, None, None, None, ev.button, ev.time) - self.mintMenuWin.grab() + #self.mintMenuWin.grab() + mTree.connect( 'deactivate', self.onMenuPopupDeactivate) else: mTree = Gtk.Menu() @@ -969,7 +970,8 @@ class pluginclass( object ): insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore ) insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore ) gtk.gtk_menu_popup(hash(mTree), None, None, None, None, ev.button, ev.time) - self.mintMenuWin.grab() + #self.mintMenuWin.grab() + mTree.connect( 'deactivate', self.onMenuPopupDeactivate) def menuPopup( self, widget, event ): if event.button == 3: From 01d4a6e6fe0bd5e891ec91e7892b4682ecfa7e50 Mon Sep 17 00:00:00 2001 From: Karthik T Date: Thu, 24 Oct 2013 01:05:38 +0800 Subject: [PATCH 2/4] Fix Keystroke lost in favorites pane issue If user is in favorites pane -> starts typing, first character is lost This is because the changeTab->focusSearchEntry->set_text("") Not sure if right way, but fixing this by setting the text to its prev value after the changeTab, works well for me --- 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 ae5db47..d7dac47 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -811,8 +811,10 @@ class pluginclass( object ): if self.donotfilterapps: widget.set_text( "" ) else: + text = widget.get_text() if self.lastActiveTab != 1: self.changeTab( 1 ) + widget.set_text( text ) text = widget.get_text() showns = False # Are any app shown? shownList = [] From 02348d604ddf6c6425aaca4183916862720d428b Mon Sep 17 00:00:00 2001 From: Karthik T Date: Thu, 24 Oct 2013 01:22:28 +0800 Subject: [PATCH 3/4] Click Search menu - > click outside menu Same problem, same cause same person, same commit.. I wonder why.. --- 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 d7dac47..3d6ffa8 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -1119,7 +1119,8 @@ class pluginclass( object ): #menu.attach_to_widget(self.searchButton, None) #menu.reposition() #menu.reposition() - self.mintMenuWin.grab() + #self.mintMenuWin.grab() + mTree.connect( 'deactivate', self.onMenuPopupDeactivate) self.focusSearchEntry() return True From 91916c2d4217d30ba31e8ffe9a962fcb60580737 Mon Sep 17 00:00:00 2001 From: Karthik T Date: Sun, 27 Oct 2013 17:03:46 +0800 Subject: [PATCH 4/4] Fix mistake in previous commit --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 3d6ffa8..56969e1 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -1120,7 +1120,7 @@ class pluginclass( object ): #menu.reposition() #menu.reposition() #self.mintMenuWin.grab() - mTree.connect( 'deactivate', self.onMenuPopupDeactivate) + menu.connect( 'deactivate', self.onMenuPopupDeactivate) self.focusSearchEntry() return True