From a4c32718544f07287c335789e7ce61c767760899 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 19 Sep 2011 20:37:38 +0200 Subject: [PATCH] fontchooser: Remove useless code gtk_adjustment_set_value() clamps itself, no need to do the clamping. But I was impressed at the amount of comments. --- gtk/gtkfontchooserwidget.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index cb23dbc216..6d821d49ce 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -329,23 +329,7 @@ spin_change_cb (GtkAdjustment *adjustment, else pango_font_description_set_size (priv->font_desc, ((gint)size) * PANGO_SCALE); - /* If the new value is lower than the lower bound of the slider, we set - * the slider adjustment to the lower bound value if it is not already set - */ - if (size < gtk_adjustment_get_lower (slider_adj) && - gtk_adjustment_get_value (slider_adj) != gtk_adjustment_get_lower (slider_adj)) - gtk_adjustment_set_value (slider_adj, gtk_adjustment_get_lower (slider_adj)); - - /* If the new value is upper than the upper bound of the slider, we set - * the slider adjustment to the upper bound value if it is not already set - */ - else if (size > gtk_adjustment_get_upper (slider_adj) && - gtk_adjustment_get_value (slider_adj) != gtk_adjustment_get_upper (slider_adj)) - gtk_adjustment_set_value (slider_adj, gtk_adjustment_get_upper (slider_adj)); - - /* If the new value is not already set on the slider we set it */ - else if (size != gtk_adjustment_get_value (slider_adj)) - gtk_adjustment_set_value (slider_adj, size); + gtk_adjustment_set_value (slider_adj, size); gtk_widget_queue_draw (priv->preview);