From 8ea3372395ae8af1cdc519eeb3216eab51dc9102 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 5 Jan 2011 19:18:50 +0100 Subject: [PATCH] menu: Update adjustment usage for sealing Call gtk_adjustment_set_value() instead of manually updating the value in gtk_menu_scroll_to() --- gtk/gtkmenu.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index adb6646134..4dd871e6c8 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -4759,15 +4759,8 @@ gtk_menu_scroll_to (GtkMenu *menu, widget = GTK_WIDGET (menu); - if (priv->tearoff_active && - priv->tearoff_adjustment && - (priv->tearoff_adjustment->value != offset)) - { - priv->tearoff_adjustment->value = - CLAMP (offset, - 0, priv->tearoff_adjustment->upper - priv->tearoff_adjustment->page_size); - gtk_adjustment_value_changed (priv->tearoff_adjustment); - } + if (priv->tearoff_active && priv->tearoff_adjustment) + gtk_adjustment_set_value (priv->tearoff_adjustment, offset); /* Move/resize the viewport according to arrows: */ gtk_widget_get_allocation (widget, &allocation);