summaryrefslogtreecommitdiff
path: root/cpufreq/src/cpufreq-popup.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-popup.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-popup.c')
-rw-r--r--cpufreq/src/cpufreq-popup.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/cpufreq/src/cpufreq-popup.c b/cpufreq/src/cpufreq-popup.c
index 049fe8b2..805cbd4e 100644
--- a/cpufreq/src/cpufreq-popup.c
+++ b/cpufreq/src/cpufreq-popup.c
@@ -33,10 +33,10 @@
struct _CPUFreqPopupPrivate {
GtkUIManager *ui_manager;
GSList *radio_group;
-
+
GtkActionGroup *freqs_group;
GSList *freqs_actions;
-
+
GtkActionGroup *govs_group;
GSList *govs_actions;
@@ -48,14 +48,11 @@ struct _CPUFreqPopupPrivate {
GtkWidget *parent;
};
-#define CPUFREQ_POPUP_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), CPUFREQ_TYPE_POPUP, CPUFreqPopupPrivate))
-
static void cpufreq_popup_init (CPUFreqPopup *popup);
static void cpufreq_popup_class_init (CPUFreqPopupClass *klass);
static void cpufreq_popup_finalize (GObject *object);
-G_DEFINE_TYPE (CPUFreqPopup, cpufreq_popup, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (CPUFreqPopup, cpufreq_popup, G_TYPE_OBJECT)
static const gchar *ui_popup =
"<ui>"
@@ -74,7 +71,7 @@ static const gchar *ui_popup =
static void
cpufreq_popup_init (CPUFreqPopup *popup)
{
- popup->priv = CPUFREQ_POPUP_GET_PRIVATE (popup);
+ popup->priv = cpufreq_popup_get_instance_private (popup);
popup->priv->ui_manager = gtk_ui_manager_new ();
popup->priv->radio_group = NULL;
@@ -91,7 +88,7 @@ cpufreq_popup_init (CPUFreqPopup *popup)
gtk_ui_manager_add_ui_from_string (popup->priv->ui_manager,
ui_popup, -1, NULL);
-
+
popup->priv->monitor = NULL;
}
@@ -100,8 +97,6 @@ cpufreq_popup_class_init (CPUFreqPopupClass *klass)
{
GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (g_object_class, sizeof (CPUFreqPopupPrivate));
-
g_object_class->finalize = cpufreq_popup_finalize;
}