Overriding url handler

Sadrul Habib Chowdhury imadil at gmail.com
Fri Aug 1 18:52:55 EDT 2008


* Chanwit Kaewkasi had this to say on [02 Aug 2008, 04:56:35 +0700]:
> Hello all,
> 
> I'm new to Pidgin and trying to develop a plugin for it. I would like
> my plugin to handle hyperlinks by itself.
> But I cannot override the default signal behaviour of the
> "url_clicked" event of GtkIMHtml, because the signal is currently
> emitted with flag G_SIGNAL_RUN_FIRST.
> 
> gtkimhtml.c (Pidgin 2.4.3) line 1343:
> 	signals[URL_CLICKED] = g_signal_new("url_clicked",
> 						G_TYPE_FROM_CLASS(gobject_class),
> 						G_SIGNAL_RUN_FIRST,
> 
> Is it possible to change this value to G_SIGNAL_RUN_LAST, so my plugin
> will be able to call g_signal_stop_emission_by_name() to change the
> behaviour of the default handler.

Perhaps we can also require the callbacks to return a gboolean value
(i.e. return TRUE when the event was handled, FALSE otherwise). So
instead of doing g_signal_stop_emission_by_name, your callback would
just return TRUE.

I wonder if we can change this without bumping the major.

Sadrul




More information about the Devel mailing list