summaryrefslogtreecommitdiff
path: root/mate-dictionary
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-22 00:15:31 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit291f9d2e2047795673ac45f27ff2b9cfea3c9437 (patch)
tree250ddd97eab2fdb8363e1e7314bfca3cdd3da39e /mate-dictionary
parent26c937dfb07f2dc23e408bb40ed6f0fdf31b8ff3 (diff)
downloadmate-utils-291f9d2e2047795673ac45f27ff2b9cfea3c9437.tar.bz2
mate-utils-291f9d2e2047795673ac45f27ff2b9cfea3c9437.tar.xz
gdict-source: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-dictionary')
-rw-r--r--mate-dictionary/libgdict/gdict-source.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/mate-dictionary/libgdict/gdict-source.c b/mate-dictionary/libgdict/gdict-source.c
index 7c37d615..80200396 100644
--- a/mate-dictionary/libgdict/gdict-source.c
+++ b/mate-dictionary/libgdict/gdict-source.c
@@ -60,9 +60,6 @@
#define SOURCE_KEY_HOSTNAME "Hostname"
#define SOURCE_KEY_PORT "Port"
-
-#define GDICT_SOURCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_SOURCE, GdictSourcePrivate))
-
struct _GdictSourcePrivate
{
gchar *filename;
@@ -115,7 +112,7 @@ gdict_source_error_quark (void)
}
-G_DEFINE_TYPE (GdictSource, gdict_source, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GdictSource, gdict_source, G_TYPE_OBJECT);
@@ -191,7 +188,7 @@ gdict_source_get_property (GObject *object,
static void
gdict_source_finalize (GObject *object)
{
- GdictSourcePrivate *priv = GDICT_SOURCE_GET_PRIVATE (object);
+ GdictSourcePrivate *priv = gdict_source_get_instance_private (GDICT_SOURCE (object));
g_free (priv->filename);
@@ -318,8 +315,6 @@ gdict_source_class_init (GdictSourceClass *klass)
_("The GdictContext bound to this source"),
GDICT_TYPE_CONTEXT,
G_PARAM_READABLE));
-
- g_type_class_add_private (klass, sizeof (GdictSourcePrivate));
}
static void
@@ -327,7 +322,7 @@ gdict_source_init (GdictSource *source)
{
GdictSourcePrivate *priv;
- priv = GDICT_SOURCE_GET_PRIVATE (source);
+ priv = gdict_source_get_instance_private (source);
source->priv = priv;
priv->filename = NULL;