[network-manager-applet/NETWORKMANAGER_APPLET_0_7] core: ensure user connection scope after 8627880e07c8345f69ed639325280c7f62a8f894



commit 8677b82ed7166a1c754aa9aab4e85123819ad545
Author: Dan Williams <dcbw redhat com>
Date:   Thu Dec 17 13:46:59 2009 -0800

    core: ensure user connection scope after 8627880e07c8345f69ed639325280c7f62a8f894
    
    Previously the scope would only have been set when the connection was exported
    but since the connection editor shouldn't ever export connections, the scope
    has to be set manually.  Without this fix the editor will be confused as to
    the scope of connections and will try to add a connection instead of updating
    it.

 src/gconf-helpers/nma-gconf-connection.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gconf-helpers/nma-gconf-connection.c b/src/gconf-helpers/nma-gconf-connection.c
index e787176..648ac17 100644
--- a/src/gconf-helpers/nma-gconf-connection.c
+++ b/src/gconf-helpers/nma-gconf-connection.c
@@ -95,6 +95,11 @@ nma_gconf_connection_new_from_connection (GConfClient *client,
 	g_return_val_if_fail (conf_dir != NULL, NULL);
 	g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
 
+	/* Ensure the connection is user-scope since only user-scope connections
+	 * will be wrapped by an NMAGConfConnection.
+	 */
+	nm_connection_set_scope (connection, NM_CONNECTION_SCOPE_USER);
+
 	return (NMAGConfConnection *) g_object_new (NMA_TYPE_GCONF_CONNECTION,
 									    NMA_GCONF_CONNECTION_CLIENT, client,
 									    NMA_GCONF_CONNECTION_DIR, conf_dir,



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