From 5a5612ab8ec4fb31464fa35e049a4a3b7cb64393 Mon Sep 17 00:00:00 2001 From: Felix Riemann Date: Fri, 4 Oct 2013 12:07:29 +0200 Subject: Convert to G_DEFINE_TYPE_WITH_PRIVATE part 1 origin commits: https://gitlab.gnome.org/GNOME/eog/commit/35c3864 https://gitlab.gnome.org/GNOME/eog/commit/842775b https://gitlab.gnome.org/GNOME/eog/commit/3fe0bd4 https://gitlab.gnome.org/GNOME/eog/commit/2b25632 https://gitlab.gnome.org/GNOME/eog/commit/f0c977d https://gitlab.gnome.org/GNOME/eog/commit/5cdb1b8 https://gitlab.gnome.org/GNOME/eog/commit/dba0bd4 https://gitlab.gnome.org/GNOME/eog/commit/8e31683 https://gitlab.gnome.org/GNOME/eog/commit/3945bb1 --- src/eom-sidebar.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/eom-sidebar.c') diff --git a/src/eom-sidebar.c b/src/eom-sidebar.c index 37a7cf4..18e86ec 100644 --- a/src/eom-sidebar.c +++ b/src/eom-sidebar.c @@ -64,10 +64,7 @@ struct _EomSidebarPrivate { GtkTreeModel *page_model; }; -G_DEFINE_TYPE (EomSidebar, eom_sidebar, GTK_TYPE_BOX) - -#define EOM_SIDEBAR_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_SIDEBAR, EomSidebarPrivate)) +G_DEFINE_TYPE_WITH_PRIVATE (EomSidebar, eom_sidebar, GTK_TYPE_BOX) static void eom_sidebar_destroy (GtkWidget *object) @@ -185,8 +182,6 @@ eom_sidebar_class_init (EomSidebarClass *eom_sidebar_class) g_object_class = G_OBJECT_CLASS (eom_sidebar_class); widget_class = GTK_WIDGET_CLASS (eom_sidebar_class); - g_type_class_add_private (g_object_class, sizeof (EomSidebarPrivate)); - widget_class->destroy = eom_sidebar_destroy; g_object_class->get_property = eom_sidebar_get_property; g_object_class->set_property = eom_sidebar_set_property; @@ -350,7 +345,7 @@ eom_sidebar_init (EomSidebar *eom_sidebar) GtkWidget *arrow; GtkWidget *image; - eom_sidebar->priv = EOM_SIDEBAR_GET_PRIVATE (eom_sidebar); + eom_sidebar->priv = eom_sidebar_get_instance_private (eom_sidebar); /* data model */ eom_sidebar->priv->page_model = (GtkTreeModel *) -- cgit v1.2.1