summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 12:35:27 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commit10f175e52b5bb546cd0e257478c6470c4cbd96ba (patch)
treeb9e3b2a7ac02e0c8b75580f04658b79e8a3724a7 /shell
parent6dd1aa3fb88f5093cfe6b202df11146ff7878d83 (diff)
downloadatril-10f175e52b5bb546cd0e257478c6470c4cbd96ba.tar.bz2
atril-10f175e52b5bb546cd0e257478c6470c4cbd96ba.tar.xz
ev-sidebar-layers: avoid 'g_type_class_add_private'
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-sidebar-layers.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/ev-sidebar-layers.c b/shell/ev-sidebar-layers.c
index 28aad795..1326e381 100644
--- a/shell/ev-sidebar-layers.c
+++ b/shell/ev-sidebar-layers.c
@@ -56,12 +56,10 @@ G_DEFINE_TYPE_EXTENDED (EvSidebarLayers,
ev_sidebar_layers,
GTK_TYPE_BOX,
0,
+ G_ADD_PRIVATE (EvSidebarLayers)
G_IMPLEMENT_INTERFACE (EV_TYPE_SIDEBAR_PAGE,
ev_sidebar_layers_page_iface_init))
-#define EV_SIDEBAR_LAYERS_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR_LAYERS, EvSidebarLayersPrivate))
-
static void
ev_sidebar_layers_dispose (GObject *object)
{
@@ -279,7 +277,7 @@ ev_sidebar_layers_init (EvSidebarLayers *ev_layers)
GtkWidget *swindow;
GtkTreeModel *model;
- ev_layers->priv = EV_SIDEBAR_LAYERS_GET_PRIVATE (ev_layers);
+ ev_layers->priv = ev_sidebar_layers_get_instance_private (ev_layers);
gtk_orientable_set_orientation (GTK_ORIENTABLE (ev_layers), GTK_ORIENTATION_VERTICAL);
swindow = gtk_scrolled_window_new (NULL, NULL);
@@ -312,8 +310,6 @@ ev_sidebar_layers_class_init (EvSidebarLayersClass *ev_layers_class)
g_object_class->get_property = ev_sidebar_layers_get_property;
g_object_class->dispose = ev_sidebar_layers_dispose;
- g_type_class_add_private (g_object_class, sizeof (EvSidebarLayersPrivate));
-
g_object_class_override_property (g_object_class, PROP_WIDGET, "main-widget");
signals[LAYERS_VISIBILITY_CHANGED] =