Commit ee4ec4e6 authored by Thomas Haller's avatar Thomas Haller

core: use define for NMDevice's "state-changed" signal name

parent 04c70c76
......@@ -126,7 +126,7 @@ nm_device_vlan_set_parent (NMDeviceVlan *self, NMDevice *parent)
if (parent) {
priv->parent = g_object_ref (parent);
priv->parent_state_id = g_signal_connect (priv->parent,
"state-changed",
NM_DEVICE_STATE_CHANGED,
G_CALLBACK (parent_state_changed),
device);
......
......@@ -2191,7 +2191,8 @@ nm_device_master_add_slave (NMDevice *self, NMDevice *slave, gboolean configure)
info = g_slice_new0 (SlaveInfo);
info->slave = g_object_ref (slave);
info->configure = configure;
info->watch_id = g_signal_connect (slave, "state-changed",
info->watch_id = g_signal_connect (slave,
NM_DEVICE_STATE_CHANGED,
G_CALLBACK (slave_state_changed), self);
priv->slaves = g_slist_append (priv->slaves, info);
slave_priv->master = g_object_ref (self);
......@@ -9543,7 +9544,7 @@ _set_state_full (NMDevice *self,
g_object_notify (G_OBJECT (self), NM_DEVICE_STATE);
g_object_notify (G_OBJECT (self), NM_DEVICE_STATE_REASON);
g_signal_emit_by_name (self, "state-changed", state, old_state, reason);
g_signal_emit_by_name (self, NM_DEVICE_STATE_CHANGED, state, old_state, reason);
/* Post-process the event after internal notification */
......@@ -10778,7 +10779,7 @@ nm_device_class_init (NMDeviceClass *klass)
/* Signals */
signals[STATE_CHANGED] =
g_signal_new ("state-changed",
g_signal_new (NM_DEVICE_STATE_CHANGED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NMDeviceClass, state_changed),
......
......@@ -80,6 +80,7 @@
#define NM_DEVICE_REMOVED "removed"
#define NM_DEVICE_RECHECK_AUTO_ACTIVATE "recheck-auto-activate"
#define NM_DEVICE_RECHECK_ASSUME "recheck-assume"
#define NM_DEVICE_STATE_CHANGED "state-changed"
#define NM_DEVICE_LINK_INITIALIZED "link-initialized"
G_BEGIN_DECLS
......
......@@ -339,7 +339,7 @@ check_companion (NMDeviceOlpcMesh *self, NMDevice *other)
_LOGI (LOGD_OLPC, "found companion WiFi device %s",
nm_device_get_iface (other));
g_signal_connect (G_OBJECT (other), "state-changed",
g_signal_connect (G_OBJECT (other), NM_DEVICE_STATE_CHANGED,
G_CALLBACK (companion_state_changed_cb), self);
g_signal_connect (G_OBJECT (other), "notify::scanning",
......
......@@ -504,7 +504,7 @@ nm_active_connection_set_device (NMActiveConnection *self, NMDevice *device)
priv->device = g_object_ref (device);
g_signal_connect (device, "state-changed",
g_signal_connect (device, NM_DEVICE_STATE_CHANGED,
G_CALLBACK (device_state_changed), self);
g_signal_connect (device, "notify::master",
G_CALLBACK (device_master_changed), self);
......
......@@ -1788,7 +1788,7 @@ add_device (NMManager *self, NMDevice *device)
priv->devices = g_slist_append (priv->devices, g_object_ref (device));
g_signal_connect (device, "state-changed",
g_signal_connect (device, NM_DEVICE_STATE_CHANGED,
G_CALLBACK (manager_device_state_changed),
self);
......
......@@ -1370,7 +1370,7 @@ device_added (NMManager *manager, NMDevice *device, gpointer user_data)
NMPolicy *policy = (NMPolicy *) user_data;
/* Connect state-changed with _after, so that the handler is invoked after other handlers. */
_connect_device_signal (policy, device, "state-changed", device_state_changed, TRUE);
_connect_device_signal (policy, device, NM_DEVICE_STATE_CHANGED, device_state_changed, TRUE);
_connect_device_signal (policy, device, NM_DEVICE_IP4_CONFIG_CHANGED, device_ip4_config_changed, FALSE);
_connect_device_signal (policy, device, NM_DEVICE_IP6_CONFIG_CHANGED, device_ip6_config_changed, FALSE);
_connect_device_signal (policy, device, "notify::" NM_DEVICE_AUTOCONNECT, device_autoconnect_changed, FALSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment