Add an example to the docs.

Fri Sep 17 11:20:03 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtklabel.c (gtk_label_set_markup): Add an example to the
        docs.
This commit is contained in:
Jonathan Blandford 2004-09-17 15:20:31 +00:00 committed by Jonathan Blandford
parent 5717212948
commit 4e7e404938
8 changed files with 52 additions and 7 deletions

View File

@ -1,3 +1,8 @@
Fri Sep 17 11:20:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtklabel.c (gtk_label_set_markup): Add an example to the
docs.
Thu Sep 16 23:20:05 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkselection.c (selection_get_text_plain):

View File

@ -1,3 +1,8 @@
Fri Sep 17 11:20:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtklabel.c (gtk_label_set_markup): Add an example to the
docs.
Thu Sep 16 23:20:05 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkselection.c (selection_get_text_plain):

View File

@ -1,3 +1,8 @@
Fri Sep 17 11:20:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtklabel.c (gtk_label_set_markup): Add an example to the
docs.
Thu Sep 16 23:20:05 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkselection.c (selection_get_text_plain):

View File

@ -1,3 +1,8 @@
Fri Sep 17 11:20:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtklabel.c (gtk_label_set_markup): Add an example to the
docs.
Thu Sep 16 23:20:05 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkselection.c (selection_get_text_plain):

View File

@ -83,11 +83,11 @@ linkend="PangoMarkupFormat">complete documentation</link> of available
tags in the Pango manual.)
</para>
<para>
The markup passed to gtk_label_set_markup() must be valid; for
example, literal &lt;/&gt;/&amp; characters must be escaped as
&amp;lt;, &amp;gt;, and &amp;amp;. If you pass text obtained from
the user, file, or a network to gtk_label_set_markup(),
you'll want to escape it with g_markup_escape_text().
The markup passed to gtk_label_set_markup() must be valid; for example,
literal &lt;/&gt;/&amp; characters must be escaped as &amp;lt;,
&amp;gt;, and &amp;amp;. If you pass text obtained from the user, file,
or a network to gtk_label_set_markup(), you'll want to escape it with
g_markup_escape_text() or g_markup_printf_escaped().
</para>
<para>
Markup strings are just a convenient way to set the #PangoAttrList on

View File

@ -28,6 +28,16 @@ Base class for widgets which visualize an adjustment
@range: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkRange::change-value ##### -->
<para>
</para>
@range: the object which received the signal.
@arg1:
@arg2:
@Returns:
<!-- ##### SIGNAL GtkRange::move-slider ##### -->
<para>
Virtual function that moves the slider. Used for keybindings.

View File

@ -110,6 +110,11 @@ Sharing settings between applications
</para>
<!-- ##### ARG GtkSettings:gtk-modules ##### -->
<para>
</para>
<!-- ##### ARG GtkSettings:gtk-split-cursor ##### -->
<para>

View File

@ -1122,8 +1122,18 @@ set_markup (GtkLabel *label,
* @label: a #GtkLabel
* @str: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
*
* Parses @str which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>,
* setting the label's text and attribute list based on the parse results.
* Parses @str which is marked up with the <link
* linkend="PangoMarkupFormat">Pango text markup language</link>, setting the
* label's text and attribute list based on the parse results. If the @str is
* external data, you may need to escape it with g_markup_escape_text() or
* g_markup_printf_escaped()<!-- -->:
* <informalexample><programlisting>
* char *markup;
* <!-- -->
* markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;%s&lt;/span&gt;", str);
* gtk_label_set_markup (GTK_LABEL (label), markup);
* g_free (markup);
* </programlisting></informalexample>
**/
void
gtk_label_set_markup (GtkLabel *label,