summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-undostack-manager.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-01-26 12:13:16 +0800
committerlukefromdc <[email protected]>2019-01-31 19:37:15 +0000
commit7920f9788dc8a142472c358d693bb7532c46b609 (patch)
tree298d23f361e2c18be424b7d573a8abb5d9f64848 /libcaja-private/caja-undostack-manager.c
parent0b073710ad39202758525b9dd0a08f35fa84481d (diff)
downloadcaja-7920f9788dc8a142472c358d693bb7532c46b609.tar.bz2
caja-7920f9788dc8a142472c358d693bb7532c46b609.tar.xz
Avoid deprecated g_type_class_add_private under libcaja-private
Changed CajaIconCanvasItem, CajaTrashMonitor and CajaUndoStackManager
Diffstat (limited to 'libcaja-private/caja-undostack-manager.c')
-rw-r--r--libcaja-private/caja-undostack-manager.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libcaja-private/caja-undostack-manager.c b/libcaja-private/caja-undostack-manager.c
index b1d15505..8ce41a21 100644
--- a/libcaja-private/caja-undostack-manager.c
+++ b/libcaja-private/caja-undostack-manager.c
@@ -104,9 +104,6 @@ struct _CajaUndoStackManagerPrivate
gboolean confirm_delete;
};
-#define CAJA_UNDOSTACK_MANAGER_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CAJA_UNDOSTACK_MANAGER, CajaUndoStackManagerPrivate))
-
/* *****************************************************************
Properties management prototypes
***************************************************************** */
@@ -131,7 +128,7 @@ static void caja_undostack_manager_dispose (GObject * object);
/* *****************************************************************
Type definition
***************************************************************** */
-G_DEFINE_TYPE (CajaUndoStackManager, caja_undostack_manager,
+G_DEFINE_TYPE_WITH_PRIVATE (CajaUndoStackManager, caja_undostack_manager,
G_TYPE_OBJECT);
/* *****************************************************************
@@ -218,9 +215,6 @@ caja_undostack_manager_class_init (CajaUndoStackManagerClass * klass)
GParamSpec *confirm_delete;
GObjectClass *g_object_class;
- /* Add private structure */
- g_type_class_add_private (klass, sizeof (CajaUndoStackManagerPrivate));
-
/* Create properties */
undo_levels = g_param_spec_uint ("undo-levels", "undo levels",
"Number of undo levels to be stored",
@@ -261,7 +255,7 @@ caja_undostack_manager_init (CajaUndoStackManager * self)
{
CajaUndoStackManagerPrivate *priv;
- priv = CAJA_UNDOSTACK_MANAGER_GET_PRIVATE (self);
+ priv = caja_undostack_manager_get_instance_private (self);
self->priv = priv;