summaryrefslogtreecommitdiff
path: root/cut-n-paste
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-19 09:51:27 +0200
committerraveit65 <[email protected]>2019-09-22 11:18:50 +0200
commit9abd45eab02db358d895af5006e6ce254d32320a (patch)
tree07f592f86120847867328720e71459f3a4ae5b91 /cut-n-paste
parent32a2915b002f48ee67f3dfb8599cddba510f542f (diff)
downloadeom-9abd45eab02db358d895af5006e6ce254d32320a.tar.bz2
eom-9abd45eab02db358d895af5006e6ce254d32320a.tar.xz
egg-toolbars-model: avoid 'g_type_class_add_private'
Diffstat (limited to 'cut-n-paste')
-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 ba0ad79..78bf829 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)
@@ -715,14 +713,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);