I have a handler function:
bool test( const Glib::ustring& uri )
{
MessageBoxA( NULL, "hello", NULL, 0 );
return true;
}
and I connect
label2.set_markup( "<a href=\"http://www.google.com\">Google</a>" );
sigc::connection conn = label2.signal_activate_link().connect( sigc::ptr_fun( test ) );
I don’t understand why that doesn’t work. When I click on Google I can see it’s using the default URI handler not mine.
I had to make sure my function was called before the default. I’m guessing what happens is the default signal handler returns true and therefore the signal is not propagated?
Here is the correct code: