summaryrefslogtreecommitdiff
path: root/cut-n-paste/zoom-control
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-01-29 12:56:40 +0800
committerraveit65 <[email protected]>2019-02-04 12:52:03 +0100
commitd9c803e505ca848a010289bd05c1543dbc26ea3b (patch)
treedeb4a67655b343b7c3dc1677a3d90667246d07ca /cut-n-paste/zoom-control
parentca538e82b7af2421d151b1dc222dd8f8d402f301 (diff)
downloadatril-d9c803e505ca848a010289bd05c1543dbc26ea3b.tar.bz2
atril-d9c803e505ca848a010289bd05c1543dbc26ea3b.tar.xz
[ephy-zoom-action] Avoid deprecated g_type_class_add_private
Diffstat (limited to 'cut-n-paste/zoom-control')
-rw-r--r--cut-n-paste/zoom-control/ephy-zoom-action.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cut-n-paste/zoom-control/ephy-zoom-action.c b/cut-n-paste/zoom-control/ephy-zoom-action.c
index 232b4873..70376d52 100644
--- a/cut-n-paste/zoom-control/ephy-zoom-action.c
+++ b/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;
}