[gnome-control-center/gnome-3-14] network: Don't try to get secrets for new connections



commit b8a35deb473deae0a4f20e426c4e0dc7ebd254de
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Jan 26 18:35:52 2016 +0100

    network: Don't try to get secrets for new connections
    
    We don't need secrets for new connections and, in fact, trying to
    retrieve secrets in that case will fail because we have a plain
    NMConnection instead of a NMRemoteConnection.
    
    The above mentioned error would result in the page never being
    initialized.

 .../connection-editor/net-connection-editor.c      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/connection-editor/net-connection-editor.c 
b/panels/network/connection-editor/net-connection-editor.c
index b28c37b..eacfc53 100644
--- a/panels/network/connection-editor/net-connection-editor.c
+++ b/panels/network/connection-editor/net-connection-editor.c
@@ -553,7 +553,7 @@ net_connection_editor_set_connection (NetConnectionEditor *editor,
                 const gchar *security_setting;
 
                 security_setting = ce_page_get_security_setting (page);
-                if (!security_setting) {
+                if (!security_setting || editor->is_new_connection) {
                         ce_page_complete_init (page, NULL, NULL, NULL);
                 } else {
                         get_secrets_for_page (editor, page, security_setting);


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