[solved] mintMenu 4.7.8 - searches use only first term

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

[solved] mintMenu 4.7.8 - searches use only first term

Postby emorrp1 on Sun Jun 14, 2009 8:32 am

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.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Linux Mint is funded by ads and donations.
 

Re: mintMenu 4.7.6 - search suggestions use only first term

Postby emorrp1 on Wed Jun 17, 2009 12:21 pm

This has been independently confirmed: viewtopic.php?f=165&t=27758
Note that his solution, while acceptable, is significantly slower than the join method.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

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

Postby emorrp1 on Tue Jul 14, 2009 9:02 am

If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm


Return to Newbie Questions

Who is online

Users browsing this forum: Google [Bot], Pierre, UgoRipley, xenopeek and 27 guests