[gnome-panel] panel-applet-frame-dbus: avoid deprecated g_type_class_add_private



commit 0ed7d9478f0ff03ebbcab7231440b227789c4a53
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Sep 13 02:49:39 2018 +0300

    panel-applet-frame-dbus: avoid deprecated g_type_class_add_private

 .../libpanel-applet-private/panel-applet-frame-dbus.c      | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c 
b/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
index b37845ae6..382b84a2d 100644
--- a/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
+++ b/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
@@ -34,16 +34,16 @@
 
 #include "panel-applet-frame-dbus.h"
 
-G_DEFINE_TYPE (PanelAppletFrameDBus,
-              panel_applet_frame_dbus,
-              PANEL_TYPE_APPLET_FRAME)
-
 struct _PanelAppletFrameDBusPrivate
 {
        PanelAppletContainer *container;
        GCancellable         *bg_cancellable;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (PanelAppletFrameDBus,
+                           panel_applet_frame_dbus,
+                           PANEL_TYPE_APPLET_FRAME)
+
 /* Keep in sync with panel-applet.h. Uggh. */
 typedef enum {
        APPLET_FLAGS_NONE   = 0,
@@ -279,9 +279,7 @@ panel_applet_frame_dbus_init (PanelAppletFrameDBus *frame)
 {
        GtkWidget *container;
 
-       frame->priv = G_TYPE_INSTANCE_GET_PRIVATE (frame,
-                                                  PANEL_TYPE_APPLET_FRAME_DBUS,
-                                                  PanelAppletFrameDBusPrivate);
+       frame->priv = panel_applet_frame_dbus_get_instance_private (frame);
 
        container = panel_applet_container_new ();
        gtk_widget_show (container);
@@ -315,8 +313,6 @@ panel_applet_frame_dbus_class_init (PanelAppletFrameDBusClass *class)
        frame_class->popup_menu = panel_applet_frame_dbus_popup_menu;
        frame_class->popup_edit_menu = panel_applet_frame_dbus_popup_edit_menu;
        frame_class->change_orientation = panel_applet_frame_dbus_change_orientation;
-
-       g_type_class_add_private (class, sizeof (PanelAppletFrameDBusPrivate));
 }
 
 static void


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