Page 1 of 1

[solved] mintMenu 4.7.8 - searches use only first term

Posted: Sun Jun 14, 2009 8:32 am
by emorrp1
Discovered when trying to turn a portal search into a google search: All the search suggestions use sys.argv[1] to get the search text, but if the search text contains spaces, only the first term will be found. This is particularly evident when looking at /usr/bin/mint-search-portal, as it attempts to replaces spaces with underscores later, so this line currently does absolutely nothing.

Suggested solution - in each of the tools replace sys.argv[1] with "CHAR".join(sys.argv[1:]), where CHAR is the joining character, e.g. _ for portal, - for apt based ones. This solution is better than just stripping the spaces in the applications plugin file as each tool can define its own concatenation (useful for e.g. google search using +), and enables the tools to be used independently of mintMenu.

Re: mintMenu 4.7.6 - search suggestions use only first term

Posted: Wed Jun 17, 2009 12:21 pm
by emorrp1
This has been independently confirmed: http://forums.linuxmint.com/viewtopic.php?f=165&t=27758
Note that his solution, while acceptable, is significantly slower than the join method.

Re: [solved] mintMenu 4.7.8 - searches use only first term

Posted: Tue Jul 14, 2009 9:02 am
by emorrp1