summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-11 01:32:39 +0200
committerlukefromdc <[email protected]>2019-08-16 20:52:43 +0000
commit1b836b3446ad1ea012b00bb991c1dd98abc6da3b (patch)
treec4ace59ee2d7986693c314e45f45d17fdaba23c2
parentb28534ee4f907428aa925123e5c578722c95039f (diff)
downloadatril-1b836b3446ad1ea012b00bb991c1dd98abc6da3b.tar.bz2
atril-1b836b3446ad1ea012b00bb991c1dd98abc6da3b.tar.xz
egg-toolbars-model: avoid 'g_type_class_add_private'
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbars-model.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-toolbars-model.c b/cut-n-paste/toolbar-editor/egg-toolbars-model.c
index 57cc1884..94cc7fd3 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbars-model.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbars-model.c
@@ -55,8 +55,6 @@ typedef struct
static guint signals[LAST_SIGNAL] = { 0 };
-#define EGG_TOOLBARS_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelPrivate))
-
struct EggToolbarsModelPrivate
{
GNode *toolbars;
@@ -64,7 +62,7 @@ struct EggToolbarsModelPrivate
GHashTable *flags;
};
-G_DEFINE_TYPE (EggToolbarsModel, egg_toolbars_model, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (EggToolbarsModel, egg_toolbars_model, G_TYPE_OBJECT)
static xmlDocPtr
egg_toolbars_model_to_xml (EggToolbarsModel *model)
@@ -778,14 +776,12 @@ egg_toolbars_model_class_init (EggToolbarsModelClass *klass)
G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_changed),
NULL, NULL, g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
-
- g_type_class_add_private (object_class, sizeof (EggToolbarsModelPrivate));
}
static void
egg_toolbars_model_init (EggToolbarsModel *model)
{
- model->priv =EGG_TOOLBARS_MODEL_GET_PRIVATE (model);
+ model->priv =egg_toolbars_model_get_instance_private (model);
model->priv->toolbars = g_node_new (NULL);
model->priv->flags = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);