summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict/gdict-client-context.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-22 00:13:04 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit26c937dfb07f2dc23e408bb40ed6f0fdf31b8ff3 (patch)
tree1e46f5a82cbf4b83205a914c6617223da4d7f334 /mate-dictionary/libgdict/gdict-client-context.c
parent928f6deb3fa8f58902b5dfd651ac164a98099ed4 (diff)
downloadmate-utils-26c937dfb07f2dc23e408bb40ed6f0fdf31b8ff3.tar.bz2
mate-utils-26c937dfb07f2dc23e408bb40ed6f0fdf31b8ff3.tar.xz
gdict-client-context: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-dictionary/libgdict/gdict-client-context.c')
-rw-r--r--mate-dictionary/libgdict/gdict-client-context.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mate-dictionary/libgdict/gdict-client-context.c b/mate-dictionary/libgdict/gdict-client-context.c
index 1728b474..858abb4e 100644
--- a/mate-dictionary/libgdict/gdict-client-context.c
+++ b/mate-dictionary/libgdict/gdict-client-context.c
@@ -158,7 +158,6 @@ enum
static guint gdict_client_context_signals[LAST_SIGNAL] = { 0 };
-#define GDICT_CLIENT_CONTEXT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_CLIENT_CONTEXT, GdictClientContextPrivate))
struct _GdictClientContextPrivate
{
#ifdef ENABLE_IPV6
@@ -194,6 +193,7 @@ static void gdict_client_context_iface_init (GdictContextIface *iface);
G_DEFINE_TYPE_WITH_CODE (GdictClientContext,
gdict_client_context,
G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GdictClientContext)
G_IMPLEMENT_INTERFACE (GDICT_TYPE_CONTEXT,
gdict_client_context_iface_init));
@@ -367,8 +367,6 @@ gdict_client_context_class_init (GdictClientContextClass *klass)
klass->connected = gdict_client_context_real_connected;
klass->disconnected = gdict_client_context_real_disconnected;
-
- g_type_class_add_private (gobject_class, sizeof (GdictClientContextPrivate));
}
static void
@@ -376,7 +374,7 @@ gdict_client_context_init (GdictClientContext *context)
{
GdictClientContextPrivate *priv;
- priv = GDICT_CLIENT_CONTEXT_GET_PRIVATE (context);
+ priv = gdict_client_context_get_instance_private (context);
context->priv = priv;
priv->hostname = NULL;
@@ -406,7 +404,7 @@ gdict_client_context_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GdictClientContextPrivate *priv = GDICT_CLIENT_CONTEXT_GET_PRIVATE (object);
+ GdictClientContextPrivate *priv = gdict_client_context_get_instance_private (GDICT_CLIENT_CONTEXT (object));
switch (prop_id)
{
@@ -439,7 +437,7 @@ gdict_client_context_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GdictClientContextPrivate *priv = GDICT_CLIENT_CONTEXT_GET_PRIVATE (object);
+ GdictClientContextPrivate *priv = gdict_client_context_get_instance_private (GDICT_CLIENT_CONTEXT (object));
switch (prop_id)
{