diff options
author | Pablo Barciela <[email protected]> | 2019-07-20 19:41:09 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-07-23 03:21:00 +0000 |
commit | e6cd055c4d7d1f82d9d938af9878199120ac89f7 (patch) | |
tree | d2bbcb20ad228b75ccdaa38d67f53c3e3e1b6f2c | |
parent | b2f212e7c63b934312763c9c64dd3aefc76ce92c (diff) | |
download | pluma-e6cd055c4d7d1f82d9d938af9878199120ac89f7.tar.bz2 pluma-e6cd055c4d7d1f82d9d938af9878199120ac89f7.tar.xz |
pluma-panel: avoid 'g_type_class_add_private'
-rw-r--r-- | pluma/pluma-panel.c | 11 |
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 |