mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
remove artifact from the time when type checking casts warned on NULL,
2007-04-02 Michael Natterer <mitch@imendio.com> * gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): remove artifact from the time when type checking casts warned on NULL, some whitespace cleanup. svn path=/trunk/; revision=17578
This commit is contained in:
parent
c524f988bf
commit
d7c5a3010a
@ -1,3 +1,9 @@
|
||||
2007-04-02 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): remove
|
||||
artifact from the time when type checking casts warned on NULL,
|
||||
some whitespace cleanup.
|
||||
|
||||
2007-04-01 Cody Russell <bratsche@gnome.org>
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c: Fix rendering of
|
||||
|
@ -1195,16 +1195,16 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
case GTK_MENU_DIR_PARENT:
|
||||
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
|
||||
@ -1222,7 +1222,7 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
_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) &&
|
||||
@ -1233,18 +1233,13 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
}
|
||||
|
||||
/* 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)
|
||||
@ -1255,7 +1250,7 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
gtk_menu_shell_select_submenu_first (parent_menu_shell);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case GTK_MENU_DIR_PREV:
|
||||
gtk_menu_shell_move_selected (menu_shell, -1);
|
||||
if (!had_selection &&
|
||||
@ -1263,6 +1258,7 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user