[network-manager-applet/nma-1-0] libnma: fix wrong mnemonics in tooltips for password entries



commit a927e31d01361fe710908cf43f405b4a1899d827
Author: Thomas Haller <thaller redhat com>
Date:   Tue Sep 8 20:39:26 2015 +0200

    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
    (cherry picked from commit d888f571e5de9570c62b8ec557d8219e64ec45ba)

 src/libnm-gtk/nm-ui-utils.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/libnm-gtk/nm-ui-utils.c b/src/libnm-gtk/nm-ui-utils.c
index 138bbea..2e8c191 100644
--- a/src/libnm-gtk/nm-ui-utils.c
+++ b/src/libnm-gtk/nm-ui-utils.c
@@ -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]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]