network-manager-applet r1095 - in trunk: . src/gconf-helpers
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r1095 - in trunk: . src/gconf-helpers
- Date: Fri, 16 Jan 2009 19:40:12 +0000 (UTC)
Author: dcbw
Date: Fri Jan 16 19:40:12 2009
New Revision: 1095
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1095&view=rev
Log:
2008-01-16 Tambet Ingo <tambet gmail com>
* src/gconf-helpers/nma-gconf-settings.c
- (connection_changes_done, add_connection_real, connection_removed):
fix handling of connections removed from GConf by external programs
(bgo #557590)
Modified:
trunk/ChangeLog
trunk/src/gconf-helpers/nma-gconf-settings.c
Modified: trunk/src/gconf-helpers/nma-gconf-settings.c
==============================================================================
--- trunk/src/gconf-helpers/nma-gconf-settings.c (original)
+++ trunk/src/gconf-helpers/nma-gconf-settings.c Fri Jan 16 19:40:12 2009
@@ -78,6 +78,15 @@
}
static void
+connection_removed (NMExportedConnection *connection, gpointer user_data)
+{
+ NMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (user_data);
+
+ priv->connections = g_slist_remove (priv->connections, connection);
+ g_object_unref (connection);
+}
+
+static void
add_connection_real (NMAGConfSettings *self, NMAGConfConnection *connection)
{
NMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (self);
@@ -88,6 +97,7 @@
G_CALLBACK (connection_new_secrets_requested_cb),
self);
+ g_signal_connect (connection, "removed", G_CALLBACK (connection_removed), self);
nm_settings_signal_new_connection (NM_SETTINGS (self),
NM_EXPORTED_CONNECTION (connection));
}
@@ -281,14 +291,7 @@
if (!connection) {
/* New connection */
connection = nma_gconf_connection_new (priv->client, info->path);
- if (connection) {
- g_signal_connect (connection, "new-secrets-requested",
- G_CALLBACK (connection_new_secrets_requested_cb),
- info->settings);
- priv->connections = g_slist_append (priv->connections, connection);
- nm_settings_signal_new_connection (NM_SETTINGS (info->settings),
- NM_EXPORTED_CONNECTION (connection));
- }
+ add_connection_real (info->settings, connection);
} else {
if (gconf_client_dir_exists (priv->client, info->path, NULL)) {
/* Updated connection */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]