further fix and simplify the keypress handler

This commit is contained in:
gm10 2019-01-19 12:47:09 +01:00
parent 2a89abc910
commit 856addf5b8
No known key found for this signature in database
GPG Key ID: A981D4EA8CF993A9

View File

@ -843,23 +843,11 @@ class pluginclass( object ):
self.searchEntry.set_text( "" ) self.searchEntry.set_text( "" )
self.Filter( widget, category ) self.Filter( widget, category )
# Forward all text to the search box
def keyPress( self, widget, event ): def keyPress( self, widget, event ):
""" Forward all text to the search box """
if event.string.strip() != "" or event.keyval == Gdk.KEY_BackSpace: if event.string.strip() or event.keyval == Gdk.KEY_space:
self.searchEntry.grab_focus()
self.searchEntry.set_position( -1 )
self.searchEntry.event( event ) self.searchEntry.event( event )
return True return True
if event.keyval == Gdk.KEY_space:
self.searchEntry.event( event )
return True
if event.keyval == Gdk.KEY_Down and self.searchEntry.is_focus():
self.applicationsBox.get_children()[0].grab_focus()
return False return False
def favPopup( self, widget, event ): def favPopup( self, widget, event ):