summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-rr-output-info.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-01-26 21:54:36 +0800
committerlukefromdc <[email protected]>2019-01-29 20:18:39 +0000
commitb7dffb4086d7230c1b210bfc06a068a24ef21e5c (patch)
tree106e6184f387c3f02e521366cb89cadfc5d51af7 /libmate-desktop/mate-rr-output-info.c
parent627a1d931e3417630a5df78bb87b0d7873e43342 (diff)
downloadmate-desktop-b7dffb4086d7230c1b210bfc06a068a24ef21e5c.tar.bz2
mate-desktop-b7dffb4086d7230c1b210bfc06a068a24ef21e5c.tar.xz
[mate-rr] Avoid deprecated g_type_class_add_private
Diffstat (limited to 'libmate-desktop/mate-rr-output-info.c')
-rw-r--r--libmate-desktop/mate-rr-output-info.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libmate-desktop/mate-rr-output-info.c b/libmate-desktop/mate-rr-output-info.c
index 02ea16a..9761e9c 100644
--- a/libmate-desktop/mate-rr-output-info.c
+++ b/libmate-desktop/mate-rr-output-info.c
@@ -30,12 +30,12 @@
#include "edid.h"
#include "mate-rr-private.h"
-G_DEFINE_TYPE (MateRROutputInfo, mate_rr_output_info, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MateRROutputInfo, mate_rr_output_info, G_TYPE_OBJECT)
static void
mate_rr_output_info_init (MateRROutputInfo *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, MATE_TYPE_RR_OUTPUT_INFO, MateRROutputInfoPrivate);
+ self->priv = mate_rr_output_info_get_instance_private (self);
self->priv->name = NULL;
self->priv->on = FALSE;
@@ -58,8 +58,6 @@ mate_rr_output_info_class_init (MateRROutputInfoClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (MateRROutputInfoPrivate));
-
gobject_class->finalize = mate_rr_output_info_finalize;
}