diff options
author | Ted Gould <ted@gould.cx> | 2012-04-09 12:07:32 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-04-09 12:07:32 -0500 |
commit | 1a2b0942da2b73c6338516144f0b77ac5696db74 (patch) | |
tree | 3653ac6bf43f402f5d9a3e8ac8870d839e96e91f /libdbusmenu-gtk | |
parent | ef2f1b8d2e827050e91b2bcdaf75ebc2cdae69a4 (diff) | |
download | libdbusmenu-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.c | 8 |
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); + } } } |