diff options
author | Wu Xiaotian <[email protected]> | 2019-05-22 10:20:51 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-27 17:21:31 +0200 |
commit | adf5920f13380611d5e5b5cb712e5b2e6b1eed9c (patch) | |
tree | 38ef09c9903c69efdb24bd3b3313a564abbd0852 /cpufreq/src/cpufreq-selector/cpufreq-selector.c | |
parent | 6fbca0cb8cfe6bedc6728a5e24384ffcbd769b9b (diff) | |
download | mate-applets-adf5920f13380611d5e5b5cb712e5b2e6b1eed9c.tar.bz2 mate-applets-adf5920f13380611d5e5b5cb712e5b2e6b1eed9c.tar.xz |
cpufreq: deprecated g_type_class_add_private
Diffstat (limited to 'cpufreq/src/cpufreq-selector/cpufreq-selector.c')
-rw-r--r-- | cpufreq/src/cpufreq-selector/cpufreq-selector.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector.c b/cpufreq/src/cpufreq-selector/cpufreq-selector.c index 23933c72..7f10c773 100644 --- a/cpufreq/src/cpufreq-selector/cpufreq-selector.c +++ b/cpufreq/src/cpufreq-selector/cpufreq-selector.c @@ -22,9 +22,6 @@ #include <glib.h> #include "cpufreq-selector.h" -#define CPUFREQ_SELECTOR_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), CPUFREQ_TYPE_SELECTOR, CPUFreqSelectorPrivate)) - enum { PROP_0, PROP_CPU @@ -46,7 +43,7 @@ static void cpufreq_selector_get_property (GObject *object, GValue *value, GParamSpec *spec); -G_DEFINE_ABSTRACT_TYPE (CPUFreqSelector, cpufreq_selector, G_TYPE_OBJECT) +G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (CPUFreqSelector, cpufreq_selector, G_TYPE_OBJECT) GQuark cpufreq_selector_error_quark (void) @@ -64,7 +61,7 @@ static void cpufreq_selector_init (CPUFreqSelector *selector) { - selector->priv = CPUFREQ_SELECTOR_GET_PRIVATE (selector); + selector->priv = cpufreq_selector_get_instance_private (selector); selector->priv->cpu = 0; } @@ -74,8 +71,6 @@ cpufreq_selector_class_init (CPUFreqSelectorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (klass, sizeof (CPUFreqSelectorPrivate)); - object_class->set_property = cpufreq_selector_set_property; object_class->get_property = cpufreq_selector_get_property; |