diff options
author | Thomas Haller <thaller@redhat.com> | 2015-09-08 20:39:26 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-09-09 16:28:07 +0200 |
commit | d888f571e5de9570c62b8ec557d8219e64ec45ba (patch) | |
tree | f2bc6c7de5c63d1ec09a9f2af38d2ba7d00e388c | |
parent | 425be7084ebd04da1ba23aa6d0b27188d730b4c0 (diff) | |
download | network-manager-applet-d888f571e5de9570c62b8ec557d8219e64ec45ba.tar.gz |
libnma: fix wrong mnemonics in tooltips for password entries
The mnemonics of radio buttons *inside* the pop-up menu don't work
with respect to the whole window. They only work, if you already
opened the pop-up menu, and then press the mnemonic key.
But since you cannot open the pop-up menu with a shortcut,
this becomes moot and the user has to click anyway.
But more importantly, we are using the same string as tooltip
for the icon, which wrongly showed the underscore of the mnemonic.
Fix that by just removing the the mnemonics.
https://bugzilla.gnome.org/show_bug.cgi?id=754726
Fixes: 50b9650cc205a84dfe7082eb92e95ea2aaf554e8
-rw-r--r-- | src/libnm-gtk/nm-ui-utils.c | 16 | ||||
-rw-r--r-- | src/libnma/nma-ui-utils.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/libnm-gtk/nm-ui-utils.c b/src/libnm-gtk/nm-ui-utils.c index 3596e62b..a1522dc4 100644 --- a/src/libnm-gtk/nm-ui-utils.c +++ b/src/libnm-gtk/nm-ui-utils.c @@ -615,10 +615,10 @@ static const char *icon_name_table[ITEM_STORAGE_MAX + 1] = { [ITEM_STORAGE_UNUSED] = "edit-clear", }; static const char *icon_desc_table[ITEM_STORAGE_MAX + 1] = { - [ITEM_STORAGE_USER] = N_("Store the password only for this _user"), - [ITEM_STORAGE_SYSTEM] = N_("Store the password for _all users"), - [ITEM_STORAGE_ASK] = N_("As_k for this password every time"), - [ITEM_STORAGE_UNUSED] = N_("The password is _not required"), + [ITEM_STORAGE_USER] = N_("Store the password only for this user"), + [ITEM_STORAGE_SYSTEM] = N_("Store the password for all users"), + [ITEM_STORAGE_ASK] = N_("Ask for this password every time"), + [ITEM_STORAGE_UNUSED] = N_("The password is not required"), }; static void @@ -809,12 +809,12 @@ nma_utils_setup_password_storage (GtkWidget *passwd_entry, g_object_set_data (G_OBJECT (popup_menu), PASSWORD_STORAGE_MENU_TAG, GUINT_TO_POINTER (TRUE)); g_object_set_data (G_OBJECT (popup_menu), MENU_WITH_NOT_REQUIRED_TAG, GUINT_TO_POINTER (with_not_required)); group = NULL; - item[0] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[0]); + item[0] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[0]); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item[0])); - item[1] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[1]); - item[2] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[2]); + item[1] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[1]); + item[2] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[2]); if (with_not_required) - item[3] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[3]); + item[3] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[3]); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item[0]); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item[1]); diff --git a/src/libnma/nma-ui-utils.c b/src/libnma/nma-ui-utils.c index 18e1f60f..6cf62157 100644 --- a/src/libnma/nma-ui-utils.c +++ b/src/libnma/nma-ui-utils.c @@ -50,10 +50,10 @@ static const char *icon_name_table[ITEM_STORAGE_MAX + 1] = { [ITEM_STORAGE_UNUSED] = "edit-clear", }; static const char *icon_desc_table[ITEM_STORAGE_MAX + 1] = { - [ITEM_STORAGE_USER] = N_("Store the password only for this _user"), - [ITEM_STORAGE_SYSTEM] = N_("Store the password for _all users"), - [ITEM_STORAGE_ASK] = N_("As_k for this password every time"), - [ITEM_STORAGE_UNUSED] = N_("The password is _not required"), + [ITEM_STORAGE_USER] = N_("Store the password only for this user"), + [ITEM_STORAGE_SYSTEM] = N_("Store the password for all users"), + [ITEM_STORAGE_ASK] = N_("Ask for this password every time"), + [ITEM_STORAGE_UNUSED] = N_("The password is not required"), }; static void @@ -244,12 +244,12 @@ nma_utils_setup_password_storage (GtkWidget *passwd_entry, g_object_set_data (G_OBJECT (popup_menu), PASSWORD_STORAGE_MENU_TAG, GUINT_TO_POINTER (TRUE)); g_object_set_data (G_OBJECT (popup_menu), MENU_WITH_NOT_REQUIRED_TAG, GUINT_TO_POINTER (with_not_required)); group = NULL; - item[0] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[0]); + item[0] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[0]); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item[0])); - item[1] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[1]); - item[2] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[2]); + item[1] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[1]); + item[2] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[2]); if (with_not_required) - item[3] = gtk_radio_menu_item_new_with_mnemonic (group, icon_desc_table[3]); + item[3] = gtk_radio_menu_item_new_with_label (group, icon_desc_table[3]); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item[0]); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item[1]); |