From e6fdecaba4708d4ab5a186943af5a842d98d2cab Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Mon, 20 May 2013 22:00:40 -0400 Subject: [PATCH] Don't show apps twice in search results --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 6a6e0ad..85902d9 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -817,11 +817,19 @@ class pluginclass( object ): self.changeTab( 1 ) text = widget.get_text() showns = False # Are any app shown? + shownList = [] for i in self.applicationsBox.get_children(): shown = i.filterText( text ) if (shown): - showns = True - + dupe = False + for item in shownList: + if i.desktopFile == item.desktopFile: + dupe = True + if dupe: + i.hide() + else: + shownList.append(i) + showns = True if (not showns and os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg")): if len(text) >= 3: if self.current_suggestion is not None and self.current_suggestion in text: