pan-devel
[Top][All Lists]
Advanced

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

Re: [Pan-devel] default web browser


From: Evan Martin
Subject: Re: [Pan-devel] default web browser
Date: Sun, 30 Nov 2003 18:41:02 -0800
User-agent: Mutt/1.4.1i

On Wed, Nov 26, 2003 at 02:35:10AM -0500, Alexandre Jasmin wrote:
> Windows also have a default web browser that can be launched using the
> base api. Unfortunately that would require some #ifdef and I don't see
> any macro in the configure script that strive to detect windows.

GLib tells you it's on windows via the G_OS_WIN32 define.

This code does the trick:

#ifdef G_OS_WIN32
#include <windows.h>
void
spawn_url(GtkWindow *parent, const char *url) {
    ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
}
#else
/* tricky pan code here that provides the same function. */
#endif


(I pass in a GtkWindow to both so I can parent error dialogs to the
proper Window.)

-- 
Evan Martin
address@hidden
http://neugierig.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]