diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2013-07-29 15:08:56 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2013-07-29 15:10:36 -0300 |
commit | 35e7b5e6a75581549c9a5443b37e39dd0bf872ad (patch) | |
tree | 2e6b761277362e3be00610c1c7e29b672531ddb5 /plugins/gtk+/glade-recent-chooser-editor.c | |
parent | e42648eb11eba71983347d82b1dc73337ee99af9 (diff) | |
download | glade-35e7b5e6a75581549c9a5443b37e39dd0bf872ad.tar.gz |
Replaced g_type_class_add_private() with G_ADD_PRIVATE ()
because the new template api no longer works with g_type_class_add_private()
This fixes crashes in every template object
Diffstat (limited to 'plugins/gtk+/glade-recent-chooser-editor.c')
-rw-r--r-- | plugins/gtk+/glade-recent-chooser-editor.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/gtk+/glade-recent-chooser-editor.c b/plugins/gtk+/glade-recent-chooser-editor.c index 7bf0f9c6..cc27284d 100644 --- a/plugins/gtk+/glade-recent-chooser-editor.c +++ b/plugins/gtk+/glade-recent-chooser-editor.c @@ -35,30 +35,25 @@ struct _GladeRecentChooserEditorPrivate { static GladeEditableIface *parent_editable_iface; G_DEFINE_TYPE_WITH_CODE (GladeRecentChooserEditor, glade_recent_chooser_editor, GLADE_TYPE_EDITOR_SKELETON, + G_ADD_PRIVATE (GladeRecentChooserEditor) G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_recent_chooser_editor_editable_init)); static void glade_recent_chooser_editor_class_init (GladeRecentChooserEditorClass * klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-recent-chooser-editor.ui"); gtk_widget_class_bind_template_child_private (widget_class, GladeRecentChooserEditor, select_multiple_editor); gtk_widget_class_bind_template_child_private (widget_class, GladeRecentChooserEditor, show_numbers_editor); - - g_type_class_add_private (object_class, sizeof (GladeRecentChooserEditorPrivate)); } static void glade_recent_chooser_editor_init (GladeRecentChooserEditor * self) { - self->priv = - G_TYPE_INSTANCE_GET_PRIVATE (self, - GLADE_TYPE_RECENT_CHOOSER_EDITOR, - GladeRecentChooserEditorPrivate); + self->priv = glade_recent_chooser_editor_get_instance_private (self); gtk_widget_init_template (GTK_WIDGET (self)); } |