diff options
author | Wu Xiaotian <[email protected]> | 2019-01-29 12:58:09 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-02-04 12:52:32 +0100 |
commit | 9b8716826822006ec249ba99fd9576ced15a1fc7 (patch) | |
tree | 82e60d921d3ace0e727808c7d3e2e046c21573f4 /cut-n-paste/zoom-control | |
parent | d9c803e505ca848a010289bd05c1543dbc26ea3b (diff) | |
download | atril-9b8716826822006ec249ba99fd9576ced15a1fc7.tar.bz2 atril-9b8716826822006ec249ba99fd9576ced15a1fc7.tar.xz |
[ephy-zoom-control] 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-control.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cut-n-paste/zoom-control/ephy-zoom-control.c b/cut-n-paste/zoom-control/ephy-zoom-control.c index aeee9228..d20e0d32 100644 --- a/cut-n-paste/zoom-control/ephy-zoom-control.c +++ b/cut-n-paste/zoom-control/ephy-zoom-control.c @@ -28,9 +28,6 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> -#define EPHY_ZOOM_CONTROL_GET_PRIVATE(object)\ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_CONTROL, EphyZoomControlPrivate)) - struct _EphyZoomControlPrivate { GtkComboBox *combo; @@ -62,7 +59,7 @@ enum static guint signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (EphyZoomControl, ephy_zoom_control, GTK_TYPE_TOOL_ITEM) +G_DEFINE_TYPE_WITH_PRIVATE (EphyZoomControl, ephy_zoom_control, GTK_TYPE_TOOL_ITEM) static void combo_changed_cb (GtkComboBox *combo, EphyZoomControl *control) @@ -160,7 +157,7 @@ ephy_zoom_control_init (EphyZoomControl *control) GtkTreeIter iter; guint i; - p = EPHY_ZOOM_CONTROL_GET_PRIVATE (control); + p = ephy_zoom_control_get_instance_private (control); control->priv = p; p->zoom = 1.0; @@ -322,8 +319,6 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass) G_TYPE_NONE, 1, G_TYPE_FLOAT); - - g_type_class_add_private (object_class, sizeof (EphyZoomControlPrivate)); } void |