diff options
author | Pablo Barciela <[email protected]> | 2019-08-12 02:07:36 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 21:04:51 +0000 |
commit | 0293c8c9efeee29b5a1bca1a33ee6dc322f1d1ff (patch) | |
tree | 5d9035235d9694ec04522814bcd170ecf2c6da56 /libdocument | |
parent | e236bb2accc0474b599b786a98f879a808088812 (diff) | |
download | atril-0293c8c9efeee29b5a1bca1a33ee6dc322f1d1ff.tar.bz2 atril-0293c8c9efeee29b5a1bca1a33ee6dc322f1d1ff.tar.xz |
ev-transition-effect: avoid 'g_type_class_add_private'
Diffstat (limited to 'libdocument')
-rw-r--r-- | libdocument/ev-transition-effect.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libdocument/ev-transition-effect.c b/libdocument/ev-transition-effect.c index ead292f3..ce6798f4 100644 --- a/libdocument/ev-transition-effect.c +++ b/libdocument/ev-transition-effect.c @@ -24,8 +24,6 @@ #include "ev-document-type-builtins.h" -#define EV_TRANSITION_EFFECT_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectPrivate)) - typedef struct EvTransitionEffectPrivate EvTransitionEffectPrivate; struct EvTransitionEffectPrivate { @@ -51,7 +49,7 @@ enum { PROP_RECTANGULAR }; -G_DEFINE_TYPE (EvTransitionEffect, ev_transition_effect, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (EvTransitionEffect, ev_transition_effect, G_TYPE_OBJECT) static void ev_transition_effect_set_property (GObject *object, @@ -61,7 +59,7 @@ ev_transition_effect_set_property (GObject *object, { EvTransitionEffectPrivate *priv; - priv = EV_TRANSITION_EFFECT_GET_PRIV (object); + priv = ev_transition_effect_get_instance_private (EV_TRANSITION_EFFECT (object)); switch (prop_id) { case PROP_TYPE: @@ -99,7 +97,7 @@ ev_transition_effect_get_property (GObject *object, { EvTransitionEffectPrivate *priv; - priv = EV_TRANSITION_EFFECT_GET_PRIV (object); + priv = ev_transition_effect_get_instance_private (EV_TRANSITION_EFFECT (object)); switch (prop_id) { case PROP_TYPE: @@ -134,7 +132,7 @@ ev_transition_effect_init (EvTransitionEffect *effect) { EvTransitionEffectPrivate *priv; - priv = EV_TRANSITION_EFFECT_GET_PRIV (effect); + priv = ev_transition_effect_get_instance_private (effect); priv->scale = 1.; } @@ -200,8 +198,6 @@ ev_transition_effect_class_init (EvTransitionEffectClass *klass) "Whether the covered area is rectangular", FALSE, G_PARAM_READWRITE)); - - g_type_class_add_private (klass, sizeof (EvTransitionEffectPrivate)); } EvTransitionEffect * |