Commit f7729751 authored by Thomas Haller's avatar Thomas Haller
Browse files

core: use defines for signal names in NMDnsManager and NMFirewallManager

parent 1ddc2c59
......@@ -1599,12 +1599,12 @@ nm_dns_manager_class_init (NMDnsManagerClass *klass)
/* signals */
signals[CONFIG_CHANGED] =
g_signal_new ("config-changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMDnsManagerClass, config_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
g_signal_new (NM_DNS_MANAGER_CONFIG_CHANGED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMDnsManagerClass, config_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
......@@ -43,6 +43,8 @@ G_BEGIN_DECLS
#define NM_IS_DNS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NM_TYPE_DNS_MANAGER))
#define NM_DNS_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NM_TYPE_DNS_MANAGER, NMDnsManagerClass))
#define NM_DNS_MANAGER_CONFIG_CHANGED "config-changed"
typedef struct {
GObject parent;
} NMDnsManager;
......
......@@ -520,7 +520,7 @@ nm_firewall_manager_class_init (NMFirewallManagerClass *klass)
G_PARAM_STATIC_STRINGS));
signals[STARTED] =
g_signal_new ("started",
g_signal_new (NM_FIREWALL_MANAGER_STARTED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMFirewallManagerClass, started),
......
......@@ -40,6 +40,8 @@ G_BEGIN_DECLS
#define NM_FIREWALL_MANAGER_AVAILABLE "available"
#define NM_FIREWALL_MANAGER_STARTED "started"
struct _NMFirewallManagerCallId;
typedef struct _NMFirewallManagerCallId *NMFirewallManagerCallId;
......
......@@ -1856,12 +1856,12 @@ constructed (GObject *object)
priv->firewall_manager = g_object_ref (nm_firewall_manager_get ());
priv->fw_started_id = g_signal_connect (priv->firewall_manager, "started",
priv->fw_started_id = g_signal_connect (priv->firewall_manager, NM_FIREWALL_MANAGER_STARTED,
G_CALLBACK (firewall_started), self);
priv->dns_manager = g_object_ref (nm_dns_manager_get ());
nm_dns_manager_set_initial_hostname (priv->dns_manager, priv->orig_hostname);
priv->config_changed_id = g_signal_connect (priv->dns_manager, "config-changed",
priv->config_changed_id = g_signal_connect (priv->dns_manager, NM_DNS_MANAGER_CONFIG_CHANGED,
G_CALLBACK (dns_config_changed), self);
priv->resolver = g_resolver_get_default ();
......
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