summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-14 17:59:04 +0200
committerVictor Kareh <[email protected]>2019-08-20 13:34:13 -0400
commitd11450491c978d974508323376c9d7736b9ed1f8 (patch)
treec86cac776cc9b56f30836d468a595d3c0026aea5
parent88d89a99a81c8ddb942bb6b5c17eb8db9ee03b42 (diff)
downloadmate-power-manager-d11450491c978d974508323376c9d7736b9ed1f8.tar.bz2
mate-power-manager-d11450491c978d974508323376c9d7736b9ed1f8.tar.xz
gsd-media-keys-window: avoid 'g_type_class_add_private'
-rw-r--r--src/gsd-media-keys-window.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gsd-media-keys-window.c b/src/gsd-media-keys-window.c
index c84e4e2..86c3fbd 100644
--- a/src/gsd-media-keys-window.c
+++ b/src/gsd-media-keys-window.c
@@ -32,8 +32,6 @@
#include "gsd-media-keys-window.h"
-#define MSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MEDIA_KEYS_WINDOW, MsdMediaKeysWindowPrivate))
-
#define ICON_SCALE 0.55 /* size of the icon compared to the whole OSD */
struct MsdMediaKeysWindowPrivate
@@ -49,7 +47,7 @@ struct MsdMediaKeysWindowPrivate
GtkWidget *progress;
};
-G_DEFINE_TYPE (MsdMediaKeysWindow, msd_media_keys_window, MSD_TYPE_OSD_WINDOW)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdMediaKeysWindow, msd_media_keys_window, MSD_TYPE_OSD_WINDOW)
static void
volume_controls_set_visible (MsdMediaKeysWindow *window,
@@ -645,8 +643,6 @@ msd_media_keys_window_class_init (MsdMediaKeysWindowClass *klass)
MsdOsdWindowClass *osd_window_class = MSD_OSD_WINDOW_CLASS (klass);
osd_window_class->draw_when_composited = msd_media_keys_window_draw_when_composited;
-
- g_type_class_add_private (klass, sizeof (MsdMediaKeysWindowPrivate));
}
static void
@@ -654,7 +650,7 @@ msd_media_keys_window_init (MsdMediaKeysWindow *window)
{
GdkScreen *screen;
- window->priv = MSD_MEDIA_KEYS_WINDOW_GET_PRIVATE (window);
+ window->priv = msd_media_keys_window_get_instance_private (window);
screen = gtk_widget_get_screen (GTK_WIDGET (window));