Search engines: Fix community links when Internet search is disabled
This commit is contained in:
parent
f37700f5a0
commit
d1ee760670
@ -1105,18 +1105,16 @@ class pluginclass( object ):
|
|||||||
return (x, y, False)
|
return (x, y, False)
|
||||||
|
|
||||||
def search_ddg(self, widget):
|
def search_ddg(self, widget):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "+")
|
||||||
text = text.replace(" ", "+")
|
os.system("xdg-open \"https://duckduckgo.com/?q=%s&t=lm&ia=web\" &" % 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):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "+")
|
||||||
text = text.replace(" ", "+")
|
os.system("xdg-open \"http://en.wikipedia.org/wiki/Special:Search?search=" + text + "\" &")
|
||||||
os.system("xdg-open \"http://en.wikipedia.org/wiki/Special:Search?search=" + text + "\" &")
|
self.mintMenuWin.hide()
|
||||||
self.mintMenuWin.hide()
|
|
||||||
|
|
||||||
def search_dictionary(self, widget):
|
def search_dictionary(self, widget):
|
||||||
text = self.searchEntry.get_text()
|
text = self.searchEntry.get_text()
|
||||||
@ -1124,39 +1122,34 @@ class pluginclass( object ):
|
|||||||
self.mintMenuWin.hide()
|
self.mintMenuWin.hide()
|
||||||
|
|
||||||
def search_mint_tutorials(self, widget):
|
def search_mint_tutorials(self, widget):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "%20")
|
||||||
text = text.replace(" ", "%20")
|
os.system("xdg-open \"http://community.linuxmint.com/index.php/tutorial/search/0/" + text + "\" &")
|
||||||
os.system("xdg-open \"http://community.linuxmint.com/index.php/tutorial/search/0/" + text + "\" &")
|
self.mintMenuWin.hide()
|
||||||
self.mintMenuWin.hide()
|
|
||||||
|
|
||||||
def search_mint_ideas(self, widget):
|
def search_mint_ideas(self, widget):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "%20")
|
||||||
text = text.replace(" ", "%20")
|
os.system("xdg-open \"http://community.linuxmint.com/index.php/idea/search/0/" + text + "\" &")
|
||||||
os.system("xdg-open \"http://community.linuxmint.com/index.php/idea/search/0/" + text + "\" &")
|
self.mintMenuWin.hide()
|
||||||
self.mintMenuWin.hide()
|
|
||||||
|
|
||||||
def search_mint_users(self, widget):
|
def search_mint_users(self, widget):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "%20")
|
||||||
text = text.replace(" ", "%20")
|
os.system("xdg-open \"http://community.linuxmint.com/index.php/user/search/0/" + text + "\" &")
|
||||||
os.system("xdg-open \"http://community.linuxmint.com/index.php/user/search/0/" + text + "\" &")
|
self.mintMenuWin.hide()
|
||||||
self.mintMenuWin.hide()
|
|
||||||
|
|
||||||
def search_mint_hardware(self, widget):
|
def search_mint_hardware(self, widget):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "%20")
|
||||||
text = text.replace(" ", "%20")
|
os.system("xdg-open \"http://community.linuxmint.com/index.php/hardware/search/0/" + text + "\" &")
|
||||||
os.system("xdg-open \"http://community.linuxmint.com/index.php/hardware/search/0/" + text + "\" &")
|
self.mintMenuWin.hide()
|
||||||
self.mintMenuWin.hide()
|
|
||||||
|
|
||||||
def search_mint_software(self, widget):
|
def search_mint_software(self, widget):
|
||||||
if self.enableInternetSearch:
|
text = self.searchEntry.get_text()
|
||||||
text = self.searchEntry.get_text()
|
text = text.replace(" ", "%20")
|
||||||
text = text.replace(" ", "%20")
|
os.system("xdg-open \"http://community.linuxmint.com/index.php/software/search/0/" + text + "\" &")
|
||||||
os.system("xdg-open \"http://community.linuxmint.com/index.php/software/search/0/" + text + "\" &")
|
self.mintMenuWin.hide()
|
||||||
self.mintMenuWin.hide()
|
|
||||||
|
|
||||||
def add_to_desktop(self, widget, desktopEntry):
|
def add_to_desktop(self, widget, desktopEntry):
|
||||||
os.system("xdg-desktop-icon install --novendor %s" % desktopEntry.desktopFile)
|
os.system("xdg-desktop-icon install --novendor %s" % desktopEntry.desktopFile)
|
||||||
|
Loading…
Reference in New Issue
Block a user