Re: open an URL in the "standard" gnome selected browser



Found out :)

So, for others searching for the same question, here is the code to launch the browser configured in gnome as the preferred application:

    if( ! gnome_url_show_on_screen ( url.c_str(), get_screen()->gobj(), 0 ) ) {
        logger.error( "Wasn't able to open URL : "+url );
        Gtk::MessageDialog message( *mywindow, 
            "An error has occurred while trying to launch the "
            "default web browser.\n\n"
            "Please check your settings in the "
            "'Preferred Applications' preference tool.\n\n"
            "You can continue with the login process, by opening"
            " the following address in your browser:\n\n"
            +url, false, Gtk::MESSAGE_WARNING );
        message.run();
    }

note, this code is scoped inside a method of a Gtk::Dialog derivate.

- jan



----- Original Message ----
From: Jan Pfeifer <pfjan yahoo com br>
To: gtkmm-list gnome org
Sent: Friday, June 9, 2006 10:33:05 AM
Subject: open an URL in the "standard" gnome selected browser

hi :)

any ideas how to achieve this ? I need the user to check an URL, outside the desktop program. How do I do this in a standard way for gnome ? 

thx for any help!

- jan



_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list






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