aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-04-16 10:13:19 -0500
committerTed Gould <ted@gould.cx>2012-04-16 10:13:19 -0500
commit02aad1ae0692f8598195fe24af49645c5e2a0622 (patch)
tree558aa4f03d4c1190984559cbf2215e1497ce30c2 /libdbusmenu-gtk
parentc45a8fe03a7b3653af2d2f8586668dcb3c21899b (diff)
downloadlibdbusmenu-02aad1ae0692f8598195fe24af49645c5e2a0622.tar.gz
libdbusmenu-02aad1ae0692f8598195fe24af49645c5e2a0622.tar.bz2
libdbusmenu-02aad1ae0692f8598195fe24af49645c5e2a0622.zip
Move setting the accell widget out of the if statement
Diffstat (limited to 'libdbusmenu-gtk')
-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);