summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting-8021x.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-10-22 12:36:09 -0500
committerDan Williams <dcbw@redhat.com>2012-10-29 15:12:58 -0500
commit38e3819b4ee9b68e877e0452875ab6d5cbcfdff5 (patch)
treeb4bf46e86c57a47c0232226be8aea025264a1d02 /libnm-util/nm-setting-8021x.c
parent1277f9986c83594faba4dd305678a27db1c7c9d1 (diff)
downloadNetworkManager-38e3819b4ee9b68e877e0452875ab6d5cbcfdff5.tar.gz
libnm-util: clean up setting registration
Make setting type registration less icky; instead of having the connection register all the settings, have the settings themselves register that information at library load time. Putting this sort of thing in G_DEFINE_TYPE_WITH_CODE is apparently more standard than the home-rolled stuff we had before. Also document the priority stuff so when adding new settings, people know what priority to use. (cleanups by jklimes)
Diffstat (limited to 'libnm-util/nm-setting-8021x.c')
-rw-r--r--libnm-util/nm-setting-8021x.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c
index 96735db21f..32eda889f6 100644
--- a/libnm-util/nm-setting-8021x.c
+++ b/libnm-util/nm-setting-8021x.c
@@ -81,7 +81,12 @@ nm_setting_802_1x_error_quark (void)
return quark;
}
-G_DEFINE_TYPE (NMSetting8021x, nm_setting_802_1x, NM_TYPE_SETTING)
+G_DEFINE_TYPE_WITH_CODE (NMSetting8021x, nm_setting_802_1x, NM_TYPE_SETTING,
+ _nm_register_setting (NM_SETTING_802_1X_SETTING_NAME,
+ g_define_type_id,
+ 2,
+ NM_SETTING_802_1X_ERROR))
+NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_802_1X)
#define NM_SETTING_802_1X_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_802_1X, NMSetting8021xPrivate))