Page 1 of 1

[duplicate] Mint menu doesn't search more then one word

Posted: Wed Jun 17, 2009 5:51 am
by johonunu
When I type in filter field two words or more the menu recognize only first word. It does it to all : search portal and repos, show package and install package !
I fixed this using this Python code :

Code: Select all

#!/usr/bin/env python

import sys
import os
import commands

search_txt = ""

#make search text with all arguments passed
for i in range(1,len(sys.argv)):
	search_txt += sys.argv[i]
	if(i!=len(sys.argv)-1):
		search_txt += "_"  #this is for merging words with a "_", you can change this depending on query string (Google would have "+" for example)

releaseID = commands.getoutput("cat /etc/linuxmint/version/mintinstall/release.id")
if os.path.exists("/usr/bin/gconftool-2"):
	browser = commands.getoutput("gconftool-2 --get /desktop/gnome/url-handlers/http/command")
else:
	browser = "firefox %s"
link = "http://www.linuxmint.com/software/?sec=search&search=" + search_txt + "&release=" + str.strip(releaseID)
browser = browser.replace("\"%s\"", link)
browser = browser.replace("%s", link) 
os.system("/usr/lib/linuxmint/mintInstall/launch_browser.sh \"" + browser + "\" &")
Hope this helps :)

Re: Mint menu doesn't search more then one word

Posted: Wed Jun 17, 2009 6:18 am
by emorrp1
Please check the forum for existing topics that match your description before posting. This is especially important for the "Bugs" forum, where the problem and solutions need to be easily visible to the developers. I have already reported this, and posted a similar solution to yours: http://forums.linuxmint.com/viewtopic.php?f=165&t=27622

Thanks for the confirmation though, and please keep reporting bugs if you find them (but try the support sections first, in case it's a hardware issue or something)

Re: Mint menu doesn't search more then one word

Posted: Wed Jun 17, 2009 8:25 am
by johonunu
I am sorry, I didn't check first, my fault :( It won't happen again !
Should I rename this topic or something ? Or it's even better to remove it !

Re: Mint menu doesn't search more then one word

Posted: Wed Jun 17, 2009 8:46 am
by emorrp1
don't worry about it for now, I've linked to this one as a confirmation of mine, so it'll be ok to just leave it here.

Re: Mint menu doesn't search more then one word

Posted: Wed Jun 17, 2009 11:53 am
by scs
Hi emorrp1,
you have linked your topic to itself, I think.

Re: Mint menu doesn't search more then one word

Posted: Wed Jun 17, 2009 12:21 pm
by emorrp1
So I did :oops: fixed.