summaryrefslogtreecommitdiff
path: root/cpufreq/src/cpufreq-monitor.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-22 10:20:51 +0800
committerraveit65 <[email protected]>2019-05-27 17:21:31 +0200
commitadf5920f13380611d5e5b5cb712e5b2e6b1eed9c (patch)
tree38ef09c9903c69efdb24bd3b3313a564abbd0852 /cpufreq/src/cpufreq-monitor.c
parent6fbca0cb8cfe6bedc6728a5e24384ffcbd769b9b (diff)
downloadmate-applets-adf5920f13380611d5e5b5cb712e5b2e6b1eed9c.tar.bz2
mate-applets-adf5920f13380611d5e5b5cb712e5b2e6b1eed9c.tar.xz
cpufreq: deprecated g_type_class_add_private
Diffstat (limited to 'cpufreq/src/cpufreq-monitor.c')
-rw-r--r--cpufreq/src/cpufreq-monitor.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpufreq/src/cpufreq-monitor.c b/cpufreq/src/cpufreq-monitor.c
index 38ffa0e2..0f5f116d 100644
--- a/cpufreq/src/cpufreq-monitor.c
+++ b/cpufreq/src/cpufreq-monitor.c
@@ -21,9 +21,6 @@
#include "cpufreq-monitor.h"
-#define CPUFREQ_MONITOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), CPUFREQ_TYPE_MONITOR, CPUFreqMonitorPrivate))
-
#define CPUFREQ_MONITOR_INTERVAL 1
/* Properties */
@@ -70,12 +67,12 @@ static void cpufreq_monitor_get_property (GObject *object,
static guint signals[N_SIGNALS] = { 0 };
-G_DEFINE_ABSTRACT_TYPE (CPUFreqMonitor, cpufreq_monitor, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (CPUFreqMonitor, cpufreq_monitor, G_TYPE_OBJECT)
static void
cpufreq_monitor_init (CPUFreqMonitor *monitor)
{
- monitor->priv = CPUFREQ_MONITOR_GET_PRIVATE (monitor);
+ monitor->priv = cpufreq_monitor_get_instance_private (monitor);
monitor->priv->governor = NULL;
monitor->priv->available_freqs = NULL;
@@ -98,8 +95,6 @@ cpufreq_monitor_class_init (CPUFreqMonitorClass *klass)
klass->get_available_frequencies = NULL;
klass->get_available_governors = NULL;
- g_type_class_add_private (klass, sizeof (CPUFreqMonitorPrivate));
-
/* Porperties */
g_object_class_install_property (object_class,
PROP_CPU,