[eog] EogSidebar: Use G_DEFINE_TYPE_WITH_PRIVATE
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogSidebar: Use G_DEFINE_TYPE_WITH_PRIVATE
- Date: Fri, 4 Oct 2013 13:26:45 +0000 (UTC)
commit 2b2563219c805ed067b8836503d67c5c3ef44fb9
Author: Felix Riemann <friemann gnome org>
Date: Thu Oct 3 14:42:43 2013 +0200
EogSidebar: Use G_DEFINE_TYPE_WITH_PRIVATE
src/eog-sidebar.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/eog-sidebar.c b/src/eog-sidebar.c
index 51a241f..d95f109 100644
--- a/src/eog-sidebar.c
+++ b/src/eog-sidebar.c
@@ -64,10 +64,7 @@ struct _EogSidebarPrivate {
GtkTreeModel *page_model;
};
-G_DEFINE_TYPE (EogSidebar, eog_sidebar, GTK_TYPE_BOX)
-
-#define EOG_SIDEBAR_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_SIDEBAR, EogSidebarPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (EogSidebar, eog_sidebar, GTK_TYPE_BOX)
static void
eog_sidebar_destroy (GtkWidget *object)
@@ -185,8 +182,6 @@ eog_sidebar_class_init (EogSidebarClass *eog_sidebar_class)
g_object_class = G_OBJECT_CLASS (eog_sidebar_class);
widget_class = GTK_WIDGET_CLASS (eog_sidebar_class);
- g_type_class_add_private (g_object_class, sizeof (EogSidebarPrivate));
-
widget_class->destroy = eog_sidebar_destroy;
g_object_class->get_property = eog_sidebar_get_property;
g_object_class->set_property = eog_sidebar_set_property;
@@ -373,7 +368,7 @@ eog_sidebar_init (EogSidebar *eog_sidebar)
gtk_orientable_set_orientation (GTK_ORIENTABLE (eog_sidebar),
GTK_ORIENTATION_VERTICAL);
- eog_sidebar->priv = EOG_SIDEBAR_GET_PRIVATE (eog_sidebar);
+ eog_sidebar->priv = eog_sidebar_get_instance_private (eog_sidebar);
/* data model */
eog_sidebar->priv->page_model = (GtkTreeModel *)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]