[maemo-commits] [maemo-commits] r10921 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Apr 2 19:49:22 EEST 2007
Author: mitch
Date: 2007-04-02 19:49:19 +0300 (Mon, 02 Apr 2007)
New Revision: 10921

Modified:
   projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
   projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenushell.c
Log:
2007-04-02  Michael Natterer  <mitch at imendio.com>

	Merge from upstream trunk:

	* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): remove
	artifact from the time when type checking casts warned on NULL,
	some whitespace cleanup.

	Maemo-only:

	(gtk_real_menu_shell_move_current): remove #ifndef MAEMO_CHANGES
	from some code that has no effect on maemo anyway because there
	are no menubars.



Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-04-02 16:06:04 UTC (rev 10920)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-04-02 16:49:19 UTC (rev 10921)
@@ -1,3 +1,17 @@
+2007-04-02  Michael Natterer  <mitch at imendio.com>
+
+	Merge from upstream trunk:
+
+	* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): remove
+	artifact from the time when type checking casts warned on NULL,
+	some whitespace cleanup.
+
+	Maemo-only:
+
+	(gtk_real_menu_shell_move_current): remove #ifndef MAEMO_CHANGES
+	from some code that has no effect on maemo anyway because there
+	are no menubars.
+
 2007-03-30  Michael Natterer  <mitch at imendio.com>
 
 	* gtk/gtkmenuitem.c (gtk_real_menu_item_activate_item): revert to
@@ -105,7 +119,7 @@
 	* gtk/gtktreeview.h:
 
 	Restore the upstream ABI compatibility.
-	
+
 2007-03-13  Xan Lopez  <xan.lopez at nokia.com>
 
 	* gtk/gtkenums.h:

Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenushell.c
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenushell.c	2007-04-02 16:06:04 UTC (rev 10920)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenushell.c	2007-04-02 16:49:19 UTC (rev 10921)
@@ -1415,16 +1415,16 @@
 
       if (parent_menu_shell)
 	{
-	  if (GTK_MENU_SHELL_GET_CLASS (parent_menu_shell)->submenu_placement == 
-		       GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement)
+	  if (GTK_MENU_SHELL_GET_CLASS (parent_menu_shell)->submenu_placement ==
+              GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement)
 	    gtk_menu_shell_deselect (menu_shell);
-	  else 
+	  else
 	    {
 	      if (PACK_DIRECTION (parent_menu_shell) == GTK_PACK_DIRECTION_LTR)
 		gtk_menu_shell_move_selected (parent_menu_shell, -1);
 	      else
 		gtk_menu_shell_move_selected (parent_menu_shell, 1);
-	      gtk_menu_shell_select_submenu_first (parent_menu_shell); 
+	      gtk_menu_shell_select_submenu_first (parent_menu_shell);
 	    }
 	}
       /* If there is no parent and the submenu is in the opposite direction
@@ -1442,7 +1442,7 @@
 	    _gtk_menu_shell_select_last (submenu, TRUE);
 	}
       break;
-      
+
     case GTK_MENU_DIR_CHILD:
       if (menu_shell->active_menu_item &&
 	  _gtk_menu_item_is_selectable (menu_shell->active_menu_item) &&
@@ -1452,20 +1452,14 @@
 	    break;
 	}
 
-#ifndef MAEMO_CHANGES
       /* Try to find a menu running the opposite direction */
-      while (parent_menu_shell && 
+      while (parent_menu_shell &&
 	     (GTK_MENU_SHELL_GET_CLASS (parent_menu_shell)->submenu_placement ==
 	      GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement))
 	{
-	  GtkWidget *tmp_widget = parent_menu_shell->parent_menu_shell;
-	  
-	  if (tmp_widget)
-	    parent_menu_shell = GTK_MENU_SHELL (tmp_widget);
-	  else
-	    parent_menu_shell = NULL;
+	  parent_menu_shell = GTK_MENU_SHELL (parent_menu_shell->parent_menu_shell);
 	}
-      
+
       if (parent_menu_shell)
 	{
 	  if (PACK_DIRECTION (parent_menu_shell) == GTK_PACK_DIRECTION_LTR)
@@ -1475,9 +1469,8 @@
 
 	  gtk_menu_shell_select_submenu_first (parent_menu_shell);
 	}
-#endif /* !MAEMO_CHANGES */
       break;
-      
+
     case GTK_MENU_DIR_PREV:
       gtk_menu_shell_move_selected (menu_shell, -1);
       if (!had_selection &&
@@ -1485,6 +1478,7 @@
 	  menu_shell->children)
 	_gtk_menu_shell_select_last (menu_shell, TRUE);
       break;
+
     case GTK_MENU_DIR_NEXT:
       gtk_menu_shell_move_selected (menu_shell, 1);
       if (!had_selection &&


More information about the maemo-commits mailing list