summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 12:24:35 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commit84d412ed282fdf051ac37835f4257fe02c65244c (patch)
tree331823b9e62e10a6c105002156ce05ac06847142 /shell
parentaf8b555f615e5107ca1ba76f2061210d4b120ff8 (diff)
downloadatril-84d412ed282fdf051ac37835f4257fe02c65244c.tar.bz2
atril-84d412ed282fdf051ac37835f4257fe02c65244c.tar.xz
ev-sidebar: avoid 'g_type_class_add_private'
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-sidebar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c
index f5c6b83d..b9173cdd 100644
--- a/shell/ev-sidebar.c
+++ b/shell/ev-sidebar.c
@@ -58,10 +58,7 @@ struct _EvSidebarPrivate {
GtkTreeModel *page_model;
};
-G_DEFINE_TYPE (EvSidebar, ev_sidebar, GTK_TYPE_BOX)
-
-#define EV_SIDEBAR_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR, EvSidebarPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (EvSidebar, ev_sidebar, GTK_TYPE_BOX)
static void
ev_sidebar_dispose (GObject *object)
@@ -177,7 +174,6 @@ ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
GObjectClass *g_object_class;
g_object_class = G_OBJECT_CLASS (ev_sidebar_class);
- g_type_class_add_private (g_object_class, sizeof (EvSidebarPrivate));
g_object_class->dispose = ev_sidebar_dispose;
g_object_class->get_property = ev_sidebar_get_property;
@@ -316,7 +312,7 @@ ev_sidebar_init (EvSidebar *ev_sidebar)
GtkWidget *arrow;
GtkWidget *image;
- ev_sidebar->priv = EV_SIDEBAR_GET_PRIVATE (ev_sidebar);
+ ev_sidebar->priv = ev_sidebar_get_instance_private (ev_sidebar);
gtk_orientable_set_orientation (GTK_ORIENTABLE (ev_sidebar), GTK_ORIENTATION_VERTICAL);