From 48828788fda4c8daf894b2f7fdf03a014eacaa53 Mon Sep 17 00:00:00 2001 From: gm10 <13855078+gm10@users.noreply.github.com> Date: Sun, 27 Jan 2019 18:21:17 +0100 Subject: [PATCH] Fix and clean up add_search_suggestions and add_apt_filter_results logic --- .../mintMenu/plugins/applications.py | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index b6cdb7f..33362c1 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -741,28 +741,11 @@ class pluginclass(object): if(not showns): i.grab_focus() showns = True - if not showns and os.path.exists("/usr/bin/mintinstall"): + if not showns: if len(text) >= 3: - if self.current_suggestion is not None and self.current_suggestion in text: - # We're restricting our search... - self.add_search_suggestions(text) - #if (len(self.current_results) > 0): - #self.add_apt_filter_results_sync(self.current_results, text) - #else: + self.add_search_suggestions(text) + if self.useAPT: GLib.timeout_add(300, self.add_apt_filter_results, text) - else: - self.current_results = [] - self.add_search_suggestions(text) - GLib.timeout_add(300, self.add_apt_filter_results, text) - - self.current_suggestion = text - else: - self.current_suggestion = None - self.current_results = [] - else: - self.current_suggestion = None - self.current_results = [] - for i in self.categoriesBox.get_children(): i.released() i.set_relief(Gtk.ReliefStyle.NONE)