diff options
author | Wu Xiaotian <[email protected]> | 2019-01-26 12:35:44 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-31 19:37:54 +0000 |
commit | e99050ad48b89cb8e1a5eaafbb9fdf2ffd418485 (patch) | |
tree | 42ebc76b8668815a60a946ad2b9b4cc6b30c9e51 /src/caja-view-as-action.c | |
parent | 7920f9788dc8a142472c358d693bb7532c46b609 (diff) | |
download | caja-e99050ad48b89cb8e1a5eaafbb9fdf2ffd418485.tar.bz2 caja-e99050ad48b89cb8e1a5eaafbb9fdf2ffd418485.tar.xz |
Avoid deprecated g_type_class_add_private under src
Changed CajaSidePane, CajaSpatialWindow, CajaViewAsAction and CajaXContentBar
Diffstat (limited to 'src/caja-view-as-action.c')
-rw-r--r-- | src/caja-view-as-action.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/caja-view-as-action.c b/src/caja-view-as-action.c index 7baed932..ee30ddc8 100644 --- a/src/caja-view-as-action.c +++ b/src/caja-view-as-action.c @@ -33,20 +33,18 @@ #include <eel/eel-gtk-extensions.h> #include <libcaja-private/caja-view-factory.h> -G_DEFINE_TYPE (CajaViewAsAction, caja_view_as_action, GTK_TYPE_ACTION) - static void caja_view_as_action_init (CajaViewAsAction *action); static void caja_view_as_action_class_init (CajaViewAsActionClass *class); static GObjectClass *parent_class = NULL; -#define CAJA_VIEW_AS_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), CAJA_TYPE_VIEW_AS_ACTION, CajaViewAsActionPrivate)) - -struct CajaViewAsActionPrivate +struct _CajaViewAsActionPrivate { CajaNavigationWindow *window; }; +G_DEFINE_TYPE_WITH_PRIVATE (CajaViewAsAction, caja_view_as_action, GTK_TYPE_ACTION) + enum { PROP_0, @@ -276,12 +274,10 @@ caja_view_as_action_class_init (CajaViewAsActionClass *class) "The navigation window", G_TYPE_OBJECT, G_PARAM_READWRITE)); - - g_type_class_add_private (object_class, sizeof(CajaViewAsActionPrivate)); } static void caja_view_as_action_init (CajaViewAsAction *action) { - action->priv = CAJA_VIEW_AS_ACTION_GET_PRIVATE (action); + action->priv = caja_view_as_action_get_instance_private (action); } |