X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkspinbutton.c;h=f1a09c96394aa24533e20fc497c6a43351bdaf34;hb=5bbbc47a4c306653e8347f7afb85a940a503f755;hp=c20a69f277ee0945f3af486af54b34a553f4c2d8;hpb=3d4cd4db3ed9f6c47566a69d745441e2662ac2ab;p=~andy%2Fgtk diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index c20a69f27..f1a09c963 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -1048,7 +1048,12 @@ gtk_spin_button_realize (GtkWidget *widget) return_val = FALSE; g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0, &return_val); - if (return_val == FALSE) + + /* If output wasn't processed explicitly by the method connected to the + * 'output' signal; and if we don't have any explicit 'text' set initially, + * fallback to the default output. */ + if (!return_val && + (spin_button->numeric || gtk_entry_get_text (GTK_ENTRY (spin_button)) == NULL)) gtk_spin_button_default_output (spin_button); gtk_widget_queue_resize (GTK_WIDGET (spin_button)); @@ -2407,7 +2412,7 @@ gtk_spin_button_set_value (GtkSpinButton *spin_button, * @policy: a #GtkSpinButtonUpdatePolicy value * * Sets the update behavior of a spin button. - * This determines wether the spin button is always updated + * This determines whether the spin button is always updated * or only when a valid value is set. */ void