File: gtk-migrating-label-links.html

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 (44 lines) | stat: -rw-r--r-- 3,124 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Migrating from SexyUrlLabel to GtkLabel: GTK+ 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="prev" href="gtk-migrating-entry-icons.html" title="Migrating from SexyIconEntry to GtkEntry">
<link rel="next" href="gtk-migrating-ClientSideWindows.html" title="Migrating to client-side windows">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="migrating.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtk-migrating-entry-icons.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk-migrating-ClientSideWindows.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="gtk-migrating-label-links"></a>Migrating from SexyUrlLabel to GtkLabel</h2></div></div></div>
<p>
    GTK+ 2.18 supports showing links inside a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>, similar to
    SexyUrlLabel. Porting from SexyUrlLabel to GtkLabel is relatively
    straightforward. GtkLabel accepts links in the markup using the
    same HTML <code class="sgmltag-element">a</code> 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
    <code class="function">sexy_url_label_set_markup()</code>, just call <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a>.
  </p>
<p>
    One difference between the two APIs is that the ::url-activated signal
    from SexyUrlLabel has been replaced by the <a class="link" href="GtkLabel.html#GtkLabel-activate-link" title="The “activate-link” signal"><span class="type">“activate-link”</span></a>
    signal. The need for connecting to this signal is greatly reduced,
    since GtkLabel has a default handler that calls <a class="link" href="gtk2-Filesystem-utilities.html#gtk-show-uri" title="gtk_show_uri ()"><code class="function">gtk_show_uri()</code></a>.
  </p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>