summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pluma/pluma-document-input-stream.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pluma/pluma-document-input-stream.c b/pluma/pluma-document-input-stream.c
index fdfb1697..360fae65 100644
--- a/pluma/pluma-document-input-stream.c
+++ b/pluma/pluma-document-input-stream.c
@@ -35,8 +35,6 @@
* thread */
-G_DEFINE_TYPE (PlumaDocumentInputStream, pluma_document_input_stream, G_TYPE_INPUT_STREAM);
-
struct _PlumaDocumentInputStreamPrivate
{
GtkTextBuffer *buffer;
@@ -49,6 +47,8 @@ struct _PlumaDocumentInputStreamPrivate
guint is_initialized : 1;
};
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaDocumentInputStream, pluma_document_input_stream, G_TYPE_INPUT_STREAM);
+
enum
{
PROP_0,
@@ -119,8 +119,6 @@ pluma_document_input_stream_class_init (PlumaDocumentInputStreamClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass, sizeof (PlumaDocumentInputStreamPrivate));
-
gobject_class->get_property = pluma_document_input_stream_get_property;
gobject_class->set_property = pluma_document_input_stream_set_property;
@@ -158,9 +156,7 @@ pluma_document_input_stream_class_init (PlumaDocumentInputStreamClass *klass)
static void
pluma_document_input_stream_init (PlumaDocumentInputStream *stream)
{
- stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
- PLUMA_TYPE_DOCUMENT_INPUT_STREAM,
- PlumaDocumentInputStreamPrivate);
+ stream->priv = pluma_document_input_stream_get_instance_private (stream);
}
static gsize