[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Executing Default Web Browser?



Alex Bligh wrote:

Yuck! Don't do that :-) Quite apart from the question "what name"
("mozilla", "mozilla-firefox") there is the question "where", and
"which of the ones you find".

Try the other thing I suggested, which is to use the MimeType stuff.
This is the mechanism an email client uses when clicking on an HTML
link. So, use
    wxMimeTypesManager::GetFileTypeFromMimeType
to get a wxFileType * for your HTML file, and, e.g.
    wxFileType::GetOpenCommand

This is exactly what wxLaunchDefaultBrowser does. The file I had to edit was /usr/share/mime-info/gnome-vfs.keys, which contains this information (Gnome had defaulted to Epiphany, which is fair enough since it's the browser it ships with, but I hadn't installed it).

   Luke