diff options
author | Pablo Barciela <[email protected]> | 2019-09-05 02:56:58 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-10-02 06:48:58 -0400 |
commit | 7218385434bb070a7d49e72f858245ff6ca2935e (patch) | |
tree | 81826ad9ca66ea013df47464d1056e4bc51be307 /src | |
parent | 7e0e0e442e9d196eecf27df1ae3c59029b9b497e (diff) | |
download | mate-screensaver-7218385434bb070a7d49e72f858245ff6ca2935e.tar.bz2 mate-screensaver-7218385434bb070a7d49e72f858245ff6ca2935e.tar.xz |
gs-lock-plug: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r-- | src/gs-lock-plug.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c index 70d0859..fddce2a 100644 --- a/src/gs-lock-plug.c +++ b/src/gs-lock-plug.c @@ -77,8 +77,6 @@ enum static void gs_lock_plug_finalize (GObject *object); -#define GS_LOCK_PLUG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_LOCK_PLUG, GSLockPlugPrivate)) - struct GSLockPlugPrivate { GtkWidget *vbox; @@ -153,7 +151,7 @@ enum static guint lock_plug_signals [LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (GSLockPlug, gs_lock_plug, GTK_TYPE_PLUG) +G_DEFINE_TYPE_WITH_PRIVATE (GSLockPlug, gs_lock_plug, GTK_TYPE_PLUG) static void gs_lock_plug_style_set (GtkWidget *widget, @@ -1283,8 +1281,6 @@ gs_lock_plug_class_init (GSLockPlugClass *klass) klass->close = gs_lock_plug_close; - g_type_class_add_private (klass, sizeof (GSLockPlugPrivate)); - lock_plug_signals [RESPONSE] = g_signal_new ("response", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST, @@ -2108,7 +2104,7 @@ gs_lock_plug_init (GSLockPlug *plug) { gs_profile_start (NULL); - plug->priv = GS_LOCK_PLUG_GET_PRIVATE (plug); + plug->priv = gs_lock_plug_get_instance_private (plug); clear_clipboards (plug); |