mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
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".)
This commit is contained in:
parent
57e802f3aa
commit
f8762f7d3f
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue