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:
Matthias Clasen
2009-05-11 02:44:12 -04:00
parent 2f60e18c70
commit ae94c371d1
6 changed files with 81 additions and 65 deletions

View File

@ -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>

View File

@ -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 &lt;a href=\"http://www.gtk.org\" title=\"&amp;lt;i&amp;gt;Our&amp;/i&amp;gt; website\"&gt;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>