def on_search_entry_grab_focus( # pylint: disable=no-self-use
self, search_entry):
'''
Signal handler called when the search entry grabs focus
:param search_entry: The search entry
:type search_entry: Gtk.SearchEntry object
'''
if _ARGS.debug:
sys.stdout.write(
'on_search_entry_grab_focus() search_entry = %s\n'
%repr(search_entry))
search_entry.grab_focus_without_selecting()
# The default signal handler would again select the contents
# of the search entry. Therefore, we must prevent the default
# signal handler from running:
GObject.signal_stop_emission_by_name(search_entry, 'grab-focus')
return True
评论列表
文章目录