summaryrefslogtreecommitdiff
path: root/src/caja-zoom-control.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-control.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-control.c')
-rw-r--r--src/caja-zoom-control.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/caja-zoom-control.c b/src/caja-zoom-control.c
index f875c42a..080e703d 100644
--- a/src/caja-zoom-control.c
+++ b/src/caja-zoom-control.c
@@ -55,7 +55,7 @@ enum
LAST_SIGNAL
};
-struct CajaZoomControlDetails
+struct _CajaZoomControlPrivate
{
GtkWidget *zoom_in;
GtkWidget *zoom_out;
@@ -107,7 +107,7 @@ static GType caja_zoom_control_accessible_get_type (void);
#define NUM_ACTIONS ((int)G_N_ELEMENTS (caja_zoom_control_accessible_action_names))
-G_DEFINE_TYPE (CajaZoomControl, caja_zoom_control, GTK_TYPE_BOX);
+G_DEFINE_TYPE_WITH_PRIVATE (CajaZoomControl, caja_zoom_control, GTK_TYPE_BOX);
static void
caja_zoom_control_finalize (GObject *object)
@@ -230,7 +230,7 @@ caja_zoom_control_init (CajaZoomControl *zoom_control)
GtkWidget *image;
int i;
- zoom_control->details = G_TYPE_INSTANCE_GET_PRIVATE (zoom_control, CAJA_TYPE_ZOOM_CONTROL, CajaZoomControlDetails);
+ zoom_control->details = caja_zoom_control_get_instance_private (zoom_control);
zoom_control->details->zoom_level = CAJA_ZOOM_LEVEL_STANDARD;
zoom_control->details->min_zoom_level = CAJA_ZOOM_LEVEL_SMALLEST;
@@ -677,8 +677,6 @@ caja_zoom_control_class_init (CajaZoomControlClass *class)
"change_value",
1, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_UP);
-
- g_type_class_add_private (G_OBJECT_CLASS (class), sizeof (CajaZoomControlDetails));
}
static gboolean