[gtk+] GtkApplicationWindow: Make mnemonics work for stateful actions
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkApplicationWindow: Make mnemonics work for stateful actions
- Date: Mon, 19 Dec 2011 17:59:10 +0000 (UTC)
commit aae52d4580e2433330ce534126c318108b313af3
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Dec 1 15:25:46 2011 -0500
GtkApplicationWindow: Make mnemonics work for stateful actions
gtk/gtkapplicationwindow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 7d04770..807caa3 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -623,7 +623,7 @@ create_menuitem_from_model (GMenuModel *model,
type = NULL;
if (type == NULL)
- w = gtk_menu_item_new_with_mnemonic (label);
+ w = gtk_menu_item_new_with_label (label);
else if (g_variant_type_equal (type, G_VARIANT_TYPE_BOOLEAN))
w = gtk_check_menu_item_new_with_label (label);
else if (g_variant_type_equal (type, G_VARIANT_TYPE_STRING))
@@ -634,6 +634,8 @@ create_menuitem_from_model (GMenuModel *model,
else
g_assert_not_reached ();
+ gtk_menu_item_set_use_underline (GTK_MENU_ITEM (w), TRUE);
+
if (action != NULL)
{
a = g_new0 (ActionData, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]