summaryrefslogtreecommitdiff
path: root/src/gpm-backlight.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-14 13:56:38 +0200
committerVictor Kareh <[email protected]>2019-08-20 13:34:13 -0400
commitf6b0397130aba9b854090205f468a488dbd509b3 (patch)
tree20f1e2733de1ee5a9493d143ef4303140f35d3b4 /src/gpm-backlight.c
parent29b50f4ae8400c3b1bd6856209ca78927467a849 (diff)
downloadmate-power-manager-f6b0397130aba9b854090205f468a488dbd509b3.tar.bz2
mate-power-manager-f6b0397130aba9b854090205f468a488dbd509b3.tar.xz
gpm-backlight: avoid 'g_type_class_add_private'
Diffstat (limited to 'src/gpm-backlight.c')
-rw-r--r--src/gpm-backlight.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
index 673d300..7e493ac 100644
--- a/src/gpm-backlight.c
+++ b/src/gpm-backlight.c
@@ -54,8 +54,6 @@
#include "gpm-icon-names.h"
#include "egg-console-kit.h"
-#define GPM_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_BACKLIGHT, GpmBacklightPrivate))
-
struct GpmBacklightPrivate
{
UpClient *client;
@@ -81,7 +79,7 @@ enum {
static guint signals [LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GpmBacklight, gpm_backlight, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GpmBacklight, gpm_backlight, G_TYPE_OBJECT)
/**
* gpm_backlight_error_quark:
@@ -723,8 +721,6 @@ gpm_backlight_class_init (GpmBacklightClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__UINT,
G_TYPE_NONE, 1, G_TYPE_UINT);
-
- g_type_class_add_private (klass, sizeof (GpmBacklightPrivate));
}
/**
@@ -738,7 +734,7 @@ gpm_backlight_class_init (GpmBacklightClass *klass)
static void
gpm_backlight_init (GpmBacklight *backlight)
{
- backlight->priv = GPM_BACKLIGHT_GET_PRIVATE (backlight);
+ backlight->priv = gpm_backlight_get_instance_private (backlight);
/* record our idle time */
backlight->priv->idle_timer = g_timer_new ();