diff options
author | Pablo Barciela <[email protected]> | 2019-08-11 01:34:57 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 20:52:43 +0000 |
commit | a2618e56149141918aa246bb9a5f4a2f9d217555 (patch) | |
tree | c3e1688d90cf4772a40a82910fb98d5014934dcb /cut-n-paste/toolbar-editor/egg-toolbar-editor.c | |
parent | 1b836b3446ad1ea012b00bb991c1dd98abc6da3b (diff) | |
download | atril-a2618e56149141918aa246bb9a5f4a2f9d217555.tar.bz2 atril-a2618e56149141918aa246bb9a5f4a2f9d217555.tar.xz |
egg-toolbar-editor: avoid 'g_type_class_add_private'
Diffstat (limited to 'cut-n-paste/toolbar-editor/egg-toolbar-editor.c')
-rw-r--r-- | cut-n-paste/toolbar-editor/egg-toolbar-editor.c | 8 |
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 eb3f527b..312b9128 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 @@ egg_toolbar_editor_init (EggToolbarEditor *t) { gtk_orientable_set_orientation (GTK_ORIENTABLE (t), GTK_ORIENTATION_VERTICAL); - 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; |