summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pluma/pluma-documents-panel.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/pluma/pluma-documents-panel.c b/pluma/pluma-documents-panel.c
index a3263a96..622c2dfc 100644
--- a/pluma/pluma-documents-panel.c
+++ b/pluma/pluma-documents-panel.c
@@ -38,10 +38,6 @@
#include <glib/gi18n.h>
-#define PLUMA_DOCUMENTS_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- PLUMA_TYPE_DOCUMENTS_PANEL, \
- PlumaDocumentsPanelPrivate))
-
struct _PlumaDocumentsPanelPrivate
{
PlumaWindow *window;
@@ -53,7 +49,7 @@ struct _PlumaDocumentsPanelPrivate
guint is_reodering : 1;
};
-G_DEFINE_TYPE(PlumaDocumentsPanel, pluma_documents_panel, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaDocumentsPanel, pluma_documents_panel, GTK_TYPE_BOX)
enum
{
@@ -435,8 +431,8 @@ pluma_documents_panel_get_property (GObject *object,
switch (prop_id)
{
case PROP_WINDOW:
- g_value_set_object (value,
- PLUMA_DOCUMENTS_PANEL_GET_PRIVATE (panel)->window);
+ panel->priv = pluma_documents_panel_get_instance_private (panel);
+ g_value_set_object (value, panel->priv->window);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -487,8 +483,6 @@ pluma_documents_panel_class_init (PlumaDocumentsPanelClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
-
- g_type_class_add_private (object_class, sizeof (PlumaDocumentsPanelPrivate));
}
static gboolean
@@ -668,7 +662,7 @@ pluma_documents_panel_init (PlumaDocumentsPanel *panel)
GtkCellRenderer *cell;
GtkTreeSelection *selection;
- panel->priv = PLUMA_DOCUMENTS_PANEL_GET_PRIVATE (panel);
+ panel->priv = pluma_documents_panel_get_instance_private (panel);
panel->priv->adding_tab = FALSE;
panel->priv->is_reodering = FALSE;