Search engines: Replace Google CSE with DDG
In the absence of locale detection, DDG should be the default engine for everybody. It's a Mint partner and a much better engine than CSE.
This commit is contained in:
parent
e18bcf5633
commit
60461c5a0b
@ -585,9 +585,9 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
if self.enableInternetSearch:
|
if self.enableInternetSearch:
|
||||||
suggestionButton = SuggestionButton(Gtk.STOCK_ADD, self.iconSize, "")
|
suggestionButton = SuggestionButton(Gtk.STOCK_ADD, self.iconSize, "")
|
||||||
suggestionButton.connect("clicked", self.search_google)
|
suggestionButton.connect("clicked", self.search_ddg)
|
||||||
suggestionButton.set_text(_("Search Google for %s") % text)
|
suggestionButton.set_text(_("Search DuckDuckGo for %s") % text)
|
||||||
suggestionButton.set_image("/usr/lib/linuxmint/mintMenu/search_engines/google.ico")
|
suggestionButton.set_image("/usr/lib/linuxmint/mintMenu/search_engines/ddg.png")
|
||||||
self.applicationsBox.add(suggestionButton)
|
self.applicationsBox.add(suggestionButton)
|
||||||
self.suggestions.append(suggestionButton)
|
self.suggestions.append(suggestionButton)
|
||||||
|
|
||||||
@ -1016,11 +1016,11 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
if self.enableInternetSearch:
|
if self.enableInternetSearch:
|
||||||
|
|
||||||
menuItem = Gtk.ImageMenuItem(_("Search Google"))
|
menuItem = Gtk.ImageMenuItem(_("Search DuckDuckGo"))
|
||||||
img = Gtk.Image()
|
img = Gtk.Image()
|
||||||
img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/google.ico')
|
img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/ddg.png')
|
||||||
menuItem.set_image(img)
|
menuItem.set_image(img)
|
||||||
menuItem.connect("activate", self.search_google)
|
menuItem.connect("activate", self.search_ddg)
|
||||||
menu.append(menuItem)
|
menu.append(menuItem)
|
||||||
|
|
||||||
menuItem = Gtk.ImageMenuItem(_("Search Wikipedia"))
|
menuItem = Gtk.ImageMenuItem(_("Search Wikipedia"))
|
||||||
@ -1104,11 +1104,11 @@ class pluginclass( object ):
|
|||||||
y = rect.y + rect.height
|
y = rect.y + rect.height
|
||||||
return (x, y, False)
|
return (x, y, False)
|
||||||
|
|
||||||
def search_google(self, widget):
|
def search_ddg(self, widget):
|
||||||
if self.enableInternetSearch:
|
if self.enableInternetSearch:
|
||||||
text = self.searchEntry.get_text()
|
text = self.searchEntry.get_text()
|
||||||
text = text.replace(" ", "+")
|
text = text.replace(" ", "+")
|
||||||
os.system("xdg-open \"http://www.google.com/cse?cx=002683415331144861350%3Atsq8didf9x0&ie=utf-8&sa=Search&q=" + text + "\" &")
|
os.system("xdg-open \"https://duckduckgo.com/?q=%s&t=lm&ia=web\" &" % text)
|
||||||
self.mintMenuWin.hide()
|
self.mintMenuWin.hide()
|
||||||
|
|
||||||
def search_wikipedia(self, widget):
|
def search_wikipedia(self, widget):
|
||||||
|
BIN
usr/lib/linuxmint/mintMenu/search_engines/ddg.png
Normal file
BIN
usr/lib/linuxmint/mintMenu/search_engines/ddg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 573 B |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user