summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-10 14:14:29 +0200
committerlukefromdc <[email protected]>2019-08-16 20:47:41 +0000
commitb28534ee4f907428aa925123e5c578722c95039f (patch)
tree5e6dc543cc67db67f205b878906e408b7bb49b83
parent2cb34d6e7ec814edc7960518fe9d648a6e28dec0 (diff)
downloadatril-b28534ee4f907428aa925123e5c578722c95039f.tar.bz2
atril-b28534ee4f907428aa925123e5c578722c95039f.tar.xz
ev-link-accessible: avoid 'g_type_class_add_private'
-rw-r--r--libview/ev-link-accessible.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libview/ev-link-accessible.c b/libview/ev-link-accessible.c
index 6d4a2a9c..1bf60f3f 100644
--- a/libview/ev-link-accessible.c
+++ b/libview/ev-link-accessible.c
@@ -207,6 +207,7 @@ static void ev_link_accessible_action_interface_init (AtkActionIface
static void ev_link_accessible_component_iface_init (AtkComponentIface *iface);
G_DEFINE_TYPE_WITH_CODE (EvLinkAccessible, ev_link_accessible, ATK_TYPE_OBJECT,
+ G_ADD_PRIVATE (EvLinkAccessible)
G_IMPLEMENT_INTERFACE (ATK_TYPE_HYPERLINK_IMPL, ev_link_accessible_hyperlink_impl_iface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, ev_link_accessible_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, ev_link_accessible_component_iface_init))
@@ -289,8 +290,6 @@ ev_link_accessible_class_init (EvLinkAccessibleClass *klass)
object_class->finalize = ev_link_accessible_finalize;
- g_type_class_add_private (klass, sizeof (EvLinkAccessiblePrivate));
-
atk_class->get_parent = ev_link_accessible_get_parent;
atk_class->get_name = ev_link_accessible_get_name;
atk_class->ref_state_set = ev_link_accessible_ref_state_set;
@@ -300,7 +299,7 @@ static void
ev_link_accessible_init (EvLinkAccessible *link)
{
atk_object_set_role (ATK_OBJECT (link), ATK_ROLE_LINK);
- link->priv = G_TYPE_INSTANCE_GET_PRIVATE (link, EV_TYPE_LINK_ACCESSIBLE, EvLinkAccessiblePrivate);
+ link->priv = ev_link_accessible_get_instance_private (link);
link->priv->start_index = -1;
link->priv->end_index = -1;
}