summaryrefslogtreecommitdiff
path: root/src/gs-manager.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-15 12:51:40 +0200
committerVictor Kareh <[email protected]>2019-10-02 06:48:58 -0400
commite7ad7ca4d96b8aaf36b8993c8b6f9616969f13c7 (patch)
tree102d1aaf5307f32f1fa3a288209618acb3dcb26a /src/gs-manager.c
parentf0a3ffd59a70f790ff1cddfdd00f0d7c04727107 (diff)
downloadmate-screensaver-e7ad7ca4d96b8aaf36b8993c8b6f9616969f13c7.tar.bz2
mate-screensaver-e7ad7ca4d96b8aaf36b8993c8b6f9616969f13c7.tar.xz
gs-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'src/gs-manager.c')
-rw-r--r--src/gs-manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gs-manager.c b/src/gs-manager.c
index b9777d0..6f62337 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -45,8 +45,6 @@ static void gs_manager_class_init (GSManagerClass *klass);
static void gs_manager_init (GSManager *manager);
static void gs_manager_finalize (GObject *object);
-#define GS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_MANAGER, GSManagerPrivate))
-
struct GSManagerPrivate
{
GSList *windows;
@@ -120,7 +118,7 @@ enum
static guint signals [LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (GSManager, gs_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GSManager, gs_manager, G_TYPE_OBJECT)
static void
manager_add_job_for_window (GSManager *manager,
@@ -1027,8 +1025,6 @@ gs_manager_class_init (GSManagerClass *klass)
NULL,
TRUE,
G_PARAM_READWRITE));
-
- g_type_class_add_private (klass, sizeof (GSManagerPrivate));
}
static void
@@ -1041,7 +1037,7 @@ on_bg_changed (MateBG *bg,
static void
gs_manager_init (GSManager *manager)
{
- manager->priv = GS_MANAGER_GET_PRIVATE (manager);
+ manager->priv = gs_manager_get_instance_private (manager);
manager->priv->fade = gs_fade_new ();
manager->priv->grab = gs_grab_new ();