forked from AuroraMiddleware/gtk
GtkApplicationWindow: Make mnemonics work for stateful actions
This commit is contained in:
parent
dd360d725c
commit
aae52d4580
@ -623,7 +623,7 @@ create_menuitem_from_model (GMenuModel *model,
|
|||||||
type = NULL;
|
type = NULL;
|
||||||
|
|
||||||
if (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))
|
else if (g_variant_type_equal (type, G_VARIANT_TYPE_BOOLEAN))
|
||||||
w = gtk_check_menu_item_new_with_label (label);
|
w = gtk_check_menu_item_new_with_label (label);
|
||||||
else if (g_variant_type_equal (type, G_VARIANT_TYPE_STRING))
|
else if (g_variant_type_equal (type, G_VARIANT_TYPE_STRING))
|
||||||
@ -634,6 +634,8 @@ create_menuitem_from_model (GMenuModel *model,
|
|||||||
else
|
else
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
|
||||||
|
gtk_menu_item_set_use_underline (GTK_MENU_ITEM (w), TRUE);
|
||||||
|
|
||||||
if (action != NULL)
|
if (action != NULL)
|
||||||
{
|
{
|
||||||
a = g_new0 (ActionData, 1);
|
a = g_new0 (ActionData, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user