[gtk+] menushell: Fix select_last() to get last, not 1st
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] menushell: Fix select_last() to get last, not 1st
- Date: Sat, 21 Jan 2017 18:56:54 +0000 (UTC)
commit c5c0127e109ca3c207d0b5d31cb54e3494d7bf36
Author: Daniel Boles <dboles src gnome org>
Date: Sat Jan 21 18:53:38 2017 +0000
menushell: Fix select_last() to get last, not 1st
It was broken in the same way as select_first(), as explained in
commit a5211adb225172195d6778d652b58632c38afcbf
gtk/gtkmenushell.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index d2e8685..9bab5ed 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -1439,7 +1439,6 @@ _gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
gboolean search_sensitive)
{
GtkMenuShellPrivate *priv = menu_shell->priv;
- GtkWidget *to_select = NULL;
GList *tmp_list;
tmp_list = g_list_last (priv->children);
@@ -1450,14 +1449,12 @@ _gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
if ((!search_sensitive && gtk_widget_get_visible (child)) ||
_gtk_menu_item_is_selectable (child))
{
- to_select = child;
+ gtk_menu_shell_select_item (menu_shell, child);
+ return;
}
tmp_list = tmp_list->prev;
}
-
- if (to_select)
- gtk_menu_shell_select_item (menu_shell, to_select);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]