diff --git a/debian/changelog b/debian/changelog index 405f72a..883934e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mintmenu (5.0.1) julia; urgency=low + + * Added search engines to mintMenu + + -- Clement Lefebvre Mon, 06 Sep 2010 21:55:00 +0000 + mintmenu (5.0.0) julia; urgency=low * Filtering now uses APT to fetch results and apturl to install packages diff --git a/mintmenu.pot b/mintmenu.pot index 2749017..fdabfd5 100644 --- a/mintmenu.pot +++ b/mintmenu.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-27 08:37+0100\n" +"POT-Creation-Date: 2010-09-06 21:55+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -142,7 +142,7 @@ msgid "Options" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:64 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:244 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:262 msgid "Applications" msgstr "" @@ -151,8 +151,8 @@ msgid "Colors" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:67 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:230 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:235 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:248 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:253 msgid "Favorites" msgstr "" @@ -214,27 +214,27 @@ msgid "Toggle Default Places:" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:88 -#: usr/lib/linuxmint/mintMenu/plugins/places.py:144 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:145 msgid "Computer" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:89 -#: usr/lib/linuxmint/mintMenu/plugins/places.py:151 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:152 msgid "Home Folder" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:90 -#: usr/lib/linuxmint/mintMenu/plugins/places.py:158 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:159 msgid "Network" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:91 -#: usr/lib/linuxmint/mintMenu/plugins/places.py:178 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:179 msgid "Desktop" msgstr "" #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:92 -#: usr/lib/linuxmint/mintMenu/plugins/places.py:185 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:186 msgid "Trash" msgstr "" @@ -323,105 +323,143 @@ msgstr "" msgid "Recent documents" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:228 -msgid "Filter:" +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:246 +msgid "Search:" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:232 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:233 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:250 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:251 msgid "All applications" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:632 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:633 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:605 #, python-format -msgid "Search portal for '%s'" +msgid "Search Google for %s" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:636 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:637 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:612 #, python-format -msgid "Search repositories for '%s'" +msgid "Search Wikipedia for %s" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:640 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:641 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:627 #, python-format -msgid "Show package '%s'" +msgid "Lookup %s in Dictionary" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:644 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:645 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:634 +#, python-format +msgid "Search Computer for %s" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:679 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:697 #, python-format msgid "Install package '%s'" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:697 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:762 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:765 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:830 msgid "Add to desktop" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:698 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:763 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:766 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:831 msgid "Add to panel" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:700 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:745 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:768 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:813 msgid "Insert space" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:701 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:746 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:769 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:814 msgid "Insert separator" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:703 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:766 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:771 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:834 msgid "Launch when I log in" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:705 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:768 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:773 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:836 msgid "Launch" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:706 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:774 msgid "Remove from favorites" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:708 -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:772 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:776 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:840 msgid "Edit properties" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:744 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:812 msgid "Remove" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:765 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:833 msgid "Show in my favorites" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:769 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:837 msgid "Uninstall" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:770 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:838 msgid "Delete from menu" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:1225 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:890 +msgid "Search Google" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:897 +msgid "Search Wikipedia" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:907 +msgid "Lookup Dictionnary" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:914 +msgid "Search Computer" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:924 +msgid "Find Software" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:931 +msgid "Find Tutorials" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:938 +msgid "Find Hardware" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:945 +msgid "Find Ideas" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:952 +msgid "Find Users" +msgstr "" + +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:1425 msgid "" "Couldn't save favorites. Check if you have write access to ~/.linuxmint/" "mintMenu" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:1408 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:1608 msgid "All" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/applications.py:1408 +#: usr/lib/linuxmint/mintMenu/plugins/applications.py:1608 msgid "Show all applications" msgstr "" @@ -457,27 +495,27 @@ msgstr "" msgid "Shutdown, restart, suspend or hibernate" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/places.py:148 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:149 msgid "" "Browse all local and remote disks and folders accessible from this computer" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/places.py:155 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:156 msgid "Open your personal folder" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/places.py:162 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:163 msgid "Browse bookmarked and local network locations" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/places.py:182 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:183 msgid "Browse items placed on the desktop" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/places.py:191 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:192 msgid "Browse deleted files" msgstr "" -#: usr/lib/linuxmint/mintMenu/plugins/places.py:204 +#: usr/lib/linuxmint/mintMenu/plugins/places.py:207 msgid "Empty trash" msgstr "" diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.glade b/usr/lib/linuxmint/mintMenu/plugins/applications.glade index ecc2902..20f99e1 100644 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.glade +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.glade @@ -318,10 +318,12 @@ 28 + True True True True False + none False diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 30de061..0fd3508 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -163,12 +163,8 @@ class Menu: class SuggestionButton ( gtk.Button ): - def __init__( self, iconName, iconSize, label ): - - - gtk.Button.__init__( self ) - - + def __init__( self, iconName, iconSize, label ): + gtk.Button.__init__( self ) iconSize = self.get_icon_size(iconSize) self.iconName = iconName self.set_relief( gtk.RELIEF_NONE ) @@ -193,11 +189,9 @@ class SuggestionButton ( gtk.Button ): self.add( Align1 ) self.show() - - - - - + def set_image(self, path): + self.image.set_from_file(path) + def get_icon_size (self, iconSize): if isinstance(iconSize, int): if iconSize >= 4: @@ -249,7 +243,7 @@ class pluginclass( object ): self.applicationsScrolledWindow = self.wTree.get_widget( "applicationsScrolledWindow" ) #i18n - self.wTree.get_widget("searchLabel").set_text("" + _("Filter:") + "") + self.wTree.get_widget("searchLabel").set_text("" + _("Search:") + "") self.wTree.get_widget("searchLabel").set_use_markup(True) self.wTree.get_widget("label6").set_text("" + _("Favorites") + "") self.wTree.get_widget("label6").set_use_markup(True) @@ -284,7 +278,7 @@ class pluginclass( object ): self.showFavoritesButton.connect( "drag_data_received", self.ReceiveCallback ) self.showFavoritesButton.drag_dest_set( gtk.DEST_DEFAULT_MOTION | gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP, self.toButton, gtk.gdk.ACTION_COPY ) - self.searchButton.connect( "button_release_event", self.SearchWithButton ) + # self.searchButton.connect( "button_release_event", self.SearchWithButton ) self.gconfHandlers = [] # Gconf stuff @@ -349,6 +343,8 @@ class pluginclass( object ): self.suggestions = [] self.current_suggestion = None self.get_panel() + + self.wTree.get_widget("searchButton").connect( "button-release-event", self.searchPopup ) def get_panel(self): self.panel = None @@ -600,6 +596,53 @@ class pluginclass( object ): gobject.source_remove( self.filterTimer ) self.filterTimer = None + def add_search_suggestions(self, text): + + text = "%s" % text + + suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "") + suggestionButton.connect("clicked", self.search_google) + suggestionButton.set_text(_("Search Google for %s") % text) + suggestionButton.set_image("/usr/lib/linuxmint/mintMenu/search_engines/google.ico") + self.applicationsBox.add(suggestionButton) + self.suggestions.append(suggestionButton) + + suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "") + suggestionButton.connect("clicked", self.search_wikipedia) + suggestionButton.set_text(_("Search Wikipedia for %s") % text) + suggestionButton.set_image("/usr/lib/linuxmint/mintMenu/search_engines/wikipedia.ico") + self.applicationsBox.add(suggestionButton) + self.suggestions.append(suggestionButton) + + separator = gtk.EventBox() + separator.add(gtk.HSeparator()) + separator.set_size_request(-1, 20) + separator.type = "separator" + separator.show_all() + self.applicationsBox.add(separator) + self.suggestions.append(separator) + + suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "") + suggestionButton.connect("clicked", self.search_dictionary) + suggestionButton.set_text(_("Lookup %s in Dictionary") % text) + suggestionButton.set_image("/usr/lib/linuxmint/mintMenu/search_engines/dictionary.png") + self.applicationsBox.add(suggestionButton) + self.suggestions.append(suggestionButton) + + suggestionButton = SuggestionButton(gtk.STOCK_FIND, self.iconSize, "") + suggestionButton.connect("clicked", self.Search) + suggestionButton.set_text(_("Search Computer for %s") % text) + self.applicationsBox.add(suggestionButton) + self.suggestions.append(suggestionButton) + + self.last_separator = gtk.EventBox() + self.last_separator.add(gtk.HSeparator()) + self.last_separator.set_size_request(-1, 20) + self.last_separator.type = "separator" + self.last_separator.show_all() + self.applicationsBox.add(self.last_separator) + self.suggestions.append(self.last_separator) + def Filter( self, widget, category = None ): self.filterTimer = None @@ -621,33 +664,45 @@ class pluginclass( object ): if (shown): showns = True - if (not showns and os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg")): - if len(text) >= 3: + 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: - # We're restricting our search... + # We're restricting our search... + self.add_search_suggestions(text) + found_packages = 0 for pkg in self.current_results: if text in pkg.name: + found_packages+=1 name = pkg.name.replace(text, "%s" % text); suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "") suggestionButton.connect("clicked", self.apturl_install, pkg.name) suggestionButton.set_text(_("Install package '%s'") % name) - suggestionButton.set_tooltip_text(_("%s\n\n%s\n\n\n%s") % (pkg.name, pkg.summary.capitalize(), pkg.description)) + suggestionButton.set_tooltip_text("%s\n\n%s\n\n\n%s" % (pkg.name, pkg.summary.capitalize(), pkg.description)) suggestionButton.set_icon_size(self.iconSize) self.applicationsBox.add(suggestionButton) self.suggestions.append(suggestionButton) + if found_packages == 0: + self.applicationsBox.remove(self.last_separator) + self.suggestions.remove(self.last_separator) else: - self.current_results = [] + self.current_results = [] + self.add_search_suggestions(text) + found_packages = 0 for pkg in self.apt_cache: if text in pkg.name: + found_packages+=1 name = pkg.name.replace(text, "%s" % text); suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "") suggestionButton.connect("clicked", self.apturl_install, pkg.name) suggestionButton.set_text(_("Install package '%s'") % name) - suggestionButton.set_tooltip_text(_("%s\n\n%s\n\n%s") % (pkg.name, pkg.summary.capitalize(), pkg.description)) + suggestionButton.set_tooltip_text("%s\n\n%s\n\n%s" % (pkg.name, pkg.summary.capitalize(), pkg.description)) suggestionButton.set_icon_size(self.iconSize) self.applicationsBox.add(suggestionButton) self.suggestions.append(suggestionButton) - self.current_results.append(pkg) + self.current_results.append(pkg) + if found_packages == 0: + self.applicationsBox.remove(self.last_separator) + self.suggestions.remove(self.last_separator) self.current_suggestion = text else: @@ -828,6 +883,139 @@ class pluginclass( object ): startupMenuItem.connect( "toggled", self.onAddToStartup, widget ) mTree.get_widget( "applicationsMenu" ).popup( None, None, None, event.button, event.time ) + + def searchPopup( self, widget=None, event=None ): + menu = gtk.Menu() + + menuItem = gtk.ImageMenuItem(_("Search Google")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/google.ico') + menuItem.set_image(img) + menuItem.connect("activate", self.search_google) + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Search Wikipedia")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/wikipedia.ico') + menuItem.set_image(img) + menuItem.connect("activate", self.search_wikipedia) + menu.append(menuItem) + + menuItem = gtk.SeparatorMenuItem() + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Lookup Dictionnary")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/dictionary.png') + menuItem.set_image(img) + menuItem.connect("activate", self.search_dictionary) + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Search Computer")) + img = gtk.Image() + img.set_from_stock(gtk.STOCK_FIND, self.iconSize) + menuItem.set_image(img) + menuItem.connect("activate", self.Search) + menu.append(menuItem) + + menuItem = gtk.SeparatorMenuItem() + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Find Software")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/software.png') + menuItem.set_image(img) + menuItem.connect("activate", self.search_mint_software) + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Find Tutorials")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/tutorials.png') + menuItem.set_image(img) + menuItem.connect("activate", self.search_mint_tutorials) + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Find Hardware")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/hardware.png') + menuItem.set_image(img) + menuItem.connect("activate", self.search_mint_hardware) + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Find Ideas")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/ideas.png') + menuItem.set_image(img) + menuItem.connect("activate", self.search_mint_ideas) + menu.append(menuItem) + + menuItem = gtk.ImageMenuItem(_("Find Users")) + img = gtk.Image() + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/users.png') + menuItem.set_image(img) + menuItem.connect("activate", self.search_mint_users) + menu.append(menuItem) + + menu.show_all() + #menu.popup( None, None, self.pos_func, 3, 0) + menu.popup( None, None, None, 3, 0) + #menu.attach_to_widget(self.searchButton, None) + #menu.reposition() + #menu.reposition() + + def pos_func(self, menu=None): + rect = self.searchButton.get_allocation() + x = rect.x + rect.width + y = rect.y + rect.height + return (x, y, False) + + def search_google(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "+") + os.system("xdg-open \"http://www.google.com/cse?cx=002683415331144861350%3Atsq8didf9x0&ie=utf-8&sa=Search&q=" + text + "\" &") + self.mintMenuWin.hide() + + def search_wikipedia(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "+") + os.system("xdg-open \"http://en.wikipedia.org/wiki/Special:Search?search=" + text + "\" &") + self.mintMenuWin.hide() + + def search_dictionary(self, widget): + text = self.searchEntry.get_text() + os.system("gnome-dictionary \"" + text + "\" &") + self.mintMenuWin.hide() + + def search_mint_tutorials(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "%20") + os.system("xdg-open \"http://community.linuxmint.com/index.php/tutorial/search/0/" + text + "\" &") + self.mintMenuWin.hide() + + def search_mint_ideas(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "%20") + os.system("xdg-open \"http://community.linuxmint.com/index.php/idea/search/0/" + text + "\" &") + self.mintMenuWin.hide() + + def search_mint_users(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "%20") + os.system("xdg-open \"http://community.linuxmint.com/index.php/user/search/0/" + text + "\" &") + self.mintMenuWin.hide() + + def search_mint_hardware(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "%20") + os.system("xdg-open \"http://community.linuxmint.com/index.php/hardware/search/0/" + text + "\" &") + self.mintMenuWin.hide() + + def search_mint_software(self, widget): + text = self.searchEntry.get_text() + text = text.replace(" ", "%20") + os.system("xdg-open \"http://community.linuxmint.com/index.php/software/search/0/" + text + "\" &") + self.mintMenuWin.hide() + def add_to_desktop(self, widget, desktopEntry): try: @@ -985,8 +1173,7 @@ class pluginclass( object ): def Search( self, widget ): text = self.searchEntry.get_text().strip() - if text != "": - self.searchEntry.set_text( "" ) + if text != "": self.mintMenuWin.hide() fullstring = self.searchtool.replace( "%s", text ) newstring = fullstring.split() diff --git a/usr/lib/linuxmint/mintMenu/search_engines/dictionary.png b/usr/lib/linuxmint/mintMenu/search_engines/dictionary.png new file mode 100644 index 0000000..b52281d Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/dictionary.png differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/google.ico b/usr/lib/linuxmint/mintMenu/search_engines/google.ico new file mode 100644 index 0000000..ee7c943 Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/google.ico differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/hardware.png b/usr/lib/linuxmint/mintMenu/search_engines/hardware.png new file mode 100644 index 0000000..4ebcca9 Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/hardware.png differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/ideas.png b/usr/lib/linuxmint/mintMenu/search_engines/ideas.png new file mode 100644 index 0000000..913fa51 Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/ideas.png differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/software.png b/usr/lib/linuxmint/mintMenu/search_engines/software.png new file mode 100644 index 0000000..a074a67 Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/software.png differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/tutorials.png b/usr/lib/linuxmint/mintMenu/search_engines/tutorials.png new file mode 100644 index 0000000..7fbd95c Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/tutorials.png differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/users.png b/usr/lib/linuxmint/mintMenu/search_engines/users.png new file mode 100644 index 0000000..5d9415c Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/users.png differ diff --git a/usr/lib/linuxmint/mintMenu/search_engines/wikipedia.ico b/usr/lib/linuxmint/mintMenu/search_engines/wikipedia.ico new file mode 100644 index 0000000..31b0e38 Binary files /dev/null and b/usr/lib/linuxmint/mintMenu/search_engines/wikipedia.ico differ