diff options
author | Pablo Barciela <[email protected]> | 2019-08-12 02:12:09 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 21:04:51 +0000 |
commit | 5e87ab42499310051fc568250d0e25f75cdad75f (patch) | |
tree | eccd6d8a447384250aa72a4faef42f6a7d42ca05 /libdocument/ev-link-dest.c | |
parent | 0293c8c9efeee29b5a1bca1a33ee6dc322f1d1ff (diff) | |
download | atril-5e87ab42499310051fc568250d0e25f75cdad75f.tar.bz2 atril-5e87ab42499310051fc568250d0e25f75cdad75f.tar.xz |
ev-link-dest: avoid 'g_type_class_add_private'
Diffstat (limited to 'libdocument/ev-link-dest.c')
-rw-r--r-- | libdocument/ev-link-dest.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libdocument/ev-link-dest.c b/libdocument/ev-link-dest.c index 6cf8e138..eb3baf2e 100644 --- a/libdocument/ev-link-dest.c +++ b/libdocument/ev-link-dest.c @@ -66,10 +66,7 @@ struct _EvLinkDestPrivate { gchar *page_label; }; -G_DEFINE_TYPE (EvLinkDest, ev_link_dest, G_TYPE_OBJECT) - -#define EV_LINK_DEST_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_DEST, EvLinkDestPrivate)) +G_DEFINE_TYPE_WITH_PRIVATE (EvLinkDest, ev_link_dest, G_TYPE_OBJECT) EvLinkDestType ev_link_dest_get_dest_type (EvLinkDest *self) @@ -273,7 +270,7 @@ ev_link_dest_finalize (GObject *object) static void ev_link_dest_init (EvLinkDest *ev_link_dest) { - ev_link_dest->priv = EV_LINK_DEST_GET_PRIVATE (ev_link_dest); + ev_link_dest->priv = ev_link_dest_get_instance_private (ev_link_dest); ev_link_dest->priv->named = NULL; } @@ -290,8 +287,6 @@ ev_link_dest_class_init (EvLinkDestClass *ev_link_dest_class) g_object_class->finalize = ev_link_dest_finalize; - g_type_class_add_private (g_object_class, sizeof (EvLinkDestPrivate)); - g_object_class_install_property (g_object_class, PROP_TYPE, g_param_spec_enum ("type", |