Correction of previous commit - clear when clicked

Now category buttons only clear text when clicked, not when hovered.
It seems more natural, because a now the mouse position is irrelevant
when trying to type on the search entry.
This commit is contained in:
hordepfo 2014-01-22 03:15:15 +00:00
parent 24519ad233
commit 2353f958d3

View File

@ -880,6 +880,10 @@ class pluginclass( object ):
widget.set_relief( Gtk.ReliefStyle.HALF ) widget.set_relief( Gtk.ReliefStyle.HALF )
self.applicationsScrolledWindow.get_vadjustment().set_value( 0 ) self.applicationsScrolledWindow.get_vadjustment().set_value( 0 )
def FilterAndClear( self, widget, category = None ):
self.searchEntry.set_text( "" )
self.Filter( widget, category )
# Forward all text to the search box # Forward all text to the search box
def keyPress( self, widget, event ): def keyPress( self, widget, event ):
@ -1673,7 +1677,7 @@ class pluginclass( object ):
else: else:
item["button"].mouseOverHandlerIds = None item["button"].mouseOverHandlerIds = None
item["button"].connect( "clicked", self.Filter, item["filter"] ) item["button"].connect( "clicked", self.FilterAndClear, item["filter"] )
item["button"].connect( "focus-in-event", self.categoryBtnFocus, item["filter"] ) item["button"].connect( "focus-in-event", self.categoryBtnFocus, item["filter"] )
item["button"].show() item["button"].show()