summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict/gdict-client-context.c
diff options
context:
space:
mode:
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)
{