From cef9eec7cd70de9bf698ba03a5069117b6b9979a Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Mon, 6 Sep 2010 21:56:27 +0100 Subject: [PATCH] Added search engines --- debian/changelog | 6 + mintmenu.pot | 142 +++++++---- .../mintMenu/plugins/applications.glade | 2 + .../mintMenu/plugins/applications.py | 231 ++++++++++++++++-- .../mintMenu/search_engines/dictionary.png | Bin 0 -> 733 bytes .../mintMenu/search_engines/google.ico | Bin 0 -> 1150 bytes .../mintMenu/search_engines/hardware.png | Bin 0 -> 1181 bytes .../mintMenu/search_engines/ideas.png | Bin 0 -> 1092 bytes .../mintMenu/search_engines/software.png | Bin 0 -> 411 bytes .../mintMenu/search_engines/tutorials.png | Bin 0 -> 1237 bytes .../mintMenu/search_engines/users.png | Bin 0 -> 1257 bytes .../mintMenu/search_engines/wikipedia.ico | Bin 0 -> 318 bytes 12 files changed, 307 insertions(+), 74 deletions(-) create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/dictionary.png create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/google.ico create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/hardware.png create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/ideas.png create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/software.png create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/tutorials.png create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/users.png create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/wikipedia.ico 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 0000000000000000000000000000000000000000..b52281d4031550126bf5ed59ae36e8b56988d9b2 GIT binary patch literal 733 zcmV<30wVp1P)L zl21sKK^TXhneTIVTUli>-7H;6EDur8MGah*?A*CSm-5gx5c)^SlGLFNVP5)2AQV)m zpdjebrLZNdlP60ti^|p3sCC!fZ@-zh!{+K@w+3FAnZq-`_nB9T2>-L(waw7b&=%L# zM?<0DX+dIIsm0aR;svFY35J3ft+g@7(V4R6UkwJsk5Z{r5kQFu=ZDXZX{84fiKNrl zdmt2vM9AfGOuT+o@;=V$fn&$(>g(&t7xKJ+|E`oyPx!tucZbiXPLk~IpFex!FS+v%;u7ilgHGop8MvRD1kt_JUJ^Z+LpSjV|T6wO!F41wE z%>XM{D@Z6v+x2UFI&u^p4zpu$um+$v9ssPh6+i`rwU$6UPTPqS%#4gso}FdmqZ&Z# z^#p72MQjZ;nn-{#6yCh~SAu^51p9Z$#0r5}41ksC>6!$a95{|sDK|=~RAg7zZuaci zi(B@23l#nWY9zX@i!p|eGas0ooTTiPXm5|x)6>Vkz57Y0U-RwTR~%q@Y6{Qusy|n? zcl*u_V%u8i?CL;i&F^2odGhozN+}wn4K%kj@w2&^qF5e0ypJ(v9T1PVv$Ly{K%lPL zN@HUK+qbu3jHy=m))>YJrYTBxad{o^{N_vGB>-Nz#6tFS&UNZ^>(-8XfbT!%^S&wD zZB6k=pf0#^WKhZO{sj?@yX|&cgxJ_d0|o(W0wkiuMEv;W=W3v( z)q+3~th6X-V-^ZT+iD9Nw5Wh0X<8r_wUvGWQrV^LZkvVebm#HR_?tMBvv>E*ec$uG zXU<)v47oiXC7+q<#T2DxDy6a{Bqf>u^0M6Wii}$XPK8<0I>KX3QJ$1_XGfg4m7sUv z9K~w*c>_2 zz(cQ__{t3m%S;O1RTKz*@mq@CNQ_zaf8Yt-AT1Ony(LC^^Qg=5;GwIGC4|9>Q&KU9 z+)Alip~;tZ;RcOgbc|a!$qBZjz8yiIvPnH*F|93*I(Ute#vW|jhDn>{JMLvcmBP1G z;TQbkjZ;L20ZBOf&luju4pJNYP%W3xUkx(9;R1g~q7Ib)q2DR2yq(-?@&2KSze-b3 zAs#j=&K?Vr91goayGAEyyf{QnXD`>rZb%NS$q8N#7BhdVfp@3W7mnO5;^70~5{_-f zck|h5FU{|*;D_p081C+rjwR)`3CF^`bfAcA!RFTp*1=2ow@Yl6*rcd0oyV8UXS28D zHg-RrL3F6k^?W%pz*BW|$=)UPKGFCjyz<@mk@Ri5fnPLur5^`Y%;3`{9)hnfqOE?D z>(>(9zjhzzt~WFf?@{E`O4NzoU7|z6>(t+3Q1HINzSZ-%&~_MG`k07~(0lxIt`By* z9%_$P@IaZ=tTV~mZIUA%awYP1$Q+1|MS{OR&?D7s;?W^m)@O0-X+>z&bS`&>-29%V zS~6doL(a!ivqok}aF0|?Bm0Fs((m8wygoP1HnErit}HWJGR`}D=O;8PzjVdiD4v!V^lc8!qMjp zh-|VsTE3LfN=5rx&3DgDC-(PW?z`yvElz6MRoR=wG;F~+_2Z%^A|CqPGl-nQ!Jc-4 vYcl!bi4@Kqt`tj2MxqJw3Qx%XF0`I-Ikc-^&W9Ryu^WtA{w@6P0|)yrC_;$3 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4ebcca95fe22e5531d380a39e56f782e2a215f19 GIT binary patch literal 1181 zcmV;O1Y-M%P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2igP) z4;nM`SfEn?00bRLL_t(Y$K91nh?i9u#((cQ-*>+6?>Dy;n}M;xQp0Mj(bR<(f>y0k z5Fw(=qM&s{t1dLF7AXc1)PS^#h$4bW6HH5RAq9bXOS)L%1xLqG|1-tB;b_q9Ly>xq5aw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LZBGlVXu2Y6Rmv>7~I{an^LB{Ts5&Htg! literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7fbd95c175f4490049611effd30da52a475e5b26 GIT binary patch literal 1237 zcmV;`1SPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2igP; z3O5Ywy@EXe00dP@L_t(Y$F-GBY*b|whM#lic7EF7r_})cgSH4lAOb;SBMAwiD~YHv zVS!z!3#%a^u8A%*nz(Rb+?cR1BuG<8+z>ZPOk`t~P*B=b+L8w7bSV9q>D-xV=iZt5 zj*EMz9ZFl>cyDgg@E|- zs4)}+sj^vzty`KX?Jakf%ENuY$!bjN2?C57Kg_Bc=!#+sh#!nGhRI}tn*%pUrBc$m zz2(@&-ivRnNnpx8ctw9InIMSzdI}&Sh=65Tgd<@h(I}qlVM-=mTN^pErbNC6(+uE4BH^%hPAkQ7^V&~DLluE^pH3`bbP(ua3Lb42AEEKr^ z%~!N~3lsfq>rU-cp{M~nn{VyM39h-tBf>=I5g>WG=&-C{fC=CC_wjFKMhCCwk)MGeVj+P%mTglm75#!03RtF0P01tbWUz7$Dnb#ZlyP__`OpI5KyH;Hvjn{C zb)oa^cbKc&NVKjFcXozyVG+&cAfLqwOlAwjVqvmgNq~*3yGRrf!J?W(h;E3p`=fJ& zns<=Nq*+YOk;C$6 zNX{sWb`1-FNQm)RoI@Xf!GXgsm8*xx(?#}?scHE8F$x*xmX1hK5bTat)rS32^QFx6C}AqT~2$BxiE`bZwZe&3ka> z9g6NFKK8g{W3w`q7{tjq z77zx!l>`lQvopn(=9ZwhNmX~2s(k&Os`B}lSLl4@1hX^K*dZYvb8wuD2W$qWS4vcW z`t<47UpTn0Ta~5TsKz`sXAMa2mBAO=+d3p1F}bYcXjj+ChS^8I_9rJFobT=P)Px#24YJ`L;(K){{a7>y{D4^000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