summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-08-03 12:08:31 -0400
committerDan Winship <danw@gnome.org>2014-08-07 15:43:43 -0400
commitf8762f7d3f0f916057f2c542163a02a77a6c3bbd (patch)
treecf594434356159d80eda37257eacb72431085ff2
parent57e802f3aa2aac8daba9a7a442a2393ab5888dba (diff)
downloadNetworkManager-f8762f7d3f0f916057f2c542163a02a77a6c3bbd.tar.gz
libnm: remove NMRemoteConnection::updated signal
Remove NMRemoteConnection::updated, which since 0.9.10 has been redundant with NMConnection::changed. (We still handle the incoming D-Bus signal, we just don't re-emit it as "updated", since the call to nm_connection_replace_settings() already results in it emitting "changed".)
-rw-r--r--clients/tui/nmt-edit-connection-list.c8
-rw-r--r--libnm/nm-remote-connection.c28
-rw-r--r--libnm/nm-remote-connection.h7
3 files changed, 5 insertions, 38 deletions
diff --git a/clients/tui/nmt-edit-connection-list.c b/clients/tui/nmt-edit-connection-list.c
index d11b21d5d4..508f204c39 100644
--- a/clients/tui/nmt-edit-connection-list.c
+++ b/clients/tui/nmt-edit-connection-list.c
@@ -155,7 +155,7 @@ sort_by_timestamp (gconstpointer a,
static void nmt_edit_connection_list_rebuild (NmtEditConnectionList *list);
static void
-rebuild_on_connection_updated (NMRemoteConnection *connection,
+rebuild_on_connection_changed (NMRemoteConnection *connection,
gpointer list)
{
nmt_edit_connection_list_rebuild (list);
@@ -171,7 +171,7 @@ free_connections (NmtEditConnectionList *list)
for (iter = priv->connections; iter; iter = iter->next) {
conn = iter->data;
- g_signal_handlers_disconnect_by_func (conn, G_CALLBACK (rebuild_on_connection_updated), list);
+ g_signal_handlers_disconnect_by_func (conn, G_CALLBACK (rebuild_on_connection_changed), list);
g_object_unref (conn);
}
g_slist_free (priv->connections);
@@ -202,8 +202,8 @@ nmt_edit_connection_list_rebuild (NmtEditConnectionList *list)
continue;
}
- g_signal_connect (conn, NM_REMOTE_CONNECTION_UPDATED,
- G_CALLBACK (rebuild_on_connection_updated), list);
+ g_signal_connect (conn, NM_CONNECTION_CHANGED,
+ G_CALLBACK (rebuild_on_connection_changed), list);
g_object_ref (iter->data);
}
priv->connections = g_slist_sort (priv->connections, sort_by_timestamp);
diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c
index 0aa6e9d9c4..71dd8c62d0 100644
--- a/libnm/nm-remote-connection.c
+++ b/libnm/nm-remote-connection.c
@@ -55,13 +55,6 @@ enum {
LAST_PROP
};
-enum {
- UPDATED,
-
- LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL] = { 0 };
-
typedef struct RemoteCall RemoteCall;
typedef void (*RemoteCallFetchResultCb) (RemoteCall *call, DBusGProxyCall *proxy_call, GError *error);
@@ -443,9 +436,7 @@ replace_settings (NMRemoteConnection *self, GHashTable *new_settings)
{
GError *error = NULL;
- if (nm_connection_replace_settings (NM_CONNECTION (self), new_settings, &error))
- g_signal_emit (self, signals[UPDATED], 0, new_settings);
- else {
+ if (!nm_connection_replace_settings (NM_CONNECTION (self), new_settings, &error)) {
g_warning ("%s: error updating connection %s settings: (%d) %s",
__func__,
nm_connection_get_path (NM_CONNECTION (self)),
@@ -876,23 +867,6 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
FALSE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
-
- /* Signals */
- /**
- * NMRemoteConnection::updated:
- * @connection: a #NMConnection
- *
- * This signal is emitted when a connection changes, and it is
- * still visible to the user.
- */
- signals[UPDATED] =
- g_signal_new (NM_REMOTE_CONNECTION_UPDATED,
- G_TYPE_FROM_CLASS (remote_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMRemoteConnectionClass, updated),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
}
static void
diff --git a/libnm/nm-remote-connection.h b/libnm/nm-remote-connection.h
index 3d851f7a66..58ffe03bc4 100644
--- a/libnm/nm-remote-connection.h
+++ b/libnm/nm-remote-connection.h
@@ -59,9 +59,6 @@ GQuark nm_remote_connection_error_quark (void);
#define NM_REMOTE_CONNECTION_UNSAVED "unsaved"
#define NM_REMOTE_CONNECTION_VISIBLE "visible"
-/* Signals */
-#define NM_REMOTE_CONNECTION_UPDATED "updated"
-
typedef struct {
NMConnection parent;
} NMRemoteConnection;
@@ -69,10 +66,6 @@ typedef struct {
typedef struct {
NMConnectionClass parent_class;
- /* Signals */
- void (*updated) (NMRemoteConnection *connection,
- GHashTable *new_settings);
-
/*< private >*/
gpointer padding[8];
} NMRemoteConnectionClass;