summaryrefslogtreecommitdiff
path: root/libdocument/ev-link-action.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-12 02:24:24 +0200
committerlukefromdc <[email protected]>2019-08-16 21:04:51 +0000
commitd8d4f59c296545d092234e12ba62f21ed384ed62 (patch)
treefbaebfe481c11bca10182f6fb820ba7ebcf6c44d /libdocument/ev-link-action.c
parent0baad4f23d685c6685e6bf14eb931948f26647ec (diff)
downloadatril-d8d4f59c296545d092234e12ba62f21ed384ed62.tar.bz2
atril-d8d4f59c296545d092234e12ba62f21ed384ed62.tar.xz
ev-link-action: avoid 'g_type_class_add_private'
Diffstat (limited to 'libdocument/ev-link-action.c')
-rw-r--r--libdocument/ev-link-action.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libdocument/ev-link-action.c b/libdocument/ev-link-action.c
index 3019e673..bc0aceec 100644
--- a/libdocument/ev-link-action.c
+++ b/libdocument/ev-link-action.c
@@ -57,10 +57,7 @@ struct _EvLinkActionPrivate {
GList *toggle_list;
};
-G_DEFINE_TYPE (EvLinkAction, ev_link_action, G_TYPE_OBJECT)
-
-#define EV_LINK_ACTION_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_ACTION, EvLinkActionPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (EvLinkAction, ev_link_action, G_TYPE_OBJECT)
EvLinkActionType
ev_link_action_get_action_type (EvLinkAction *self)
@@ -284,7 +281,7 @@ ev_link_action_finalize (GObject *object)
static void
ev_link_action_init (EvLinkAction *ev_link_action)
{
- ev_link_action->priv = EV_LINK_ACTION_GET_PRIVATE (ev_link_action);
+ ev_link_action->priv = ev_link_action_get_instance_private (ev_link_action);
ev_link_action->priv->dest = NULL;
ev_link_action->priv->uri = NULL;
@@ -305,8 +302,6 @@ ev_link_action_class_init (EvLinkActionClass *ev_link_action_class)
g_object_class->finalize = ev_link_action_finalize;
- g_type_class_add_private (g_object_class, sizeof (EvLinkActionPrivate));
-
g_object_class_install_property (g_object_class,
PROP_TYPE,
g_param_spec_enum ("type",