Gtk::About::set_url_hook



I want to use the Gtk::About::set_url_hook function to open a web browser and display my website. I want to be able to detect the default browser and open my url. This needs to work in windows or linux
so far my code looks like this:

void CwinMain::on_m_about_activate()
{
   struct tmp{ static void ShowURL( Gtk::Window& w, Glib::ustring s ){
      // what do i put here to open a web browser?????
   }};
Gtk::AboutDialog::set_url_hook(sigc::ptr_fun(&tmp::ShowURL)); Gtk::AboutDialog *about = new Gtk::AboutDialog(); Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create_from_xpm_data( about_xpm ); about->set_name( "test" );
   about->set_version("0.1.1" );
   about->set_logo( pixbuf );
   about->set_website_label( "website" );
   about->set_website( "www.google.com" );
about->set_icon_from_file(ICON ); about->set_transient_for( *this );
   int result = about->run();
switch( result ){
       default:
           delete about;
           raise();
   }
}

--
Jason Burchfield
CAS, Inc.
(256) 971-6096
Jason Burchfield cas-inc com




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