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
This commit is contained in:
Björn Lindqvist 2008-05-20 17:29:34 +00:00 committed by Björn Lindqvist
parent 7f260595b2
commit 8d2e8a4505
2 changed files with 8 additions and 21 deletions

View File

@ -1,3 +1,9 @@
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:

View File

@ -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