summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-06-07 16:23:00 +0200
committerLubomir Rintel <lkundrak@v3.sk>2018-06-19 19:58:03 +0200
commit34ab7089b2d83040b8c355b45adc8f996599f388 (patch)
tree80cc2e5e81bed54a4bd3654d47a823e031b2fbed
parent1232b26de687763e531f0da7129e6d333a6a595e (diff)
downloadnetwork-manager-applet-34ab7089b2d83040b8c355b45adc8f996599f388.tar.gz
editor/page: use defines for signal names
Doing this for consistency with code where Thomas insists this is a good idea. Easier than fixing Thomas.
-rw-r--r--src/connection-editor/ce-page.c2
-rw-r--r--src/connection-editor/ce-page.h3
-rw-r--r--src/connection-editor/nm-connection-editor.c4
-rw-r--r--src/connection-editor/page-8021x-security.c2
-rw-r--r--src/connection-editor/page-bluetooth.c2
-rw-r--r--src/connection-editor/page-bond.c2
-rw-r--r--src/connection-editor/page-bridge-port.c2
-rw-r--r--src/connection-editor/page-bridge.c2
-rw-r--r--src/connection-editor/page-dcb.c2
-rw-r--r--src/connection-editor/page-dsl.c2
-rw-r--r--src/connection-editor/page-ethernet.c2
-rw-r--r--src/connection-editor/page-general.c2
-rw-r--r--src/connection-editor/page-infiniband.c2
-rw-r--r--src/connection-editor/page-ip-tunnel.c2
-rw-r--r--src/connection-editor/page-ip4.c2
-rw-r--r--src/connection-editor/page-ip6.c2
-rw-r--r--src/connection-editor/page-macsec.c2
-rw-r--r--src/connection-editor/page-master.c2
-rw-r--r--src/connection-editor/page-mobile.c2
-rw-r--r--src/connection-editor/page-ppp.c2
-rw-r--r--src/connection-editor/page-proxy.c2
-rw-r--r--src/connection-editor/page-team-port.c2
-rw-r--r--src/connection-editor/page-team.c2
-rw-r--r--src/connection-editor/page-vlan.c2
-rw-r--r--src/connection-editor/page-vpn.c2
-rw-r--r--src/connection-editor/page-wifi-security.c2
-rw-r--r--src/connection-editor/page-wifi.c2
27 files changed, 30 insertions, 27 deletions
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c
index 84e3de75..b4c8d1d4 100644
--- a/src/connection-editor/ce-page.c
+++ b/src/connection-editor/ce-page.c
@@ -843,7 +843,7 @@ ce_page_class_init (CEPageClass *page_class)
G_TYPE_NONE, 0);
signals[INITIALIZED] =
- g_signal_new ("initialized",
+ g_signal_new (CE_PAGE_INITIALIZED,
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (CEPageClass, initialized),
diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h
index 7f5480cf..1ef690a3 100644
--- a/src/connection-editor/ce-page.h
+++ b/src/connection-editor/ce-page.h
@@ -69,6 +69,9 @@ typedef void (*PageNewConnectionFunc) (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
#define CE_PAGE_CONNECTION "connection"
#define CE_PAGE_PARENT_WINDOW "parent-window"
+#define CE_PAGE_CHANGED "changed"
+#define CE_PAGE_INITIALIZED "initialized"
+
typedef struct {
GObject parent;
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index 98f4b5a7..2addda8a 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -897,8 +897,8 @@ add_page (NMConnectionEditor *editor,
GINT_TO_POINTER (g_slist_length (editor->initializing_pages)));
editor->initializing_pages = g_slist_append (editor->initializing_pages, page);
- g_signal_connect (page, "changed", G_CALLBACK (page_changed), editor);
- g_signal_connect (page, "initialized", G_CALLBACK (page_initialized), editor);
+ g_signal_connect (page, CE_PAGE_CHANGED, G_CALLBACK (page_changed), editor);
+ g_signal_connect (page, CE_PAGE_INITIALIZED, G_CALLBACK (page_initialized), editor);
}
return !!page;
}
diff --git a/src/connection-editor/page-8021x-security.c b/src/connection-editor/page-8021x-security.c
index 9794fe36..bbe614bb 100644
--- a/src/connection-editor/page-8021x-security.c
+++ b/src/connection-editor/page-8021x-security.c
@@ -130,7 +130,7 @@ ce_page_8021x_security_new (NMConnectionEditor *editor,
priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
if (priv->initial_have_8021x)
*out_secrets_setting_name = NM_SETTING_802_1X_SETTING_NAME;
diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c
index 4355eb65..f6a25d85 100644
--- a/src/connection-editor/page-bluetooth.c
+++ b/src/connection-editor/page-bluetooth.c
@@ -132,7 +132,7 @@ ce_page_bluetooth_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index 60e93f39..111bbb40 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -457,7 +457,7 @@ ce_page_bond_new (NMConnectionEditor *editor,
}
priv->wired = nm_connection_get_setting_wired (connection);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-bridge-port.c b/src/connection-editor/page-bridge-port.c
index e4afa61a..f76065ea 100644
--- a/src/connection-editor/page-bridge-port.c
+++ b/src/connection-editor/page-bridge-port.c
@@ -117,7 +117,7 @@ ce_page_bridge_port_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-bridge.c b/src/connection-editor/page-bridge.c
index 6876c67f..fc7a6a04 100644
--- a/src/connection-editor/page-bridge.c
+++ b/src/connection-editor/page-bridge.c
@@ -243,7 +243,7 @@ ce_page_bridge_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-dcb.c b/src/connection-editor/page-dcb.c
index 99f14d5a..ef146b73 100644
--- a/src/connection-editor/page-dcb.c
+++ b/src/connection-editor/page-dcb.c
@@ -640,7 +640,7 @@ ce_page_dcb_new (NMConnectionEditor *editor,
} else
priv->options = (NMSettingDcb *) nm_setting_dcb_new ();
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c
index 5e6abaae..b70f106f 100644
--- a/src/connection-editor/page-dsl.c
+++ b/src/connection-editor/page-dsl.c
@@ -229,7 +229,7 @@ ce_page_dsl_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
*out_secrets_setting_name = NM_SETTING_PPPOE_SETTING_NAME;
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index 59603f64..ddd738de 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -367,7 +367,7 @@ ce_page_ethernet_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c
index 55d9671e..e6aaec21 100644
--- a/src/connection-editor/page-general.c
+++ b/src/connection-editor/page-general.c
@@ -382,7 +382,7 @@ ce_page_general_new (NMConnectionEditor *editor,
priv->is_vpn = nm_connection_is_type (connection, NM_SETTING_VPN_SETTING_NAME);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index 5e9e8f9b..cc5e307c 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -158,7 +158,7 @@ ce_page_infiniband_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-ip-tunnel.c b/src/connection-editor/page-ip-tunnel.c
index 89969c35..55499906 100644
--- a/src/connection-editor/page-ip-tunnel.c
+++ b/src/connection-editor/page-ip-tunnel.c
@@ -185,7 +185,7 @@ ce_page_ip_tunnel_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index 80364370..94519ab8 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -1237,7 +1237,7 @@ ce_page_ip4_new (NMConnectionEditor *editor,
priv->setting = nm_connection_get_setting_ip4_config (connection);
g_assert (priv->setting);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c
index 9aa7574d..b12966fa 100644
--- a/src/connection-editor/page-ip6.c
+++ b/src/connection-editor/page-ip6.c
@@ -1219,7 +1219,7 @@ ce_page_ip6_new (NMConnectionEditor *editor,
priv->setting = nm_connection_get_setting_ip6_config (connection);
g_assert (priv->setting);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-macsec.c b/src/connection-editor/page-macsec.c
index c273dd1f..929bbb88 100644
--- a/src/connection-editor/page-macsec.c
+++ b/src/connection-editor/page-macsec.c
@@ -199,7 +199,7 @@ ce_page_macsec_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
*out_secrets_setting_name = NM_SETTING_MACSEC_SETTING_NAME;
diff --git a/src/connection-editor/page-master.c b/src/connection-editor/page-master.c
index 13e93f8f..118d4d44 100644
--- a/src/connection-editor/page-master.c
+++ b/src/connection-editor/page-master.c
@@ -74,7 +74,7 @@ constructed (GObject *object)
{
CEPageMaster *self = CE_PAGE_MASTER (object);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
G_OBJECT_CLASS (ce_page_master_parent_class)->constructed (object);
}
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index df9e95f2..7cc7202f 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -326,7 +326,7 @@ ce_page_mobile_new (NMConnectionEditor *editor,
return NULL;
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-ppp.c b/src/connection-editor/page-ppp.c
index 7ffca4cc..dac4d159 100644
--- a/src/connection-editor/page-ppp.c
+++ b/src/connection-editor/page-ppp.c
@@ -296,7 +296,7 @@ ce_page_ppp_new (NMConnectionEditor *editor,
g_assert (s_con);
priv->connection_id = g_strdup (nm_setting_connection_get_id (s_con));
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
*out_secrets_setting_name = NM_SETTING_PPP_SETTING_NAME;
diff --git a/src/connection-editor/page-proxy.c b/src/connection-editor/page-proxy.c
index a2769533..ef048bc7 100644
--- a/src/connection-editor/page-proxy.c
+++ b/src/connection-editor/page-proxy.c
@@ -224,7 +224,7 @@ ce_page_proxy_new (NMConnectionEditor *editor,
priv->setting = nm_connection_get_setting_proxy (connection);
g_assert (priv->setting);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-team-port.c b/src/connection-editor/page-team-port.c
index 64c65731..f29c1519 100644
--- a/src/connection-editor/page-team-port.c
+++ b/src/connection-editor/page-team-port.c
@@ -664,7 +664,7 @@ ce_page_team_port_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c
index f3173c3a..17bb1234 100644
--- a/src/connection-editor/page-team.c
+++ b/src/connection-editor/page-team.c
@@ -1042,7 +1042,7 @@ ce_page_team_new (NMConnectionEditor *editor,
}
priv->wired = nm_connection_get_setting_wired (connection);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index bfae1464..18742c23 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -604,7 +604,7 @@ ce_page_vlan_new (NMConnectionEditor *editor,
}
priv->s_hw = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index bc06a1cb..da99f7b3 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -120,7 +120,7 @@ ce_page_vpn_new (NMConnectionEditor *editor,
}
priv->plugin = g_object_ref (priv->plugin);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
*out_secrets_setting_name = NM_SETTING_VPN_SETTING_NAME;
diff --git a/src/connection-editor/page-wifi-security.c b/src/connection-editor/page-wifi-security.c
index 79d3bba8..701126e4 100644
--- a/src/connection-editor/page-wifi-security.c
+++ b/src/connection-editor/page-wifi-security.c
@@ -500,7 +500,7 @@ ce_page_wifi_security_new (NMConnectionEditor *editor,
nm_connection_editor_check_unsupported_properties (editor, (NMSetting *) s_wsec, known_wsec_props);
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index f4713e53..1aed7780 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -449,7 +449,7 @@ ce_page_wifi_new (NMConnectionEditor *editor,
nm_connection_add_setting (connection, NM_SETTING (priv->setting));
}
- g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
+ g_signal_connect (self, CE_PAGE_INITIALIZED, G_CALLBACK (finish_setup), NULL);
return CE_PAGE (self);
}