Commit f8c2aaf4 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Document the ::output signal and add an example. (#507566, example by Owen

2008-01-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkspinbutton.c: Document the ::output signal and
        add an example.  (#507566, example by Owen Taylor)

svn path=/trunk/; revision=19312
parent 71e9be7e
2008-01-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkspinbutton.c: Document the ::output signal and
add an example. (#507566, example by Owen Taylor)
2008-01-06 Johan Dahlin <johan@gnome.org>
* gtk/gtkcellrenderercombo.c:
......@@ -97,6 +102,18 @@
* gtk/gtkiconfactory.c (render_fallback_image): Adjust to
icon cache api change. (#506135, Kazuki Iwamoto)
2007-12-28 Mathias Hasselmann <mathias@openismus.com>
Consider "wide-separators" and "separator-height" style properties:
The separator is drawn using gtk_paint_box instead of cairo, when
"wide-separators" is set. Also do not highlight details for previous
or next month, if their day matches the selected day. (#339540)
* gtk/gtkcalendar.c: Consider "wide-separators" and "separator-height"
in gtk_calendar_size_request and calendar_paint_day
* gtk/gtkstyle.c: Modify gtk_default_draw_box to use special colors
for selected detail separators in GtkCalendar.
2007-12-28 Mathias Hasselmann <mathias@openismus.com>
Remove max_detail_height field from GtkCalendarPrivate. (#339540)
......
......@@ -290,6 +290,33 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
G_TYPE_INT, 1,
G_TYPE_POINTER);
/**
* GtkSpinButton::output:
* @spin_button: the object which received the signal
*
* The ::output signal can be used to change to formatting
* of the value that is displayed in the spin buttons entry.
* |[
* /&ast; show leading zeros &ast;/
* static gboolean
* on_output (GtkSpinButton *spin,
* gpointer data)
* {
* GtkAdjustment *adj;
* gchar *text;
*
* adj = gtk_spin_button_get_adjustment (spin);
* value = (int)gtk_adjustment_get_value (adj);
* text = g_strdup_printf ("%02d", value);
* gtk_entry_set_text (GTK_ENTRY (spin), text);
* g_free (text);
*
* return TRUE;
* }
* ]|
*
* Returns: %TRUE if the value has been displayed.
*/
spinbutton_signals[OUTPUT] =
g_signal_new (I_("output"),
G_TYPE_FROM_CLASS (gobject_class),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment