Blob Blame History Raw
From a927e31d01361fe710908cf43f405b4a1899d827 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Tue, 8 Sep 2015 20:39:26 +0200
Subject: [PATCH] libnma: fix wrong mnemonics in tooltips for password entries
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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)
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
---
 src/libnm-gtk/nm-ui-utils.c | 16 ++++++++--------
 1 file 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]);
-- 
2.1.0

From 77a97f52da18e8edc3515fe3a769ef81c887baf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
Date: Fri, 11 Sep 2015 13:23:07 +0200
Subject: [PATCH] libnma/libnm-gtk: use symbolic icons for password store menu
 (bgo #754726)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Gnome prefers using symbolic icons to have uniform look and feel.

https://github.com/GNOME/gnome-icon-theme-symbolic

https://bugzilla.gnome.org/show_bug.cgi?id=754726

(cherry picked from commit acc53bdf55beef61ff8236d33515066dde715e82)
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
---
 src/libnm-gtk/nm-ui-utils.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/libnm-gtk/nm-ui-utils.c b/src/libnm-gtk/nm-ui-utils.c
index 90b3b4c..08bd32a 100644
--- a/src/libnm-gtk/nm-ui-utils.c
+++ b/src/libnm-gtk/nm-ui-utils.c
@@ -611,10 +611,10 @@ typedef enum {
 } MenuItem;
 
 static const char *icon_name_table[ITEM_STORAGE_MAX + 1] = {
-	[ITEM_STORAGE_USER]    = "document-save",
-	[ITEM_STORAGE_SYSTEM]  = "document-save-as",
-	[ITEM_STORAGE_ASK]     = "dialog-question",
-	[ITEM_STORAGE_UNUSED]  = "edit-clear",
+	[ITEM_STORAGE_USER]    = "user-info-symbolic",
+	[ITEM_STORAGE_SYSTEM]  = "system-users-symbolic",
+	[ITEM_STORAGE_ASK]     = "dialog-question-symbolic",
+	[ITEM_STORAGE_UNUSED]  = "edit-clear-all-symbolic",
 };
 static const char *icon_desc_table[ITEM_STORAGE_MAX + 1] = {
 	[ITEM_STORAGE_USER]    = N_("Store the password only for this user"),
-- 
2.1.0