summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-04 01:22:30 +0200
committerVictor Kareh <[email protected]>2019-10-02 06:48:58 -0400
commit3d5528708318ec980af0f8530a5906a39e3ac015 (patch)
tree1b1e3940219e6279012feeafce4c6e57116faf52 /src
parent52b125b071d75cd63fc4907597fdfb56c268d640 (diff)
downloadmate-screensaver-3d5528708318ec980af0f8530a5906a39e3ac015.tar.bz2
mate-screensaver-3d5528708318ec980af0f8530a5906a39e3ac015.tar.xz
gs-watcher-x11: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/gs-watcher-x11.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gs-watcher-x11.c b/src/gs-watcher-x11.c
index 3d63863..eac7859 100644
--- a/src/gs-watcher-x11.c
+++ b/src/gs-watcher-x11.c
@@ -43,8 +43,6 @@ static void gs_watcher_finalize (GObject *object);
static gboolean watchdog_timer (GSWatcher *watcher);
-#define GS_WATCHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_WATCHER, GSWatcherPrivate))
-
struct GSWatcherPrivate
{
/* settings */
@@ -78,7 +76,7 @@ enum
static guint signals [LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (GSWatcher, gs_watcher, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GSWatcher, gs_watcher, G_TYPE_OBJECT)
static void
remove_watchdog_timer (GSWatcher *watcher)
@@ -188,8 +186,6 @@ gs_watcher_class_init (GSWatcherClass *klass)
gs_marshal_BOOLEAN__BOOLEAN,
G_TYPE_BOOLEAN,
1, G_TYPE_BOOLEAN);
-
- g_type_class_add_private (klass, sizeof (GSWatcherPrivate));
}
static gboolean
@@ -535,7 +531,7 @@ done:
static void
gs_watcher_init (GSWatcher *watcher)
{
- watcher->priv = GS_WATCHER_GET_PRIVATE (watcher);
+ watcher->priv = gs_watcher_get_instance_private (watcher);
watcher->priv->enabled = TRUE;
watcher->priv->active = FALSE;