Skip to content
Permalink
Browse files

[ephy-zoom-action] Avoid deprecated g_type_class_add_private

  • Loading branch information...
yetist authored and raveit65 committed Jan 29, 2019
1 parent ca538e8 commit d9c803e505ca848a010289bd05c1543dbc26ea3b
Showing with 2 additions and 6 deletions.
  1. +2 −6 cut-n-paste/zoom-control/ephy-zoom-action.c
@@ -31,8 +31,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>

#define EPHY_ZOOM_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_ACTION, EphyZoomActionPrivate))

struct _EphyZoomActionPrivate
{
float zoom;
@@ -60,7 +58,7 @@ enum

static guint signals[LAST_SIGNAL] = { 0 };

G_DEFINE_TYPE (EphyZoomAction, ephy_zoom_action, GTK_TYPE_ACTION)
G_DEFINE_TYPE_WITH_PRIVATE (EphyZoomAction, ephy_zoom_action, GTK_TYPE_ACTION)

static void
zoom_to_level_cb (EphyZoomControl *control,
@@ -274,14 +272,12 @@ ephy_zoom_action_class_init (EphyZoomActionClass *class)
G_TYPE_NONE,
1,
G_TYPE_FLOAT);

g_type_class_add_private (object_class, sizeof (EphyZoomActionPrivate));
}

static void
ephy_zoom_action_init (EphyZoomAction *action)
{
action->priv = EPHY_ZOOM_ACTION_GET_PRIVATE (action);
action->priv = ephy_zoom_action_get_instance_private (action);

action->priv->zoom = 1.0;
}

0 comments on commit d9c803e

Please sign in to comment.
You can’t perform that action at this time.