diff options
author | Pablo Barciela <[email protected]> | 2019-08-19 14:38:29 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-20 09:01:31 -0400 |
commit | a38d2230754e1f984b73fd83ca3df9c3cf8708b4 (patch) | |
tree | e3780967daa1d7297c127cad3f3f6b211e535b17 /plugins | |
parent | 59eb1e66550553ac3f55ac07617f1ca8db2f7a23 (diff) | |
download | mate-settings-daemon-a38d2230754e1f984b73fd83ca3df9c3cf8708b4.tar.bz2 mate-settings-daemon-a38d2230754e1f984b73fd83ca3df9c3cf8708b4.tar.xz |
rfkill-glib: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/rfkill/rfkill-glib.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/rfkill/rfkill-glib.c b/plugins/rfkill/rfkill-glib.c index 9686cdf..6ef1143 100644 --- a/plugins/rfkill/rfkill-glib.c +++ b/plugins/rfkill/rfkill-glib.c @@ -45,9 +45,6 @@ enum { static int signals[LAST_SIGNAL] = { 0 }; -#define CC_RFKILL_GLIB_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \ - CC_RFKILL_TYPE_GLIB, CcRfkillGlibPrivate)) - struct CcRfkillGlibPrivate { GOutputStream *stream; GIOChannel *channel; @@ -60,7 +57,7 @@ struct CcRfkillGlibPrivate { GCancellable *cancellable; }; -G_DEFINE_TYPE(CcRfkillGlib, cc_rfkill_glib, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (CcRfkillGlib, cc_rfkill_glib, G_TYPE_OBJECT) #define CHANGE_ALL_TIMEOUT 500 @@ -385,7 +382,7 @@ cc_rfkill_glib_init (CcRfkillGlib *rfkill) { CcRfkillGlibPrivate *priv; - priv = CC_RFKILL_GLIB_GET_PRIVATE (rfkill); + priv = cc_rfkill_glib_get_instance_private (rfkill); rfkill->priv = priv; } @@ -496,7 +493,6 @@ cc_rfkill_glib_class_init(CcRfkillGlibClass *klass) { GObjectClass *object_class = (GObjectClass *) klass; - g_type_class_add_private(klass, sizeof(CcRfkillGlibPrivate)); object_class->finalize = cc_rfkill_glib_finalize; signals[CHANGED] = |