diff options
author | Dan Winship <danw@gnome.org> | 2014-08-07 17:19:40 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-09-04 09:18:44 -0400 |
commit | 40bb402898903d90b76f5f01f783717b838ba090 (patch) | |
tree | 142d0000cc75f798a94f9afdb8067ad11469a10c /libnm-core/nm-setting-cdma.c | |
parent | 8faef95dae8a473edffd2e9289df7941dfeeba88 (diff) | |
download | NetworkManager-40bb402898903d90b76f5f01f783717b838ba090.tar.gz |
libnm-core: simplify _nm_register_setting(), register error types too
Simplify the use of _nm_register_setting() by having it splice
together various symbol names itself rather than requiring them to be
specified explicitly, and extend it to also ensure that the type's
corresponding error type is registered (allowing one to find it via
g_type_from_name() if necessary).
Diffstat (limited to 'libnm-core/nm-setting-cdma.c')
-rw-r--r-- | libnm-core/nm-setting-cdma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libnm-core/nm-setting-cdma.c b/libnm-core/nm-setting-cdma.c index 8adc815193..ffd266cff9 100644 --- a/libnm-core/nm-setting-cdma.c +++ b/libnm-core/nm-setting-cdma.c @@ -54,10 +54,7 @@ nm_setting_cdma_error_quark (void) G_DEFINE_TYPE_WITH_CODE (NMSettingCdma, nm_setting_cdma, NM_TYPE_SETTING, - _nm_register_setting (NM_SETTING_CDMA_SETTING_NAME, - g_define_type_id, - 1, - NM_SETTING_CDMA_ERROR)) + _nm_register_setting (CDMA, 1)) NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_CDMA) #define NM_SETTING_CDMA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_CDMA, NMSettingCdmaPrivate)) |