diff options
author | Pablo Barciela <[email protected]> | 2019-08-18 16:28:22 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-20 09:01:31 -0400 |
commit | d767e210a1dd5269c7461ad15338e8892832bcd6 (patch) | |
tree | 9d8717902de95bb508a6d40ebc9c21bd1372927e | |
parent | 85db1434aef3b70da4603a6a91391b8e8212c13f (diff) | |
download | mate-settings-daemon-d767e210a1dd5269c7461ad15338e8892832bcd6.tar.bz2 mate-settings-daemon-d767e210a1dd5269c7461ad15338e8892832bcd6.tar.xz |
msd-media-keys-window: avoid 'g_type_class_add_private'
-rw-r--r-- | plugins/media-keys/msd-media-keys-window.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/media-keys/msd-media-keys-window.c b/plugins/media-keys/msd-media-keys-window.c index dfe180d..9c36641 100644 --- a/plugins/media-keys/msd-media-keys-window.c +++ b/plugins/media-keys/msd-media-keys-window.c @@ -32,8 +32,6 @@ #include "msd-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 @@ -52,7 +50,7 @@ struct MsdMediaKeysWindowPrivate GtkWidget *label; }; -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, @@ -749,14 +747,12 @@ 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 msd_media_keys_window_init (MsdMediaKeysWindow *window) { - window->priv = MSD_MEDIA_KEYS_WINDOW_GET_PRIVATE (window); + window->priv = msd_media_keys_window_get_instance_private (window); if (!msd_osd_window_is_composited (MSD_OSD_WINDOW (window))) { GtkBuilder *builder; |