[Xfce4-commits] [xfce/xfdesktop] 02/04: Fix g_type_class_add_private is deprecated
noreply at xfce.org
noreply at xfce.org
Sun Apr 21 20:48:19 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfdesktop.
commit 3890ef4c5ab4f1c802929417e67b7ef83fd3d35c
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Apr 21 15:32:17 2019 -0300
Fix g_type_class_add_private is deprecated
---
src/xfce-backdrop.c | 9 +++------
src/xfce-backdrop.h | 4 ++--
src/xfce-desktop.c | 9 +++------
src/xfce-desktop.h | 4 ++--
src/xfce-workspace.c | 9 +++------
src/xfce-workspace.h | 4 ++--
src/xfdesktop-file-icon-manager.c | 10 +++-------
src/xfdesktop-file-icon.c | 10 +++-------
src/xfdesktop-icon-view.c | 8 ++------
src/xfdesktop-icon.c | 7 ++-----
src/xfdesktop-regular-file-icon.c | 11 ++++-------
src/xfdesktop-special-file-icon.c | 11 ++++-------
src/xfdesktop-volume-icon.c | 10 ++++------
src/xfdesktop-window-icon-manager.c | 9 +++------
src/xfdesktop-window-icon.c | 7 ++-----
15 files changed, 42 insertions(+), 80 deletions(-)
diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index 5227a60..c85ddcf 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -98,7 +98,7 @@ static void cb_xfce_backdrop_image_files_changed(GFileMonitor *monitor,
GFileMonitorEvent event,
gpointer user_data);
-struct _XfceBackdropPriv
+struct _XfceBackdropPrivate
{
gint width, height;
gint bpp;
@@ -650,7 +650,7 @@ xfce_backdrop_choose_chronological(XfceBackdrop *backdrop)
/* gobject-related functions */
-G_DEFINE_TYPE(XfceBackdrop, xfce_backdrop, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE(XfceBackdrop, xfce_backdrop, G_TYPE_OBJECT)
static void
@@ -658,8 +658,6 @@ xfce_backdrop_class_init(XfceBackdropClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *)klass;
- g_type_class_add_private(klass, sizeof(XfceBackdropPriv));
-
gobject_class->finalize = xfce_backdrop_finalize;
gobject_class->set_property = xfce_backdrop_set_property;
gobject_class->get_property = xfce_backdrop_get_property;
@@ -761,8 +759,7 @@ xfce_backdrop_class_init(XfceBackdropClass *klass)
static void
xfce_backdrop_init(XfceBackdrop *backdrop)
{
- backdrop->priv = G_TYPE_INSTANCE_GET_PRIVATE(backdrop, XFCE_TYPE_BACKDROP,
- XfceBackdropPriv);
+ backdrop->priv = xfce_backdrop_get_instance_private(backdrop);
backdrop->priv->cycle_timer_id = 0;
/* color defaults */
diff --git a/src/xfce-backdrop.h b/src/xfce-backdrop.h
index aa28c68..3aefaed 100644
--- a/src/xfce-backdrop.h
+++ b/src/xfce-backdrop.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
typedef struct _XfceBackdrop XfceBackdrop;
typedef struct _XfceBackdropClass XfceBackdropClass;
-typedef struct _XfceBackdropPriv XfceBackdropPriv;
+typedef struct _XfceBackdropPrivate XfceBackdropPrivate;
typedef enum
{
@@ -76,7 +76,7 @@ struct _XfceBackdrop
GObject gobject;
/*< private >*/
- XfceBackdropPriv *priv;
+ XfceBackdropPrivate *priv;
};
struct _XfceBackdropClass
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 069416e..d085f4a 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -88,7 +88,7 @@
/* disable setting the x background for bug 7442 */
//#define DISABLE_FOR_BUG7442
-struct _XfceDesktopPriv
+struct _XfceDesktopPrivate
{
GdkScreen *gscreen;
WnckScreen *wnck_screen;
@@ -889,7 +889,7 @@ screen_set_selection(XfceDesktop *desktop)
/* gobject-related functions */
-G_DEFINE_TYPE(XfceDesktop, xfce_desktop, GTK_TYPE_WINDOW)
+G_DEFINE_TYPE_WITH_PRIVATE(XfceDesktop, xfce_desktop, GTK_TYPE_WINDOW)
static void
@@ -898,8 +898,6 @@ xfce_desktop_class_init(XfceDesktopClass *klass)
GObjectClass *gobject_class = (GObjectClass *)klass;
GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
- g_type_class_add_private(klass, sizeof(XfceDesktopPriv));
-
gobject_class->finalize = xfce_desktop_finalize;
gobject_class->set_property = xfce_desktop_set_property;
gobject_class->get_property = xfce_desktop_get_property;
@@ -1009,8 +1007,7 @@ xfce_desktop_class_init(XfceDesktopClass *klass)
static void
xfce_desktop_init(XfceDesktop *desktop)
{
- desktop->priv = G_TYPE_INSTANCE_GET_PRIVATE(desktop, XFCE_TYPE_DESKTOP,
- XfceDesktopPriv);
+ desktop->priv = xfce_desktop_get_instance_private(desktop);
gtk_window_set_type_hint(GTK_WINDOW(desktop), GDK_WINDOW_TYPE_HINT_DESKTOP);
/* Accept focus is needed for the menu pop up either by the menu key on
diff --git a/src/xfce-desktop.h b/src/xfce-desktop.h
index ff44a68..a624fd8 100644
--- a/src/xfce-desktop.h
+++ b/src/xfce-desktop.h
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
typedef struct _XfceDesktop XfceDesktop;
typedef struct _XfceDesktopClass XfceDesktopClass;
-typedef struct _XfceDesktopPriv XfceDesktopPriv;
+typedef struct _XfceDesktopPrivate XfceDesktopPrivate;
typedef void (*SessionLogoutFunc)();
@@ -53,7 +53,7 @@ struct _XfceDesktop
GtkWindow window;
/*< private >*/
- XfceDesktopPriv *priv;
+ XfceDesktopPrivate *priv;
};
struct _XfceDesktopClass
diff --git a/src/xfce-workspace.c b/src/xfce-workspace.c
index 7cb0c9e..8b3b4f3 100644
--- a/src/xfce-workspace.c
+++ b/src/xfce-workspace.c
@@ -73,7 +73,7 @@
#include "xfce-workspace.h"
#include "xfce-desktop-enum-types.h"
-struct _XfceWorkspacePriv
+struct _XfceWorkspacePrivate
{
GdkScreen *gscreen;
@@ -116,7 +116,7 @@ static void xfce_workspace_disconnect_backdrop_settings(XfceWorkspace *workspace
static void xfce_workspace_remove_backdrops(XfceWorkspace *workspace);
-G_DEFINE_TYPE(XfceWorkspace, xfce_workspace, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE(XfceWorkspace, xfce_workspace, G_TYPE_OBJECT)
/**
@@ -350,8 +350,6 @@ xfce_workspace_class_init(XfceWorkspaceClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *)klass;
- g_type_class_add_private(klass, sizeof(XfceWorkspacePriv));
-
gobject_class->finalize = xfce_workspace_finalize;
gobject_class->set_property = xfce_workspace_set_property;
gobject_class->get_property = xfce_workspace_get_property;
@@ -370,8 +368,7 @@ xfce_workspace_class_init(XfceWorkspaceClass *klass)
static void
xfce_workspace_init(XfceWorkspace *workspace)
{
- workspace->priv = G_TYPE_INSTANCE_GET_PRIVATE(workspace, XFCE_TYPE_WORKSPACE,
- XfceWorkspacePriv);
+ workspace->priv = xfce_workspace_get_instance_private(workspace);
}
static void
diff --git a/src/xfce-workspace.h b/src/xfce-workspace.h
index 0c8aa64..aabf13e 100644
--- a/src/xfce-workspace.h
+++ b/src/xfce-workspace.h
@@ -37,14 +37,14 @@ G_BEGIN_DECLS
typedef struct _XfceWorkspace XfceWorkspace;
typedef struct _XfceWorkspaceClass XfceWorkspaceClass;
-typedef struct _XfceWorkspacePriv XfceWorkspacePriv;
+typedef struct _XfceWorkspacePrivate XfceWorkspacePrivate;
struct _XfceWorkspace
{
GObject gobject;
/*< private >*/
- XfceWorkspacePriv *priv;
+ XfceWorkspacePrivate *priv;
};
struct _XfceWorkspaceClass
diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index de5b83a..fbd44f1 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -228,9 +228,9 @@ G_DEFINE_TYPE_EXTENDED(XfdesktopFileIconManager,
xfdesktop_file_icon_manager,
G_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE(XFDESKTOP_TYPE_ICON_VIEW_MANAGER,
- xfdesktop_file_icon_manager_icon_view_manager_init))
+ xfdesktop_file_icon_manager_icon_view_manager_init)
+ G_ADD_PRIVATE(XfdesktopFileIconManager))
-#define XFDESKTOP_FILE_ICON_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), XFDESKTOP_TYPE_ICON_VIEW_MANAGER, XfdesktopFileIconManagerPrivate))
enum
@@ -263,8 +263,6 @@ xfdesktop_file_icon_manager_class_init(XfdesktopFileIconManagerClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopFileIconManagerPrivate));
-
gobject_class->set_property = xfdesktop_file_icon_manager_set_property;
gobject_class->get_property = xfdesktop_file_icon_manager_get_property;
gobject_class->finalize = xfdesktop_file_icon_manager_finalize;
@@ -361,9 +359,7 @@ xfdesktop_file_icon_manager_class_init(XfdesktopFileIconManagerClass *klass)
static void
xfdesktop_file_icon_manager_init(XfdesktopFileIconManager *fmanager)
{
- fmanager->priv = G_TYPE_INSTANCE_GET_PRIVATE(fmanager,
- XFDESKTOP_TYPE_FILE_ICON_MANAGER,
- XfdesktopFileIconManagerPrivate);
+ fmanager->priv = xfdesktop_file_icon_manager_get_instance_private(fmanager);
/* be safe */
fmanager->priv->gscreen = gdk_screen_get_default();
diff --git a/src/xfdesktop-file-icon.c b/src/xfdesktop-file-icon.c
index b47384c..1b6dc4a 100644
--- a/src/xfdesktop-file-icon.c
+++ b/src/xfdesktop-file-icon.c
@@ -48,8 +48,8 @@ static void xfdesktop_file_icon_get_property(GObject *object,
GValue *value,
GParamSpec *pspec);
-G_DEFINE_ABSTRACT_TYPE(XfdesktopFileIcon, xfdesktop_file_icon,
- XFDESKTOP_TYPE_ICON)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(XfdesktopFileIcon, xfdesktop_file_icon,
+ XFDESKTOP_TYPE_ICON)
enum
{
@@ -63,8 +63,6 @@ xfdesktop_file_icon_class_init(XfdesktopFileIconClass *klass)
GObjectClass *gobject_class = (GObjectClass *)klass;
XfdesktopIconClass *icon_class = (XfdesktopIconClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopFileIconPrivate));
-
gobject_class->finalize = xfdesktop_file_icon_finalize;
gobject_class->set_property = xfdesktop_file_icon_set_property;
gobject_class->get_property = xfdesktop_file_icon_get_property;
@@ -82,9 +80,7 @@ xfdesktop_file_icon_class_init(XfdesktopFileIconClass *klass)
static void
xfdesktop_file_icon_init(XfdesktopFileIcon *icon)
{
- icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon,
- XFDESKTOP_TYPE_FILE_ICON,
- XfdesktopFileIconPrivate);
+ icon->priv = xfdesktop_file_icon_get_instance_private(icon);
}
static void
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 0bf5730..6623661 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -392,7 +392,7 @@ static guint __signals[SIG_N_SIGNALS] = { 0, };
static GQuark xfdesktop_cell_highlight_quark = 0;
-G_DEFINE_TYPE(XfdesktopIconView, xfdesktop_icon_view, GTK_TYPE_WIDGET)
+G_DEFINE_TYPE_WITH_PRIVATE(XfdesktopIconView, xfdesktop_icon_view, GTK_TYPE_WIDGET)
static void
@@ -404,8 +404,6 @@ xfdesktop_icon_view_class_init(XfdesktopIconViewClass *klass)
binding_set = gtk_binding_set_by_class(klass);
- g_type_class_add_private(klass, sizeof(XfdesktopIconViewPrivate));
-
gobject_class->finalize = xfdesktop_icon_view_finalize;
gobject_class->set_property = xfce_icon_view_set_property;
gobject_class->get_property = xfce_icon_view_get_property;
@@ -656,9 +654,7 @@ xfdesktop_icon_view_init(XfdesktopIconView *icon_view)
{
GtkStyleContext *context;
- icon_view->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon_view,
- XFDESKTOP_TYPE_ICON_VIEW,
- XfdesktopIconViewPrivate);
+ icon_view->priv = xfdesktop_icon_view_get_instance_private(icon_view);
icon_view->priv->icon_size = DEFAULT_ICON_SIZE;
icon_view->priv->font_size = DEFAULT_FONT_SIZE;
diff --git a/src/xfdesktop-icon.c b/src/xfdesktop-icon.c
index 3a41df1..87ebc8b 100644
--- a/src/xfdesktop-icon.c
+++ b/src/xfdesktop-icon.c
@@ -60,7 +60,7 @@ static guint __signals[SIG_N_SIGNALS] = { 0, };
static void xfdesktop_icon_finalize(GObject *obj);
-G_DEFINE_ABSTRACT_TYPE(XfdesktopIcon, xfdesktop_icon, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(XfdesktopIcon, xfdesktop_icon, G_TYPE_OBJECT)
static void
@@ -68,8 +68,6 @@ xfdesktop_icon_class_init(XfdesktopIconClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopIconPrivate));
-
gobject_class->finalize = xfdesktop_icon_finalize;
__signals[SIG_PIXBUF_CHANGED] = g_signal_new("pixbuf-changed",
@@ -122,8 +120,7 @@ xfdesktop_icon_class_init(XfdesktopIconClass *klass)
static void
xfdesktop_icon_init(XfdesktopIcon *icon)
{
- icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon, XFDESKTOP_TYPE_ICON,
- XfdesktopIconPrivate);
+ icon->priv = xfdesktop_icon_get_instance_private(icon);
}
static void
diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c
index 0898ea8..5c14ea6 100644
--- a/src/xfdesktop-regular-file-icon.c
+++ b/src/xfdesktop-regular-file-icon.c
@@ -106,10 +106,11 @@ G_DEFINE_TYPE_EXTENDED(XfdesktopRegularFileIcon, xfdesktop_regular_file_icon,
XFDESKTOP_TYPE_FILE_ICON, 0,
G_IMPLEMENT_INTERFACE(THUNARX_TYPE_FILE_INFO,
xfdesktop_regular_file_icon_tfi_init)
+ G_ADD_PRIVATE(XfdesktopRegularFileIcon)
)
#else
-G_DEFINE_TYPE(XfdesktopRegularFileIcon, xfdesktop_regular_file_icon,
- XFDESKTOP_TYPE_FILE_ICON)
+G_DEFINE_TYPE_WITH_PRIVATE(XfdesktopRegularFileIcon, xfdesktop_regular_file_icon,
+ XFDESKTOP_TYPE_FILE_ICON)
#endif
@@ -121,8 +122,6 @@ xfdesktop_regular_file_icon_class_init(XfdesktopRegularFileIconClass *klass)
XfdesktopIconClass *icon_class = (XfdesktopIconClass *)klass;
XfdesktopFileIconClass *file_icon_class = (XfdesktopFileIconClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopRegularFileIconPrivate));
-
gobject_class->finalize = xfdesktop_regular_file_icon_finalize;
icon_class->peek_pixbuf = xfdesktop_regular_file_icon_peek_pixbuf;
@@ -147,9 +146,7 @@ xfdesktop_regular_file_icon_class_init(XfdesktopRegularFileIconClass *klass)
static void
xfdesktop_regular_file_icon_init(XfdesktopRegularFileIcon *icon)
{
- icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon,
- XFDESKTOP_TYPE_REGULAR_FILE_ICON,
- XfdesktopRegularFileIconPrivate);
+ icon->priv = xfdesktop_regular_file_icon_get_instance_private(icon);
icon->priv->pix_opacity = 100;
icon->priv->display_name = NULL;
}
diff --git a/src/xfdesktop-special-file-icon.c b/src/xfdesktop-special-file-icon.c
index d3787f4..1967c1e 100644
--- a/src/xfdesktop-special-file-icon.c
+++ b/src/xfdesktop-special-file-icon.c
@@ -101,10 +101,11 @@ G_DEFINE_TYPE_EXTENDED(XfdesktopSpecialFileIcon, xfdesktop_special_file_icon,
XFDESKTOP_TYPE_FILE_ICON, 0,
G_IMPLEMENT_INTERFACE(THUNARX_TYPE_FILE_INFO,
xfdesktop_special_file_icon_tfi_init)
+ G_ADD_PRIVATE(XfdesktopSpecialFileIcon)
)
#else
-G_DEFINE_TYPE(XfdesktopSpecialFileIcon, xfdesktop_special_file_icon,
- XFDESKTOP_TYPE_FILE_ICON)
+G_DEFINE_TYPE_WITH_PRIVATE(XfdesktopSpecialFileIcon, xfdesktop_special_file_icon,
+ XFDESKTOP_TYPE_FILE_ICON)
#endif
@@ -116,8 +117,6 @@ xfdesktop_special_file_icon_class_init(XfdesktopSpecialFileIconClass *klass)
XfdesktopIconClass *icon_class = (XfdesktopIconClass *)klass;
XfdesktopFileIconClass *file_icon_class = (XfdesktopFileIconClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopSpecialFileIconPrivate));
-
gobject_class->finalize = xfdesktop_special_file_icon_finalize;
icon_class->peek_pixbuf = xfdesktop_special_file_icon_peek_pixbuf;
@@ -140,9 +139,7 @@ xfdesktop_special_file_icon_class_init(XfdesktopSpecialFileIconClass *klass)
static void
xfdesktop_special_file_icon_init(XfdesktopSpecialFileIcon *icon)
{
- icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon,
- XFDESKTOP_TYPE_SPECIAL_FILE_ICON,
- XfdesktopSpecialFileIconPrivate);
+ icon->priv = xfdesktop_special_file_icon_get_instance_private(icon);
}
static void
diff --git a/src/xfdesktop-volume-icon.c b/src/xfdesktop-volume-icon.c
index b93975f..ee54b21 100644
--- a/src/xfdesktop-volume-icon.c
+++ b/src/xfdesktop-volume-icon.c
@@ -107,10 +107,11 @@ G_DEFINE_TYPE_EXTENDED(XfdesktopVolumeIcon, xfdesktop_volume_icon,
XFDESKTOP_TYPE_FILE_ICON, 0,
G_IMPLEMENT_INTERFACE(THUNARX_TYPE_FILE_INFO,
xfdesktop_volume_icon_tfi_init)
+ G_ADD_PRIVATE(XfdesktopVolumeIcon)
)
#else
-G_DEFINE_TYPE(XfdesktopVolumeIcon, xfdesktop_volume_icon,
- XFDESKTOP_TYPE_FILE_ICON)
+G_DEFINE_TYPE_WITH_PRIVATE(XfdesktopVolumeIcon, xfdesktop_volume_icon,
+ XFDESKTOP_TYPE_FILE_ICON)
#endif
@@ -128,8 +129,6 @@ xfdesktop_volume_icon_class_init(XfdesktopVolumeIconClass *klass)
xfdesktop_volume_icon_activated_quark = g_quark_from_static_string("xfdesktop-volume-icon-activated");
- g_type_class_add_private(klass, sizeof(XfdesktopVolumeIconClass));
-
gobject_class->finalize = xfdesktop_volume_icon_finalize;
icon_class->peek_pixbuf = xfdesktop_volume_icon_peek_pixbuf;
@@ -154,8 +153,7 @@ xfdesktop_volume_icon_class_init(XfdesktopVolumeIconClass *klass)
static void
xfdesktop_volume_icon_init(XfdesktopVolumeIcon *icon)
{
- icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon, XFDESKTOP_TYPE_VOLUME_ICON,
- XfdesktopVolumeIconPrivate);
+ icon->priv = xfdesktop_volume_icon_get_instance_private(icon);
}
static void
diff --git a/src/xfdesktop-window-icon-manager.c b/src/xfdesktop-window-icon-manager.c
index 5b3b3ee..3e7b8e5 100644
--- a/src/xfdesktop-window-icon-manager.c
+++ b/src/xfdesktop-window-icon-manager.c
@@ -88,15 +88,14 @@ G_DEFINE_TYPE_EXTENDED(XfdesktopWindowIconManager,
xfdesktop_window_icon_manager,
G_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE(XFDESKTOP_TYPE_ICON_VIEW_MANAGER,
- xfdesktop_window_icon_manager_icon_view_manager_init))
+ xfdesktop_window_icon_manager_icon_view_manager_init)
+ G_ADD_PRIVATE(XfdesktopWindowIconManager))
static void
xfdesktop_window_icon_manager_class_init(XfdesktopWindowIconManagerClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopWindowIconManagerPrivate));
-
gobject_class->set_property = xfdesktop_window_icon_manager_set_property;
gobject_class->get_property = xfdesktop_window_icon_manager_get_property;
gobject_class->finalize = xfdesktop_window_icon_manager_finalize;
@@ -112,9 +111,7 @@ xfdesktop_window_icon_manager_class_init(XfdesktopWindowIconManagerClass *klass)
static void
xfdesktop_window_icon_manager_init(XfdesktopWindowIconManager *wmanager)
{
- wmanager->priv = G_TYPE_INSTANCE_GET_PRIVATE(wmanager,
- XFDESKTOP_TYPE_WINDOW_ICON_MANAGER,
- XfdesktopWindowIconManagerPrivate);
+ wmanager->priv = xfdesktop_window_icon_manager_get_instance_private(wmanager);
}
static void
diff --git a/src/xfdesktop-window-icon.c b/src/xfdesktop-window-icon.c
index 690948b..f6e4396 100644
--- a/src/xfdesktop-window-icon.c
+++ b/src/xfdesktop-window-icon.c
@@ -55,7 +55,7 @@ static void xfdesktop_window_icon_changed_cb(WnckWindow *window,
gpointer user_data);
-G_DEFINE_TYPE(XfdesktopWindowIcon, xfdesktop_window_icon, XFDESKTOP_TYPE_ICON)
+G_DEFINE_TYPE_WITH_PRIVATE(XfdesktopWindowIcon, xfdesktop_window_icon, XFDESKTOP_TYPE_ICON)
static void
@@ -64,8 +64,6 @@ xfdesktop_window_icon_class_init(XfdesktopWindowIconClass *klass)
GObjectClass *gobject_class = (GObjectClass *)klass;
XfdesktopIconClass *icon_class = (XfdesktopIconClass *)klass;
- g_type_class_add_private(klass, sizeof(XfdesktopWindowIconPrivate));
-
gobject_class->finalize = xfdesktop_window_icon_finalize;
icon_class->peek_pixbuf = xfdesktop_window_icon_peek_pixbuf;
@@ -78,8 +76,7 @@ xfdesktop_window_icon_class_init(XfdesktopWindowIconClass *klass)
static void
xfdesktop_window_icon_init(XfdesktopWindowIcon *icon)
{
- icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon, XFDESKTOP_TYPE_WINDOW_ICON,
- XfdesktopWindowIconPrivate);
+ icon->priv = xfdesktop_window_icon_get_instance_private(icon);
}
static void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list