summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-12 02:31:21 +0200
committerlukefromdc <[email protected]>2019-08-16 21:04:51 +0000
commitc34be5dfa37885c5c5c7caece80aeaf4b343629e (patch)
tree540be4ce6ac36d4d70e951dfd808da6a5785234c
parent6ae7bce10d1a0eaeef26d9f1bc12e3d82bfa577b (diff)
downloadatril-c34be5dfa37885c5c5c7caece80aeaf4b343629e.tar.bz2
atril-c34be5dfa37885c5c5c7caece80aeaf4b343629e.tar.xz
ev-link: avoid 'g_type_class_add_private'
-rw-r--r--libdocument/ev-link.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libdocument/ev-link.c b/libdocument/ev-link.c
index bb28ab30..e7757ce2 100644
--- a/libdocument/ev-link.c
+++ b/libdocument/ev-link.c
@@ -41,10 +41,7 @@ struct _EvLinkPrivate {
EvLinkAction *action;
};
-G_DEFINE_TYPE (EvLink, ev_link, G_TYPE_OBJECT)
-
-#define EV_LINK_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK, EvLinkPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (EvLink, ev_link, G_TYPE_OBJECT)
const gchar *
ev_link_get_title (EvLink *self)
@@ -133,7 +130,7 @@ ev_link_finalize (GObject *object)
static void
ev_link_init (EvLink *ev_link)
{
- ev_link->priv = EV_LINK_GET_PRIVATE (ev_link);
+ ev_link->priv = ev_link_get_instance_private (ev_link);
ev_link->priv->title = NULL;
ev_link->priv->action = NULL;
@@ -151,8 +148,6 @@ ev_link_class_init (EvLinkClass *ev_window_class)
g_object_class->finalize = ev_link_finalize;
- g_type_class_add_private (g_object_class, sizeof (EvLinkPrivate));
-
g_object_class_install_property (g_object_class,
PROP_TITLE,
g_param_spec_string ("title",