Commit 8d2e8a45 authored by Björn Lindqvist's avatar Björn Lindqvist Committed by Björn Lindqvist

Remove two chunks of duplicated code (#533733).

2008-05-20  Björn Lindqvist  <bjourne@gmail.com>

	* gtk/gtkspinbutton.c: (gtk_spin_button_snap,
	gtk_spin_button_update): Remove two chunks of duplicated
	code (#533733).

svn path=/trunk/; revision=20118
parent 7f260595
2008-05-20 Björn Lindqvist <bjourne@gmail.com>
* gtk/gtkspinbutton.c: (gtk_spin_button_snap,
gtk_spin_button_update): Remove two chunks of duplicated
code (#533733).
2008-05-20 14:27:34 Tim Janik <timj@imendio.com>
* reverted recent unapproved changes by Yair Hershkovitz, regarding:
......
......@@ -1398,15 +1398,7 @@ gtk_spin_button_snap (GtkSpinButton *spin_button,
else
val = spin_button->adjustment->lower + ceil (tmp) * inc;
if (fabs (val - spin_button->adjustment->value) > EPSILON)
gtk_adjustment_set_value (spin_button->adjustment, val);
else
{
gint return_val = FALSE;
g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0, &return_val);
if (return_val == FALSE)
gtk_spin_button_default_output (spin_button);
}
gtk_spin_button_set_value (spin_button, val);
}
static void
......@@ -2291,18 +2283,7 @@ gtk_spin_button_update (GtkSpinButton *spin_button)
if (spin_button->snap_to_ticks)
gtk_spin_button_snap (spin_button, val);
else
{
if (fabs (val - spin_button->adjustment->value) > EPSILON)
gtk_adjustment_set_value (spin_button->adjustment, val);
else
{
return_val = FALSE;
g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0,
&return_val);
if (return_val == FALSE)
gtk_spin_button_default_output (spin_button);
}
}
gtk_spin_button_set_value (spin_button, val);
}
static void
......
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