summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-14 14:03:21 +0200
committerVictor Kareh <[email protected]>2019-08-20 13:34:13 -0400
commitf790b7082578d628b1117a1b5ddb03924f763877 (patch)
treeb0611f773ce5b07ee19d7969784d922f7dc80b69 /src
parent4815980393f19872fc21dfe200392160b9cb33bd (diff)
downloadmate-power-manager-f790b7082578d628b1117a1b5ddb03924f763877.tar.bz2
mate-power-manager-f790b7082578d628b1117a1b5ddb03924f763877.tar.xz
gpm-kbd-backlight: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/gpm-kbd-backlight.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c
index 287968b..2be69f7 100644
--- a/src/gpm-kbd-backlight.c
+++ b/src/gpm-kbd-backlight.c
@@ -32,8 +32,6 @@
#include "gpm-kbd-backlight.h"
#include "gsd-media-keys-window.h"
-#define GPM_KBD_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightPrivate))
-
struct GpmKbdBacklightPrivate
{
UpClient *client;
@@ -62,7 +60,7 @@ enum {
static guint signals [LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GpmKbdBacklight, gpm_kbd_backlight, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GpmKbdBacklight, gpm_kbd_backlight, G_TYPE_OBJECT)
/**
* gpm_kbd_backlight_error_quark:
@@ -673,8 +671,6 @@ gpm_kbd_backlight_class_init (GpmKbdBacklightClass *klass)
G_TYPE_NONE,
1,
G_TYPE_UINT);
-
- g_type_class_add_private (klass, sizeof (GpmKbdBacklightPrivate));
}
/**
@@ -690,7 +686,7 @@ gpm_kbd_backlight_init (GpmKbdBacklight *backlight)
GVariant *u_max_brightness;
GError *error = NULL;
- backlight->priv = GPM_KBD_BACKLIGHT_GET_PRIVATE (backlight);
+ backlight->priv = gpm_kbd_backlight_get_instance_private (backlight);
backlight->priv->upower_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,