diff options
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, |