[gnome-panel] panel-applet-frame: avoid deprecated g_type_class_add_private
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] panel-applet-frame: avoid deprecated g_type_class_add_private
- Date: Thu, 13 Sep 2018 16:41:09 +0000 (UTC)
commit 6d88785d3079d0286f73e48576fa0043eb43b6b4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Sep 13 17:26:59 2018 +0300
panel-applet-frame: avoid deprecated g_type_class_add_private
gnome-panel/panel-applet-frame.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index 3698360ee..3b0cd2f3f 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -62,10 +62,6 @@ struct _PanelAppletFrameActivating {
/* PanelAppletFrame implementation */
-G_DEFINE_TYPE (PanelAppletFrame, panel_applet_frame, GTK_TYPE_EVENT_BOX)
-
-#define PANEL_APPLET_FRAME_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PANEL_TYPE_APPLET_FRAME,
PanelAppletFramePrivate))
-
#define HANDLE_SIZE 10
struct _PanelAppletFramePrivate {
@@ -91,6 +87,8 @@ enum {
static guint panel_applet_frame_signals [LAST_SIGNAL];
+G_DEFINE_TYPE_WITH_PRIVATE (PanelAppletFrame, panel_applet_frame, GTK_TYPE_EVENT_BOX)
+
static gboolean
panel_applet_frame_draw (GtkWidget *widget,
cairo_t *cr)
@@ -483,8 +481,6 @@ panel_applet_frame_class_init (PanelAppletFrameClass *klass)
add_tab_bindings (binding_set, GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
-
- g_type_class_add_private (klass, sizeof (PanelAppletFramePrivate));
}
static void
@@ -492,7 +488,7 @@ panel_applet_frame_init (PanelAppletFrame *frame)
{
GtkStyleContext *context;
- frame->priv = PANEL_APPLET_FRAME_GET_PRIVATE (frame);
+ frame->priv = panel_applet_frame_get_instance_private (frame);
frame->priv->panel = NULL;
frame->priv->orientation = PANEL_ORIENTATION_TOP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]