summaryrefslogtreecommitdiff
path: root/cut-n-paste/toolbar-editor
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-19 09:53:09 +0200
committerraveit65 <[email protected]>2019-09-22 11:18:50 +0200
commite9a2c11eb4d3b7404fd68461fb8bf231c37f1d47 (patch)
tree65e0ebfc4bfce4bf23a7c52833b241c50eafe96c /cut-n-paste/toolbar-editor
parent9abd45eab02db358d895af5006e6ce254d32320a (diff)
downloadeom-e9a2c11eb4d3b7404fd68461fb8bf231c37f1d47.tar.bz2
eom-e9a2c11eb4d3b7404fd68461fb8bf231c37f1d47.tar.xz
egg-toolbar-editor: avoid 'g_type_class_add_private'
Diffstat (limited to 'cut-n-paste/toolbar-editor')
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
index 379bb9f..d852f86 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
@@ -55,8 +55,6 @@ enum
SIGNAL_HANDLER_LIST_SIZE /* Array size */
};
-#define EGG_TOOLBAR_EDITOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorPrivate))
-
struct EggToolbarEditorPrivate
{
GtkUIManager *manager;
@@ -71,7 +69,7 @@ struct EggToolbarEditorPrivate
gulong sig_handlers[SIGNAL_HANDLER_LIST_SIZE];
};
-G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_BOX)
static gint
compare_items (gconstpointer a,
@@ -264,8 +262,6 @@ egg_toolbar_editor_class_init (EggToolbarEditorClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_css_name (widget_class, "EggToolbarEditor");
-
- g_type_class_add_private (object_class, sizeof (EggToolbarEditorPrivate));
}
static void
@@ -660,7 +656,7 @@ setup_editor (EggToolbarEditor *editor)
static void
egg_toolbar_editor_init (EggToolbarEditor *t)
{
- t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t);
+ t->priv = egg_toolbar_editor_get_instance_private (t);
t->priv->manager = NULL;
t->priv->actions_list = NULL;