From 60461c5a0bb200aa51db96cb6619bae783036f8d Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Wed, 23 Nov 2016 15:13:29 +0000 Subject: [PATCH] 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. --- .../linuxmint/mintMenu/plugins/applications.py | 16 ++++++++-------- .../linuxmint/mintMenu/search_engines/ddg.png | Bin 0 -> 573 bytes .../mintMenu/search_engines/google.ico | Bin 1150 -> 0 bytes 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 usr/lib/linuxmint/mintMenu/search_engines/ddg.png delete mode 100644 usr/lib/linuxmint/mintMenu/search_engines/google.ico diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 3ba9f5d..5052e87 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -585,9 +585,9 @@ class pluginclass( object ): if self.enableInternetSearch: 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") + suggestionButton.connect("clicked", self.search_ddg) + suggestionButton.set_text(_("Search DuckDuckGo for %s") % text) + suggestionButton.set_image("/usr/lib/linuxmint/mintMenu/search_engines/ddg.png") self.applicationsBox.add(suggestionButton) self.suggestions.append(suggestionButton) @@ -1016,11 +1016,11 @@ class pluginclass( object ): if self.enableInternetSearch: - menuItem = Gtk.ImageMenuItem(_("Search Google")) + menuItem = Gtk.ImageMenuItem(_("Search DuckDuckGo")) 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.connect("activate", self.search_google) + menuItem.connect("activate", self.search_ddg) menu.append(menuItem) menuItem = Gtk.ImageMenuItem(_("Search Wikipedia")) @@ -1104,11 +1104,11 @@ class pluginclass( object ): y = rect.y + rect.height return (x, y, False) - def search_google(self, widget): + def search_ddg(self, widget): if self.enableInternetSearch: 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 + "\" &") + os.system("xdg-open \"https://duckduckgo.com/?q=%s&t=lm&ia=web\" &" % text) self.mintMenuWin.hide() def search_wikipedia(self, widget): diff --git a/usr/lib/linuxmint/mintMenu/search_engines/ddg.png b/usr/lib/linuxmint/mintMenu/search_engines/ddg.png new file mode 100644 index 0000000000000000000000000000000000000000..7cdf03da1fc92d541630a79ddfea76e9faa111ae GIT binary patch literal 573 zcmV-D0>b@?P)K^GH`!qT|a%Z>_lDeL=ruJzv0>?6<|f-@wwQ0B9e8dS2qsOx%MH zVu$3kBT!hRt^cGgP|ace4zoVdLA?;hS{MEA7}MozCU{u)d;epuW?We^OX&rT>j!Fd!r1{xX1wd{<6eq&t0;|UosrH#G!>X zx9!X(*|uz1o~6o4vU276W208nOw;^ptg2O2RBs*AH=@_*or*}V00000 LNkvXXu0mjflur-o literal 0 HcmV?d00001 diff --git a/usr/lib/linuxmint/mintMenu/search_engines/google.ico b/usr/lib/linuxmint/mintMenu/search_engines/google.ico deleted file mode 100644 index ee7c943abf1064e3110161deb3a6477fcc7789b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmai!ZEO@(6o&8IDMXq|w?7~;fHp>@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