Commit 9cc00d9e authored by Thomas Haller's avatar Thomas Haller

manager: use defines for signal names

parent aabb63e8
......@@ -5706,7 +5706,7 @@ nm_manager_class_init (NMManagerClass *manager_class)
/* D-Bus exported; emitted only for realized devices */
signals[DEVICE_ADDED] =
g_signal_new ("device-added",
g_signal_new (NM_MANAGER_DEVICE_ADDED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMManagerClass, device_added),
......@@ -5715,7 +5715,7 @@ nm_manager_class_init (NMManagerClass *manager_class)
/* Emitted for both realized devices and placeholder devices */
signals[INTERNAL_DEVICE_ADDED] =
g_signal_new ("internal-device-added",
g_signal_new (NM_MANAGER_INTERNAL_DEVICE_ADDED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST, 0,
NULL, NULL, NULL,
......@@ -5723,7 +5723,7 @@ nm_manager_class_init (NMManagerClass *manager_class)
/* D-Bus exported; emitted only for realized devices */
signals[DEVICE_REMOVED] =
g_signal_new ("device-removed",
g_signal_new (NM_MANAGER_DEVICE_REMOVED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMManagerClass, device_removed),
......@@ -5732,7 +5732,7 @@ nm_manager_class_init (NMManagerClass *manager_class)
/* Emitted for both realized devices and placeholder devices */
signals[INTERNAL_DEVICE_REMOVED] =
g_signal_new ("internal-device-removed",
g_signal_new (NM_MANAGER_INTERNAL_DEVICE_REMOVED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST, 0,
NULL, NULL, NULL,
......@@ -5747,14 +5747,14 @@ nm_manager_class_init (NMManagerClass *manager_class)
G_TYPE_NONE, 1, G_TYPE_UINT);
signals[CHECK_PERMISSIONS] =
g_signal_new ("check-permissions",
g_signal_new (NM_MANAGER_CHECK_PERMISSIONS,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[USER_PERMISSIONS_CHANGED] =
g_signal_new ("user-permissions-changed",
g_signal_new (NM_MANAGER_USER_PERMISSIONS_CHANGED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
0, NULL, NULL, NULL,
......
......@@ -57,11 +57,19 @@
#define NM_MANAGER_SLEEPING "sleeping"
#define NM_MANAGER_STATE_FILE "state-file"
/* signals */
#define NM_MANAGER_CHECK_PERMISSIONS "check-permissions"
#define NM_MANAGER_DEVICE_ADDED "device-added"
#define NM_MANAGER_DEVICE_REMOVED "device-removed"
#define NM_MANAGER_STATE_CHANGED "state-changed"
#define NM_MANAGER_USER_PERMISSIONS_CHANGED "user-permissions-changed"
/* Internal signals */
#define NM_MANAGER_ACTIVE_CONNECTION_ADDED "active-connection-added"
#define NM_MANAGER_ACTIVE_CONNECTION_REMOVED "active-connection-removed"
#define NM_MANAGER_CONFIGURE_QUIT "configure-quit"
#define NM_MANAGER_STATE_CHANGED "state-changed"
#define NM_MANAGER_INTERNAL_DEVICE_ADDED "internal-device-added"
#define NM_MANAGER_INTERNAL_DEVICE_REMOVED "internal-device-removed"
struct _NMManager {
......
......@@ -1865,8 +1865,8 @@ constructed (GObject *object)
_connect_manager_signal (self, "notify::" NM_MANAGER_HOSTNAME, hostname_changed);
_connect_manager_signal (self, "notify::" NM_MANAGER_SLEEPING, sleeping_changed);
_connect_manager_signal (self, "notify::" NM_MANAGER_NETWORKING_ENABLED, sleeping_changed);
_connect_manager_signal (self, "internal-device-added", device_added);
_connect_manager_signal (self, "internal-device-removed", device_removed);
_connect_manager_signal (self, NM_MANAGER_INTERNAL_DEVICE_ADDED, device_added);
_connect_manager_signal (self, NM_MANAGER_INTERNAL_DEVICE_REMOVED, device_removed);
_connect_manager_signal (self, NM_MANAGER_ACTIVE_CONNECTION_ADDED, active_connection_added);
_connect_manager_signal (self, NM_MANAGER_ACTIVE_CONNECTION_REMOVED, active_connection_removed);
......
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