diff options
author | Thomas Haller <thaller@redhat.com> | 2016-12-08 13:03:09 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-12-08 13:04:37 +0100 |
commit | 0de4de6dbb23b6c84fcf1dad272b8020357498d4 (patch) | |
tree | 2637188cf2da27ad0622e650a559a30e83787a87 | |
parent | aa8cc19deaa0acd2e0c615908023451919edbc5f (diff) | |
download | network-manager-applet-th/password-storage-in-ask-mode-bgo775769.tar.gz |
nma-ui-utils: disable password storage chooser in ask modeth/password-storage-in-ask-mode-bgo775769
When asking for a password, we cannot modify the password flags. Which means
we cannot modify the password location. The UI gives the wrong impression
that this was possible, while it was not.
Fix that, by disabling the popup menu on the password-storage icon. We
still want to show it so that the user sees it.
-rw-r--r-- | src/libnm-gtk/nm-ui-utils.c | 2 | ||||
-rw-r--r-- | src/libnma/nma-ui-utils.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libnm-gtk/nm-ui-utils.c b/src/libnm-gtk/nm-ui-utils.c index ea63fde7..e92ff80a 100644 --- a/src/libnm-gtk/nm-ui-utils.c +++ b/src/libnm-gtk/nm-ui-utils.c @@ -863,6 +863,8 @@ nma_utils_setup_password_storage (GtkWidget *passwd_entry, popup_menu_item_info_register (item[3], setting, password_flags_name, ITEM_STORAGE_UNUSED, passwd_entry); g_signal_connect (passwd_entry, "icon-release", G_CALLBACK (icon_release_cb), popup_menu); + gtk_entry_set_icon_activatable (GTK_ENTRY (passwd_entry), GTK_ENTRY_ICON_SECONDARY, + !ask_mode); gtk_menu_attach_to_widget (GTK_MENU (popup_menu), passwd_entry, NULL); /* Initialize active item for password-storage popup menu */ diff --git a/src/libnma/nma-ui-utils.c b/src/libnma/nma-ui-utils.c index 59332200..7649ee54 100644 --- a/src/libnma/nma-ui-utils.c +++ b/src/libnma/nma-ui-utils.c @@ -297,6 +297,8 @@ nma_utils_setup_password_storage (GtkWidget *passwd_entry, popup_menu_item_info_register (item[3], setting, password_flags_name, ITEM_STORAGE_UNUSED, passwd_entry); g_signal_connect (passwd_entry, "icon-release", G_CALLBACK (icon_release_cb), popup_menu); + gtk_entry_set_icon_activatable (GTK_ENTRY (passwd_entry), GTK_ENTRY_ICON_SECONDARY, + !ask_mode); gtk_menu_attach_to_widget (GTK_MENU (popup_menu), passwd_entry, NULL); /* Initialize active item for password-storage popup menu */ |