summaryrefslogtreecommitdiff
path: root/src/caja-zoom-action.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-01-24 17:49:38 +0800
committerlukefromdc <[email protected]>2019-01-28 03:13:55 +0000
commite8f124db938d82554f98a325dc23e9e09e195eb4 (patch)
tree181b91a8b83ac64a9e86efc5b3b4266c33d3512b /src/caja-zoom-action.c
parent331a0e15750c92795aedb05a5e4178c6acc16bc1 (diff)
downloadcaja-e8f124db938d82554f98a325dc23e9e09e195eb4.tar.bz2
caja-e8f124db938d82554f98a325dc23e9e09e195eb4.tar.xz
Avoid deprecated g_type_class_add_private
- caja-connect-server-dialog - caja-navigation-window - caja-property-browser - caja-sidebar-title - caja-trash-bar - caja-window - caja-zoom-action - caja-zoom-control - fm-desktop-icon-view - fm-properties-window
Diffstat (limited to 'src/caja-zoom-action.c')
-rw-r--r--src/caja-zoom-action.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/caja-zoom-action.c b/src/caja-zoom-action.c
index cd54fee9..50401d59 100644
--- a/src/caja-zoom-action.c
+++ b/src/caja-zoom-action.c
@@ -33,16 +33,12 @@
#include <gtk/gtk.h>
#include <eel/eel-gtk-extensions.h>
-G_DEFINE_TYPE (CajaZoomAction, caja_zoom_action, GTK_TYPE_ACTION)
-
static void caja_zoom_action_init (CajaZoomAction *action);
static void caja_zoom_action_class_init (CajaZoomActionClass *class);
static GObjectClass *parent_class = NULL;
-#define CAJA_ZOOM_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), CAJA_TYPE_ZOOM_ACTION, CajaZoomActionPrivate))
-
-struct CajaZoomActionPrivate
+struct _CajaZoomActionPrivate
{
CajaNavigationWindow *window;
};
@@ -53,6 +49,8 @@ enum
PROP_WINDOW
};
+G_DEFINE_TYPE_WITH_PRIVATE (CajaZoomAction, caja_zoom_action, GTK_TYPE_ACTION)
+
static void
zoom_changed_callback (CajaWindow *window,
CajaZoomLevel zoom_level,
@@ -199,12 +197,10 @@ caja_zoom_action_class_init (CajaZoomActionClass *class)
"The navigation window",
G_TYPE_OBJECT,
G_PARAM_READWRITE));
-
- g_type_class_add_private (object_class, sizeof(CajaZoomActionPrivate));
}
static void
caja_zoom_action_init (CajaZoomAction *action)
{
- action->priv = CAJA_ZOOM_ACTION_GET_PRIVATE (action);
+ action->priv = caja_zoom_action_get_instance_private (action);
}