diff --git a/src/gnomeshellsearch.py b/src/gnomeshellsearch.py index 8aa24a2..c776ff5 100644 --- a/src/gnomeshellsearch.py +++ b/src/gnomeshellsearch.py @@ -11,6 +11,7 @@ import subprocess import dbus.service +from gi.repository import GLib from zim.main import NotebookCommand from zim.plugins import PluginClass from zim.search import SearchSelection @@ -95,19 +96,16 @@ def __init__(self, notebook=None, search_all=True): self.search_all = search_all def main(self): - import gtk - - gtk.main() + GLib.MainLoop().run() def quit(self): - import gtk - - gtk.main_quit() + GLib.MainLoop().quit() @dbus.service.method(dbus_interface=SEARCH_IFACE, in_signature='as', out_signature='as', async_callbacks=('reply_handler', 'error_handler')) def GetInitialResultSet(self, terms, reply_handler, error_handler): + print('->', terms) """Handles the initial search.""" results = self._get_search_results(terms) reply_handler(results)