aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-04-09 12:07:32 -0500
committerTed Gould <ted@gould.cx>2012-04-09 12:07:32 -0500
commit1a2b0942da2b73c6338516144f0b77ac5696db74 (patch)
tree3653ac6bf43f402f5d9a3e8ac8870d839e96e91f /libdbusmenu-gtk
parentef2f1b8d2e827050e91b2bcdaf75ebc2cdae69a4 (diff)
downloadlibdbusmenu-1a2b0942da2b73c6338516144f0b77ac5696db74.tar.gz
libdbusmenu-1a2b0942da2b73c6338516144f0b77ac5696db74.tar.bz2
libdbusmenu-1a2b0942da2b73c6338516144f0b77ac5696db74.zip
Handle mnemonic stuff on updates as well
Diffstat (limited to 'libdbusmenu-gtk')
-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);
+ }
}
}