[gtk+] menu: Update adjustment usage for sealing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] menu: Update adjustment usage for sealing
- Date: Wed, 5 Jan 2011 22:55:06 +0000 (UTC)
commit 8ea3372395ae8af1cdc519eeb3216eab51dc9102
Author: Benjamin Otte <otte redhat com>
Date: Wed Jan 5 19:18:50 2011 +0100
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 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index adb6646..4dd871e 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]