Fixed search button

The search button was clearing the search entry when clicked.
This commit is contained in:
hordepfo 2014-05-07 15:54:39 +01:00
parent 6a7cf3fcd3
commit 63b8a24527

View File

@ -590,12 +590,12 @@ class pluginclass( object ):
self.mintMenuWin.stopHiding()
return False
def focusSearchEntry( self ):
def focusSearchEntry( self, clear = True ):
# grab_focus() does select all text,
# restoring the original selection is somehow broken, so just select the end
# of the existing text, that's the most likely candidate anyhow
self.searchEntry.grab_focus()
if self.rememberFilter:
if self.rememberFilter or not clear:
gtk.gtk_editable_set_position(hash(self.searchEntry), -1)
else:
self.searchEntry.set_text("")
@ -1124,7 +1124,7 @@ class pluginclass( object ):
#menu.reposition()
#menu.reposition()
#self.mintMenuWin.grab()
self.focusSearchEntry()
self.focusSearchEntry(clear = False)
return True
def pos_func(self, menu=None):