summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 12:21:58 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commitaf8b555f615e5107ca1ba76f2061210d4b120ff8 (patch)
tree7eac4aadcbd5a03b907fb2676c401b52a92bd495
parent5ec170487062ce3f40f08798a53df76562439f77 (diff)
downloadatril-af8b555f615e5107ca1ba76f2061210d4b120ff8.tar.bz2
atril-af8b555f615e5107ca1ba76f2061210d4b120ff8.tar.xz
ev-sidebar-attachments: avoid 'g_type_class_add_private'
-rw-r--r--shell/ev-sidebar-attachments.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/ev-sidebar-attachments.c b/shell/ev-sidebar-attachments.c
index c485c3fc..db53ec0d 100644
--- a/shell/ev-sidebar-attachments.c
+++ b/shell/ev-sidebar-attachments.c
@@ -74,12 +74,10 @@ G_DEFINE_TYPE_EXTENDED (EvSidebarAttachments,
ev_sidebar_attachments,
GTK_TYPE_BOX,
0,
+ G_ADD_PRIVATE (EvSidebarAttachments)
G_IMPLEMENT_INTERFACE (EV_TYPE_SIDEBAR_PAGE,
ev_sidebar_attachments_page_iface_init))
-#define EV_SIDEBAR_ATTACHMENTS_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR_ATTACHMENTS, EvSidebarAttachmentsPrivate))
-
/* Icon cache */
static void
ev_sidebar_attachments_icon_cache_add (EvSidebarAttachments *ev_attachbar,
@@ -512,8 +510,6 @@ ev_sidebar_attachments_class_init (EvSidebarAttachmentsClass *ev_attachbar_class
gtk_widget_class->popup_menu = ev_sidebar_attachments_popup_menu;
gtk_widget_class->screen_changed = ev_sidebar_attachments_screen_changed;
- g_type_class_add_private (g_object_class, sizeof (EvSidebarAttachmentsPrivate));
-
/* Signals */
signals[SIGNAL_POPUP_MENU] =
g_signal_new ("popup",
@@ -535,7 +531,7 @@ ev_sidebar_attachments_init (EvSidebarAttachments *ev_attachbar)
{
GtkWidget *swindow;
- ev_attachbar->priv = EV_SIDEBAR_ATTACHMENTS_GET_PRIVATE (ev_attachbar);
+ ev_attachbar->priv = ev_sidebar_attachments_get_instance_private (ev_attachbar);
gtk_orientable_set_orientation (GTK_ORIENTABLE (ev_attachbar), GTK_ORIENTATION_VERTICAL);
swindow = gtk_scrolled_window_new (NULL, NULL);