1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Migrating from SexyUrlLabel to GtkLabel</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
9
<link rel="prev" href="gtk-migrating-entry-icons.html" title="Migrating from SexyIconEntry to GtkEntry">
10
<link rel="next" href="gtk-migrating-ClientSideWindows.html" title="Migrating to client-side windows">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16
<td><a accesskey="p" href="gtk-migrating-entry-icons.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17
<td><a accesskey="u" href="migrating.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
20
<td><a accesskey="n" href="gtk-migrating-ClientSideWindows.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<div class="titlepage"><div><div><h2 class="title">
24
<a name="gtk-migrating-label-links"></a>Migrating from SexyUrlLabel to GtkLabel</h2></div></div></div>
26
GTK+ 2.18 supports showing links inside a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>, similar to
27
SexyUrlLabel. Porting from SexyUrlLabel to GtkLabel is relatively
28
straightforward. GtkLabel accepts links in the markup using the
29
same HTML <code class="sgmltag-element">a</code> notation that SexyUrlLabel uses. In addition
30
to the href attribute, GtkLabel accepts a title attribute that
31
is displayed as a tooltip on the link. Instead of
32
<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>.
35
One difference between the two APIs is that the ::url-activated signal
36
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>
37
signal. The need for connecting to this signal is greatly reduced,
38
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>.
43
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'