File: migrating-GtkLabel-links.sgml

package info (click to toggle)
gtk%2B2.0 2.24.33-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates, trixie-updates
  • size: 124,860 kB
  • sloc: ansic: 574,091; makefile: 5,171; sh: 4,618; xml: 1,193; python: 1,117; perl: 749; awk: 49; cpp: 34
file content (24 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<chapter id="gtk-migrating-label-links">

  <title>Migrating from SexyUrlLabel to GtkLabel</title>

  <para>
    GTK+ 2.18 supports showing links inside a #GtkLabel, similar to
    SexyUrlLabel. Porting from SexyUrlLabel to GtkLabel is relatively
    straightforward. GtkLabel accepts links in the markup using the
    same HTML <tag>a</tag> notation that SexyUrlLabel uses. In addition
    to the href attribute, GtkLabel accepts a title attribute that
    is displayed as a tooltip on the link. Instead of
    sexy_url_label_set_markup(), just call gtk_label_set_markup().
  </para>
  <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 need for connecting to this signal is greatly reduced,
    since GtkLabel has a default handler that calls gtk_show_uri().
  </para>
</chapter>