summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pluma/pluma-panel.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/pluma/pluma-panel.c b/pluma/pluma-panel.c
index 0fbbb834..9a30111f 100644
--- a/pluma/pluma-panel.c
+++ b/pluma/pluma-panel.c
@@ -41,8 +41,6 @@
#define PANEL_ITEM_KEY "PlumaPanelItemKey"
-#define PLUMA_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_PANEL, PlumaPanelPrivate))
-
struct _PlumaPanelPrivate
{
GtkOrientation orientation;
@@ -85,7 +83,7 @@ static GObject *pluma_panel_constructor (GType type,
GObjectConstructParam *construct_properties);
-G_DEFINE_TYPE(PlumaPanel, pluma_panel, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaPanel, pluma_panel, GTK_TYPE_BOX)
static void
pluma_panel_finalize (GObject *obj)
@@ -177,8 +175,6 @@ pluma_panel_class_init (PlumaPanelClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- g_type_class_add_private (klass, sizeof (PlumaPanelPrivate));
-
object_class->constructor = pluma_panel_constructor;
object_class->finalize = pluma_panel_finalize;
object_class->get_property = pluma_panel_get_property;
@@ -362,10 +358,9 @@ panel_show (PlumaPanel *panel,
static void
pluma_panel_init (PlumaPanel *panel)
{
- panel->priv = PLUMA_PANEL_GET_PRIVATE (panel);
+ panel->priv = pluma_panel_get_instance_private (panel);
- gtk_orientable_set_orientation (GTK_ORIENTABLE (panel),
- GTK_ORIENTATION_VERTICAL);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (panel), GTK_ORIENTATION_VERTICAL);
}
static void