Skip to content

Commit d9c803e

Browse files
yetistraveit65
authored andcommitted
[ephy-zoom-action] Avoid deprecated g_type_class_add_private
1 parent ca538e8 commit d9c803e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cut-n-paste/zoom-control/ephy-zoom-action.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include <glib/gi18n.h>
3232
#include <gtk/gtk.h>
3333

34-
#define EPHY_ZOOM_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_ACTION, EphyZoomActionPrivate))
35-
3634
struct _EphyZoomActionPrivate
3735
{
3836
float zoom;
@@ -60,7 +58,7 @@ enum
6058

6159
static guint signals[LAST_SIGNAL] = { 0 };
6260

63-
G_DEFINE_TYPE (EphyZoomAction, ephy_zoom_action, GTK_TYPE_ACTION)
61+
G_DEFINE_TYPE_WITH_PRIVATE (EphyZoomAction, ephy_zoom_action, GTK_TYPE_ACTION)
6462

6563
static void
6664
zoom_to_level_cb (EphyZoomControl *control,
@@ -274,14 +272,12 @@ ephy_zoom_action_class_init (EphyZoomActionClass *class)
274272
G_TYPE_NONE,
275273
1,
276274
G_TYPE_FLOAT);
277-
278-
g_type_class_add_private (object_class, sizeof (EphyZoomActionPrivate));
279275
}
280276

281277
static void
282278
ephy_zoom_action_init (EphyZoomAction *action)
283279
{
284-
action->priv = EPHY_ZOOM_ACTION_GET_PRIVATE (action);
280+
action->priv = ephy_zoom_action_get_instance_private (action);
285281

286282
action->priv->zoom = 1.0;
287283
}

0 commit comments

Comments
 (0)