summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-22 00:10:20 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit928f6deb3fa8f58902b5dfd651ac164a98099ed4 (patch)
tree70c5c49ae352e3cb1c3a64030bc8285c59afae91 /mate-dictionary/libgdict
parent37bc9459caba85375c1a9508cd6321cbf0d1e1c6 (diff)
downloadmate-utils-928f6deb3fa8f58902b5dfd651ac164a98099ed4.tar.bz2
mate-utils-928f6deb3fa8f58902b5dfd651ac164a98099ed4.tar.xz
gdict-database-chooser: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-dictionary/libgdict')
-rw-r--r--mate-dictionary/libgdict/gdict-database-chooser.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/mate-dictionary/libgdict/gdict-database-chooser.c b/mate-dictionary/libgdict/gdict-database-chooser.c
index 1c9b3740..a2739470 100644
--- a/mate-dictionary/libgdict/gdict-database-chooser.c
+++ b/mate-dictionary/libgdict/gdict-database-chooser.c
@@ -48,9 +48,6 @@
#include "gdict-enum-types.h"
#include "gdict-marshal.h"
-#define GDICT_DATABASE_CHOOSER_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_DATABASE_CHOOSER, GdictDatabaseChooserPrivate))
-
struct _GdictDatabaseChooserPrivate
{
GtkListStore *store;
@@ -109,9 +106,9 @@ enum
static guint db_chooser_signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GdictDatabaseChooser,
- gdict_database_chooser,
- GTK_TYPE_BOX);
+G_DEFINE_TYPE_WITH_PRIVATE (GdictDatabaseChooser,
+ gdict_database_chooser,
+ GTK_TYPE_BOX);
static void
@@ -475,8 +472,6 @@ gdict_database_chooser_class_init (GdictDatabaseChooserClass *klass)
NULL, NULL,
gdict_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (gobject_class, sizeof (GdictDatabaseChooserPrivate));
}
static void
@@ -485,7 +480,7 @@ gdict_database_chooser_init (GdictDatabaseChooser *chooser)
GdictDatabaseChooserPrivate *priv;
gtk_orientable_set_orientation (GTK_ORIENTABLE (chooser), GTK_ORIENTATION_VERTICAL);
- chooser->priv = priv = GDICT_DATABASE_CHOOSER_GET_PRIVATE (chooser);
+ chooser->priv = priv = gdict_database_chooser_get_instance_private (chooser);
priv->results = -1;
priv->context = NULL;