summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-16 20:30:18 +0200
committerZenWalker <[email protected]>2019-07-21 12:30:50 +0200
commitb78a68f4d0e8510dd9b885ec491055d41f14b5ad (patch)
tree1b723c5e02937d17a3707caf6fc2f4727f9eb349
parenta670f07efdc27ca5209e9a11448f7699e77eaa94 (diff)
downloadpluma-b78a68f4d0e8510dd9b885ec491055d41f14b5ad.tar.bz2
pluma-b78a68f4d0e8510dd9b885ec491055d41f14b5ad.tar.xz
pluma-documents-panel: avoid 'g_type_class_add_private'
-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;