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-prefs.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-prefs.c')
-rw-r--r-- | cpufreq/src/cpufreq-prefs.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cpufreq/src/cpufreq-prefs.c b/cpufreq/src/cpufreq-prefs.c index 38c28402..8ccaa17f 100644 --- a/cpufreq/src/cpufreq-prefs.c +++ b/cpufreq/src/cpufreq-prefs.c @@ -39,7 +39,7 @@ enum { struct _CPUFreqPrefsPrivate { GSettings *settings; - + guint cpu; CPUFreqShowMode show_mode; CPUFreqShowTextMode show_text_mode; @@ -54,9 +54,6 @@ struct _CPUFreqPrefsPrivate { GtkWidget *show_mode_combo; }; -#define CPUFREQ_PREFS_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), CPUFREQ_TYPE_PREFS, CPUFreqPrefsPrivate)) - static void cpufreq_prefs_init (CPUFreqPrefs *prefs); static void cpufreq_prefs_class_init (CPUFreqPrefsClass *klass); static void cpufreq_prefs_finalize (GObject *object); @@ -73,12 +70,12 @@ static void cpufreq_prefs_get_property (GObject *object, static void cpufreq_prefs_dialog_update_sensitivity (CPUFreqPrefs *prefs); -G_DEFINE_TYPE (CPUFreqPrefs, cpufreq_prefs, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (CPUFreqPrefs, cpufreq_prefs, G_TYPE_OBJECT) static void cpufreq_prefs_init (CPUFreqPrefs *prefs) { - prefs->priv = CPUFREQ_PREFS_GET_PRIVATE (prefs); + prefs->priv = cpufreq_prefs_get_instance_private (prefs); prefs->priv->settings = NULL; @@ -92,8 +89,6 @@ cpufreq_prefs_class_init (CPUFreqPrefsClass *klass) g_object_class->set_property = cpufreq_prefs_set_property; g_object_class->get_property = cpufreq_prefs_get_property; - - g_type_class_add_private (g_object_class, sizeof (CPUFreqPrefsPrivate)); /* Properties */ g_object_class_install_property (g_object_class, |