+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
+2000-11-01 Havoc Pennington <hp@redhat.com>
+
+ * gtk/testgtk.c (create_labels): Test set_markup_with_accel()
+
+ * gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
+ before returning it.
+
2000-11-01 Havoc Pennington <hp@redhat.com>
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
Clip the rectangle to be rendered to the drawable, since
- get_from_drawable() requires a region within the drawable
+ get_from_drawable() requires a region within the drawable
2000-11-01 Havoc Pennington <hp@redhat.com>
}
if (accel_char != 0)
- return gdk_keyval_to_lower (accel_char);
+ return gdk_keyval_to_lower (gdk_unicode_to_keyval (accel_char));
else
return GDK_VoidSymbol;
}
if (!window)
{
+ guint keyval;
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
frame = gtk_frame_new ("Markup label");
label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "This <span foreground=\"blue\" background=\"orange\">label</span> has "
- "<b>markup</b> such as "
- "<big><i>Big Italics</i></big>\n"
- "<tt>Monospace font</tt>\n"
- "<u>Underline!</u>\n"
- "foo\n"
- "<span foreground=\"green\" background=\"red\">Ugly colors</span>\n"
- "and nothing on this line,\n"
- "or this.\n"
- "or this either\n"
- "or even on this one\n"
- "la <big>la <big>la <big>la <big>la</big></big></big></big>\n"
- "but this word is <span foreground=\"purple\"><big>purple</big></span>\n"
- "We like <sup>superscript</sup> and <sub>subscript</sub> too");
+ /* There's also a gtk_label_set_markup() without accel if you
+ * don't have an accelerator key
+ */
+ keyval =
+ gtk_label_set_markup_with_accel (GTK_LABEL (label),
+ "This <span foreground=\"blue\" background=\"orange\">label</span> has "
+ "<b>markup</b> _such as "
+ "<big><i>Big Italics</i></big>\n"
+ "<tt>Monospace font</tt>\n"
+ "<u>Underline!</u>\n"
+ "foo\n"
+ "<span foreground=\"green\" background=\"red\">Ugly colors</span>\n"
+ "and nothing on this line,\n"
+ "or this.\n"
+ "or this either\n"
+ "or even on this one\n"
+ "la <big>la <big>la <big>la <big>la</big></big></big></big>\n"
+ "but this _word is <span foreground=\"purple\"><big>purple</big></span>\n"
+ "We like <sup>superscript</sup> and <sub>subscript</sub> too");
+
+ g_return_if_fail (keyval != GDK_s);
+
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
if (!window)
{
+ guint keyval;
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
frame = gtk_frame_new ("Markup label");
label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "This <span foreground=\"blue\" background=\"orange\">label</span> has "
- "<b>markup</b> such as "
- "<big><i>Big Italics</i></big>\n"
- "<tt>Monospace font</tt>\n"
- "<u>Underline!</u>\n"
- "foo\n"
- "<span foreground=\"green\" background=\"red\">Ugly colors</span>\n"
- "and nothing on this line,\n"
- "or this.\n"
- "or this either\n"
- "or even on this one\n"
- "la <big>la <big>la <big>la <big>la</big></big></big></big>\n"
- "but this word is <span foreground=\"purple\"><big>purple</big></span>\n"
- "We like <sup>superscript</sup> and <sub>subscript</sub> too");
+ /* There's also a gtk_label_set_markup() without accel if you
+ * don't have an accelerator key
+ */
+ keyval =
+ gtk_label_set_markup_with_accel (GTK_LABEL (label),
+ "This <span foreground=\"blue\" background=\"orange\">label</span> has "
+ "<b>markup</b> _such as "
+ "<big><i>Big Italics</i></big>\n"
+ "<tt>Monospace font</tt>\n"
+ "<u>Underline!</u>\n"
+ "foo\n"
+ "<span foreground=\"green\" background=\"red\">Ugly colors</span>\n"
+ "and nothing on this line,\n"
+ "or this.\n"
+ "or this either\n"
+ "or even on this one\n"
+ "la <big>la <big>la <big>la <big>la</big></big></big></big>\n"
+ "but this _word is <span foreground=\"purple\"><big>purple</big></span>\n"
+ "We like <sup>superscript</sup> and <sub>subscript</sub> too");
+
+ g_return_if_fail (keyval != GDK_s);
+
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);