[MlMt] Search with google

Benny Kjær Nielsen mailinglist at freron.com
Tue Sep 4 07:00:03 UTC 2012

On 4 Sep 2012, at 3:10, Bill Cole wrote:

> On 3 Sep 2012, at 15:05, Alexandre Takacs wrote:
>> I guess it's a system wide setting and not MM specific but how do I 
>> setup which internet browser will launch when I select some text in 
>> MM and do a "search with google" ?
> That service is provided by Safari, so to get another browser to 
> perform the same function you'd need that browser to register a 
> service with the OS. Completely outside of the realm of MailMate and 
> not even really a system-wide setting so much as it is a feature a 
> browser would need to offer.

That is correct if the question is about the Services menu (either in 
the main menu or the context sensitive menu), but there is also a 
“Search with Google” item in the context sensitive menu when 
right-clicking a word (at least on 10.7). I looked into this since it 
was not clear why that would not work with other browsers if the default 
browser had been changed (in Safaris General preferences pane). A simple 
implementation would simply ask the system to open a Google URL with the 
search query.

MailMate uses most of the menu items provided by default by the Webview 
class used for displaying messages. The relevant menu item is 
programmatically identified as `WebMenuItemTagSearchWeb` and it does 
insist on using Safari. I could overwrite this menu item with my own 
implementation, but there is a twist. The menu item is automatically 
renamed if the default search engine has been changed in Safari. For 
example, it is named “Search with Bing” if I change the default 
search engine to Bing. I am not sure there is a public API for accessing 
this setting.

In any case, the solution is probably that I make my own menu item(s) 
for searching and ideally it should be configurable. It would be 
relatively easy to allow the user to specify multiple URL format strings 
to be able to do any kind of URL lookup with the currently selected 


More information about the mailmate mailing list