diff options
author | Pablo Barciela <[email protected]> | 2019-08-17 13:25:44 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-20 09:01:31 -0400 |
commit | a822bd98aba1b9dd3b778a5b432b9c6d57cd4fce (patch) | |
tree | fd75d865547a1204131c51b62ff7de147a83c17e /plugins | |
parent | 6404f0ef9d942c6e1f01981ace9f3aa5e19f8abe (diff) | |
download | mate-settings-daemon-a822bd98aba1b9dd3b778a5b432b9c6d57cd4fce.tar.bz2 mate-settings-daemon-a822bd98aba1b9dd3b778a5b432b9c6d57cd4fce.tar.xz |
msd-datetime-mechanism: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/datetime/msd-datetime-mechanism.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/datetime/msd-datetime-mechanism.c b/plugins/datetime/msd-datetime-mechanism.c index 8be824e..4dd569c 100644 --- a/plugins/datetime/msd-datetime-mechanism.c +++ b/plugins/datetime/msd-datetime-mechanism.c @@ -73,9 +73,7 @@ struct MsdDatetimeMechanismPrivate static void msd_datetime_mechanism_finalize (GObject *object); -G_DEFINE_TYPE (MsdDatetimeMechanism, msd_datetime_mechanism, G_TYPE_OBJECT) - -#define MSD_DATETIME_MECHANISM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_DATETIME_TYPE_MECHANISM, MsdDatetimeMechanismPrivate)) +G_DEFINE_TYPE_WITH_PRIVATE (MsdDatetimeMechanism, msd_datetime_mechanism, G_TYPE_OBJECT) GQuark msd_datetime_mechanism_error_quark (void) @@ -139,8 +137,6 @@ msd_datetime_mechanism_class_init (MsdDatetimeMechanismClass *klass) object_class->constructor = msd_datetime_mechanism_constructor; object_class->finalize = msd_datetime_mechanism_finalize; - g_type_class_add_private (klass, sizeof (MsdDatetimeMechanismPrivate)); - dbus_g_object_type_install_info (MSD_DATETIME_TYPE_MECHANISM, &dbus_glib_msd_datetime_mechanism_object_info); dbus_g_error_domain_register (MSD_DATETIME_MECHANISM_ERROR, NULL, MSD_DATETIME_MECHANISM_TYPE_ERROR); @@ -150,7 +146,7 @@ msd_datetime_mechanism_class_init (MsdDatetimeMechanismClass *klass) static void msd_datetime_mechanism_init (MsdDatetimeMechanism *mechanism) { - mechanism->priv = MSD_DATETIME_MECHANISM_GET_PRIVATE (mechanism); + mechanism->priv = msd_datetime_mechanism_get_instance_private (mechanism); } |