Commit a927e31d authored by Thomas Haller's avatar Thomas Haller
Browse files

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.

Fixes: 50b9650c
(cherry picked from commit d888f571)
parent 4ea1e8b0
......@@ -617,10 +617,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
......@@ -811,12 +811,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]);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment