[maemo-commits] [maemo-commits] r12503 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Jun 27 14:25:16 EEST 2007
Author: mitch
Date: 2007-06-27 14:24:45 +0300 (Wed, 27 Jun 2007)
New Revision: 12503

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtkmenu.c
Log:
2007-06-27  Michael Natterer  <mitch at imendio.com>

	* gtk/gtkmenu.c (gtk_menu_handle_scrolling): when updating the
	scroll arrows' state, make sure we don't overwrite the insensitive
	state that might have been set by the first scroll step hitting
	the top/bottom border of the menu. Fixes #59210.



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2007-06-27 10:11:44 UTC (rev 12502)
+++ projects/haf/trunk/gtk+/ChangeLog	2007-06-27 11:24:45 UTC (rev 12503)
@@ -1,3 +1,10 @@
+2007-06-27  Michael Natterer  <mitch at imendio.com>
+
+	* gtk/gtkmenu.c (gtk_menu_handle_scrolling): when updating the
+	scroll arrows' state, make sure we don't overwrite the insensitive
+	state that might have been set by the first scroll step hitting
+	the top/bottom border of the menu. Fixes #59210.
+
 2007-06-27  Xan Lopez  <xan.lopez at nokia.com>
 
 	* gtk/gtk.symbols: Add new GtkWindow functions.
@@ -11,7 +18,7 @@
 
 	* gtk/gtkwindow.c: fix merge breakage.
 
-2007-06-26  Xan Lopez  <xan at .lopeznokia.com>
+2007-06-26  Xan Lopez  <xan.lopez at nokia.com>
 
 	Take from upstream:
 	
@@ -82,8 +89,8 @@
 
 2007-06-25  Xan Lopez  <xan.lopez at nokia.com>
 	
-	* gdk/x11/gdkinput-x11.c (gdk_input_translate_coordinates): protect maemo changes with
-	MAEMO_CHANGES.
+	* gdk/x11/gdkinput-x11.c (gdk_input_translate_coordinates):
+	protect maemo changes with MAEMO_CHANGES.
 
 2007-06-19  Xan Lopez  <xan.lopez at nokia.com>
 

Modified: projects/haf/trunk/gtk+/gtk/gtkmenu.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtkmenu.c	2007-06-27 10:11:44 UTC (rev 12502)
+++ projects/haf/trunk/gtk+/gtk/gtkmenu.c	2007-06-27 11:24:45 UTC (rev 12503)
@@ -3670,8 +3670,7 @@
 
   if (priv->upper_arrow_state != GTK_STATE_INSENSITIVE)
     {
-      gboolean     arrow_pressed = FALSE;
-      GtkStateType arrow_state   = GTK_STATE_NORMAL;
+      gboolean arrow_pressed = FALSE;
 
       if (menu->upper_arrow_visible && !menu->tearoff_active)
         {
@@ -3738,17 +3737,26 @@
             }
         }
 
-      if (arrow_pressed)
-        arrow_state = GTK_STATE_ACTIVE;
-      else if (menu->upper_arrow_prelight)
-        arrow_state = GTK_STATE_PRELIGHT;
-
-      if (arrow_state != priv->upper_arrow_state)
+      /*  gtk_menu_start_scrolling() might have hit the top of the
+       *  menu, so check if the button isn't insensitive before
+       *  changing it to something else.
+       */
+      if (priv->upper_arrow_state != GTK_STATE_INSENSITIVE)
         {
-          priv->upper_arrow_state = arrow_state;
+          GtkStateType arrow_state = GTK_STATE_NORMAL;
 
-          gdk_window_invalidate_rect (GTK_WIDGET (menu)->window,
-                                      &rect, FALSE);
+          if (arrow_pressed)
+            arrow_state = GTK_STATE_ACTIVE;
+          else if (menu->upper_arrow_prelight)
+            arrow_state = GTK_STATE_PRELIGHT;
+
+          if (arrow_state != priv->upper_arrow_state)
+            {
+              priv->upper_arrow_state = arrow_state;
+
+              gdk_window_invalidate_rect (GTK_WIDGET (menu)->window,
+                                          &rect, FALSE);
+            }
         }
     }
 
@@ -3769,8 +3777,7 @@
 
   if (priv->lower_arrow_state != GTK_STATE_INSENSITIVE)
     {
-      gboolean     arrow_pressed = FALSE;
-      GtkStateType arrow_state   = GTK_STATE_NORMAL;
+      gboolean arrow_pressed = FALSE;
 
       if (menu->lower_arrow_visible && !menu->tearoff_active)
         {
@@ -3837,17 +3844,26 @@
             }
         }
 
-      if (arrow_pressed)
-        arrow_state = GTK_STATE_ACTIVE;
-      else if (menu->lower_arrow_prelight)
-        arrow_state = GTK_STATE_PRELIGHT;
-
-      if (arrow_state != priv->lower_arrow_state)
+      /*  gtk_menu_start_scrolling() might have hit the bottom of the
+       *  menu, so check if the button isn't insensitive before
+       *  changing it to something else.
+       */
+      if (priv->lower_arrow_state != GTK_STATE_INSENSITIVE)
         {
-          priv->lower_arrow_state = arrow_state;
+          GtkStateType arrow_state = GTK_STATE_NORMAL;
 
-          gdk_window_invalidate_rect (GTK_WIDGET (menu)->window,
-                                      &rect, FALSE);
+          if (arrow_pressed)
+            arrow_state = GTK_STATE_ACTIVE;
+          else if (menu->lower_arrow_prelight)
+            arrow_state = GTK_STATE_PRELIGHT;
+
+          if (arrow_state != priv->lower_arrow_state)
+            {
+              priv->lower_arrow_state = arrow_state;
+
+              gdk_window_invalidate_rect (GTK_WIDGET (menu)->window,
+                                          &rect, FALSE);
+            }
         }
     }
 }


More information about the maemo-commits mailing list