diff options
author | Pablo Barciela <[email protected]> | 2019-08-19 14:46:59 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-20 09:01:31 -0400 |
commit | 3143f2e3271aee966cc54f9d867ba7f1d45f214e (patch) | |
tree | 34ddf0ea3f4d743475b2de6c77db1dbca9b0df4d /plugins/clipboard | |
parent | ba0948d5e894d61467493fcb911bb546721b1289 (diff) | |
download | mate-settings-daemon-3143f2e3271aee966cc54f9d867ba7f1d45f214e.tar.bz2 mate-settings-daemon-3143f2e3271aee966cc54f9d867ba7f1d45f214e.tar.xz |
msd-clipboard-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins/clipboard')
-rw-r--r-- | plugins/clipboard/msd-clipboard-manager.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/clipboard/msd-clipboard-manager.c b/plugins/clipboard/msd-clipboard-manager.c index b239285..16cd2df 100644 --- a/plugins/clipboard/msd-clipboard-manager.c +++ b/plugins/clipboard/msd-clipboard-manager.c @@ -46,8 +46,6 @@ #include "mate-settings-profile.h" #include "msd-clipboard-manager.h" -#define MSD_CLIPBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_CLIPBOARD_MANAGER, MsdClipboardManagerPrivate)) - struct MsdClipboardManagerPrivate { Display *display; @@ -91,7 +89,7 @@ static void clipboard_manager_watch_cb (MsdClipboardManager *manager, long mask, void *cb_data); -G_DEFINE_TYPE (MsdClipboardManager, msd_clipboard_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (MsdClipboardManager, msd_clipboard_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -970,14 +968,12 @@ msd_clipboard_manager_class_init (MsdClipboardManagerClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = msd_clipboard_manager_finalize; - - g_type_class_add_private (klass, sizeof (MsdClipboardManagerPrivate)); } static void msd_clipboard_manager_init (MsdClipboardManager *manager) { - manager->priv = MSD_CLIPBOARD_MANAGER_GET_PRIVATE (manager); + manager->priv = msd_clipboard_manager_get_instance_private (manager); manager->priv->display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); |