def on_search_entry_search_changed(self, search_entry):
'''
Signal handler for changed text in the search entry
:param widget: The search entry
:type widget: Gtk.SearchEntry object
'''
query_string = search_entry.get_text()
if _ARGS.debug:
sys.stdout.write(
'on_search_entry_search_changed() query_string = %s\n'
%query_string)
if not self._search_bar.get_search_mode():
# If the text in the search entry changes while
# the search bar is invisible, ignore it.
return
self._query_string = query_string
if self._candidates_invalid:
if _ARGS.debug:
sys.stdout.write(
'on_search_entry_search_changed() '
+ 'self._candidates_invalid = %s\n'
%self._candidates_invalid)
return
self._candidates_invalid = True
self._clear_flowbox()
self._busy_start()
GLib.idle_add(self._fill_flowbox_with_search_results)
评论列表
文章目录