From 2e6149b4b83cd6ce47ad079a6df717e88a67998a Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Tue, 26 Jan 2016 18:35:52 +0100
Subject: [PATCH 2/4] 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.
---
panels/network/connection-editor/net-connection-editor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c
index 4931d0e..9564506 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);
--
2.7.4