aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbusmenu-gtk/genericmenuitem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c
index 09e509f..9effd82 100644
--- a/libdbusmenu-gtk/genericmenuitem.c
+++ b/libdbusmenu-gtk/genericmenuitem.c
@@ -338,7 +338,13 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label)
getting in. */
suppress_update = TRUE;
} else {
- gtk_label_set_markup_with_mnemonic(labelw, local_label);
+ if (has_mnemonic(in_label, FALSE)) {
+ gtk_label_set_use_underline(GTK_LABEL(labelw), TRUE);
+ gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(labelw), GTK_WIDGET(menu_item));
+ gtk_label_set_markup_with_mnemonic(labelw, local_label);
+ } else {
+ gtk_label_set_markup(labelw, local_label);
+ }
}
}