forked from AuroraMiddleware/gtk
Return a boolean indicating whether an item in the submenu was selected.
2004-12-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkmenushell.c (gtk_menu_shell_select_submenu_first): Return a boolean indicating whether an item in the submenu was selected. (gtk_real_menu_shell_move_current): When going in child direction, don't get stuck at completely insensitive submenus. (#162055, Billy Biggs)
This commit is contained in:
parent
676322ac06
commit
e77e1e24c2
@ -1,3 +1,12 @@
|
|||||||
|
2004-12-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkmenushell.c (gtk_menu_shell_select_submenu_first):
|
||||||
|
Return a boolean indicating whether an item in the submenu
|
||||||
|
was selected.
|
||||||
|
(gtk_real_menu_shell_move_current): When going in child
|
||||||
|
direction, don't get stuck at completely insensitive
|
||||||
|
submenus. (#162055, Billy Biggs)
|
||||||
|
|
||||||
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Make the clipboard image API more robust (#162357,
|
Make the clipboard image API more robust (#162357,
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-12-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkmenushell.c (gtk_menu_shell_select_submenu_first):
|
||||||
|
Return a boolean indicating whether an item in the submenu
|
||||||
|
was selected.
|
||||||
|
(gtk_real_menu_shell_move_current): When going in child
|
||||||
|
direction, don't get stuck at completely insensitive
|
||||||
|
submenus. (#162055, Billy Biggs)
|
||||||
|
|
||||||
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Make the clipboard image API more robust (#162357,
|
Make the clipboard image API more robust (#162357,
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-12-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkmenushell.c (gtk_menu_shell_select_submenu_first):
|
||||||
|
Return a boolean indicating whether an item in the submenu
|
||||||
|
was selected.
|
||||||
|
(gtk_real_menu_shell_move_current): When going in child
|
||||||
|
direction, don't get stuck at completely insensitive
|
||||||
|
submenus. (#162055, Billy Biggs)
|
||||||
|
|
||||||
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Make the clipboard image API more robust (#162357,
|
Make the clipboard image API more robust (#162357,
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-12-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkmenushell.c (gtk_menu_shell_select_submenu_first):
|
||||||
|
Return a boolean indicating whether an item in the submenu
|
||||||
|
was selected.
|
||||||
|
(gtk_real_menu_shell_move_current): When going in child
|
||||||
|
direction, don't get stuck at completely insensitive
|
||||||
|
submenus. (#162055, Billy Biggs)
|
||||||
|
|
||||||
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
2004-12-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Make the clipboard image API more robust (#162357,
|
Make the clipboard image API more robust (#162357,
|
||||||
|
@ -159,7 +159,7 @@ static GtkWidget *gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
|
|||||||
static GType gtk_menu_shell_child_type (GtkContainer *container);
|
static GType gtk_menu_shell_child_type (GtkContainer *container);
|
||||||
static void gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
|
static void gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
|
||||||
GtkWidget *menu_item);
|
GtkWidget *menu_item);
|
||||||
static void gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell);
|
static gboolean gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell);
|
||||||
|
|
||||||
static void gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
static void gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||||
GtkMenuDirectionType direction);
|
GtkMenuDirectionType direction);
|
||||||
@ -1062,7 +1062,7 @@ _gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
|
|||||||
gtk_menu_shell_select_item (menu_shell, to_select);
|
gtk_menu_shell_select_item (menu_shell, to_select);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell)
|
gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell)
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item;
|
GtkMenuItem *menu_item;
|
||||||
@ -1073,7 +1073,11 @@ gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell)
|
|||||||
{
|
{
|
||||||
_gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item));
|
_gtk_menu_item_popup_submenu (GTK_WIDGET (menu_item));
|
||||||
gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu), TRUE);
|
gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu), TRUE);
|
||||||
|
if (GTK_MENU_SHELL (menu_item->submenu)->active_menu_item)
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1145,10 +1149,10 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
|||||||
_gtk_menu_item_is_selectable (menu_shell->active_menu_item) &&
|
_gtk_menu_item_is_selectable (menu_shell->active_menu_item) &&
|
||||||
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu)
|
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu)
|
||||||
{
|
{
|
||||||
gtk_menu_shell_select_submenu_first (menu_shell);
|
if (gtk_menu_shell_select_submenu_first (menu_shell))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Try to find a menu running the opposite direction */
|
/* 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 (parent_menu_shell)->submenu_placement ==
|
||||||
@ -1167,7 +1171,6 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
|||||||
gtk_menu_shell_move_selected (parent_menu_shell, 1);
|
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);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GTK_MENU_DIR_PREV:
|
case GTK_MENU_DIR_PREV:
|
||||||
|
Loading…
Reference in New Issue
Block a user