diff options
author | Pablo Barciela <[email protected]> | 2019-08-12 02:29:10 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 21:04:51 +0000 |
commit | 6ae7bce10d1a0eaeef26d9f1bc12e3d82bfa577b (patch) | |
tree | 97375eaa5a9290fd73a2df284916add6fd6d6f7a /libdocument/ev-document.c | |
parent | d8d4f59c296545d092234e12ba62f21ed384ed62 (diff) | |
download | atril-6ae7bce10d1a0eaeef26d9f1bc12e3d82bfa577b.tar.bz2 atril-6ae7bce10d1a0eaeef26d9f1bc12e3d82bfa577b.tar.xz |
ev-document: avoid 'g_type_class_add_private'
Diffstat (limited to 'libdocument/ev-document.c')
-rw-r--r-- | libdocument/ev-document.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c index c074b3b2..639335e7 100644 --- a/libdocument/ev-document.c +++ b/libdocument/ev-document.c @@ -28,8 +28,6 @@ #include "synctex_parser.h" #include "ev-file-helpers.h" -#define EV_DOCUMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_DOCUMENT, EvDocumentPrivate)) - typedef struct _EvPageSize { gdouble width; @@ -72,7 +70,7 @@ static gboolean _ev_document_support_synctex (EvDocument *document); static GMutex ev_doc_mutex; static GMutex ev_fc_mutex; -G_DEFINE_ABSTRACT_TYPE (EvDocument, ev_document, G_TYPE_OBJECT) +G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (EvDocument, ev_document, G_TYPE_OBJECT) GQuark ev_document_error_quark (void) @@ -138,7 +136,7 @@ ev_document_finalize (GObject *object) static void ev_document_init (EvDocument *document) { - document->priv = EV_DOCUMENT_GET_PRIVATE (document); + document->priv = ev_document_get_instance_private (document); /* Assume all pages are the same size until proven otherwise */ document->priv->uniform = TRUE; @@ -151,8 +149,6 @@ ev_document_class_init (EvDocumentClass *klass) { GObjectClass *g_object_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (g_object_class, sizeof (EvDocumentPrivate)); - klass->get_page = ev_document_impl_get_page; klass->get_info = ev_document_impl_get_info; klass->get_backend_info = NULL; |