[gnome-panel] panel-ditem-editor: avoid deprecated g_type_class_add_private



commit d727e3893b5cb667661e33f4ede185f11285e42a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Sep 13 17:32:29 2018 +0300

    panel-ditem-editor: avoid deprecated g_type_class_add_private

 gnome-panel/panel-ditem-editor.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/gnome-panel/panel-ditem-editor.c b/gnome-panel/panel-ditem-editor.c
index 022df9747..c4a86f1ec 100644
--- a/gnome-panel/panel-ditem-editor.c
+++ b/gnome-panel/panel-ditem-editor.c
@@ -163,9 +163,7 @@ enum {
 
 static guint ditem_edit_signals[LAST_SIGNAL] = { 0 };
 
-#define PANEL_DITEM_EDITOR_GET_PRIVATE(o)  (PANEL_DITEM_EDITOR (o)->priv)
-
-G_DEFINE_TYPE (PanelDItemEditor, panel_ditem_editor, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (PanelDItemEditor, panel_ditem_editor, GTK_TYPE_DIALOG)
 
 static void panel_ditem_editor_setup_ui (PanelDItemEditor *dialog);
 
@@ -375,9 +373,6 @@ panel_ditem_editor_class_init (PanelDItemEditorClass *class)
         gobject_class->set_property = panel_ditem_editor_set_property;
         gobject_class->dispose = panel_ditem_editor_dispose;
 
-       g_type_class_add_private (class,
-                                 sizeof (PanelDItemEditorPrivate));
-
        ditem_edit_signals[SAVED] =
                g_signal_new ("saved",
                              G_TYPE_FROM_CLASS (gobject_class),
@@ -1100,9 +1095,7 @@ panel_ditem_editor_init (PanelDItemEditor *dialog)
 {
        PanelDItemEditorPrivate *priv;
 
-       priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog,
-                                           PANEL_TYPE_DITEM_EDITOR,
-                                           PanelDItemEditorPrivate);
+       priv = panel_ditem_editor_get_instance_private (dialog);
 
        dialog->priv = priv;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]