Add a separate keybinding signal for activating links
Keeping the keybinding signal and the regular signal separate is cleaner and allows us to pass the uri as a parameter to the activate-link signal.
This commit is contained in:
@ -18,9 +18,7 @@
|
||||
<para>
|
||||
One difference between the two APIs is that the ::url-activated signal
|
||||
from SexyUrlLabel has been replaced by the #GtkLabel::activate-link
|
||||
signal. The activated URI is no longer passed as an argument to the
|
||||
signal handler. Instead, call gtk_label_get_current_uri() to obtain it.
|
||||
However, the need for connecting to this signal is greatly reduced,
|
||||
signal. The need for connecting to this signal is greatly reduced,
|
||||
since GtkLabel has a default handler that calls gtk_show_uri().
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
@ -174,8 +174,8 @@ attribute is displayed as a tooltip on the link. An example looks like this:
|
||||
<informalexample><programlisting>
|
||||
gtk_label_set_markup (label, "Go to the <a href=\"http://www.gtk.org\" title=\"&lt;i&gt;Our&/i&gt; website\">GTK+ website</a> for more...");
|
||||
</programlisting></informalexample>
|
||||
It is possible to implement custom handling for links with the
|
||||
#GtkLabel::activate-link signal and the gtk_label_get_current_uri() function.
|
||||
It is possible to implement custom handling for links and their tooltips with
|
||||
the #GtkLabel::activate-link signal and the gtk_label_get_current_uri() function.
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
|
||||
Reference in New Issue
Block a user