aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbusmenu-gtk/genericmenuitem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c
index 81d67fe..348a972 100644
--- a/libdbusmenu-gtk/genericmenuitem.c
+++ b/libdbusmenu-gtk/genericmenuitem.c
@@ -335,10 +335,10 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label)
labelw = GTK_LABEL(gtk_accel_label_new(local_label));
gtk_label_set_use_markup(GTK_LABEL(labelw), TRUE);
gtk_misc_set_alignment(GTK_MISC(labelw), 0.0, 0.5);
+ gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(labelw), GTK_WIDGET(menu_item));
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 {
gchar * sanitized = sanitize_label(local_label);
@@ -365,7 +365,6 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label)
} else {
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 {
gchar * sanitized = sanitize_label(local_label);