From 2450be652fd8007e1923718423fcc7dd8d51fd14 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Fri, 9 Aug 2019 11:58:52 +0200 Subject: ev-navigation-action: avoid 'g_type_class_add_private' --- shell/ev-navigation-action.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/shell/ev-navigation-action.c b/shell/ev-navigation-action.c index e01ff566..4ec3d849 100644 --- a/shell/ev-navigation-action.c +++ b/shell/ev-navigation-action.c @@ -44,13 +44,11 @@ static void ev_navigation_action_init (EvNavigationAction *action); static void ev_navigation_action_class_init (EvNavigationActionClass *class); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; -G_DEFINE_TYPE (EvNavigationAction, ev_navigation_action, GTK_TYPE_ACTION) +G_DEFINE_TYPE_WITH_PRIVATE (EvNavigationAction, ev_navigation_action, GTK_TYPE_ACTION) G_GNUC_END_IGNORE_DEPRECATIONS; #define MAX_LABEL_LENGTH 48 -#define EV_NAVIGATION_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_NAVIGATION_ACTION, EvNavigationActionPrivate)) - static void ev_navigation_action_history_changed (EvHistory *history, gpointer data) @@ -212,7 +210,7 @@ create_menu_item (GtkAction *action) static void ev_navigation_action_init (EvNavigationAction *action) { - action->priv = EV_NAVIGATION_ACTION_GET_PRIVATE (action); + action->priv = ev_navigation_action_get_instance_private (action); } static void @@ -252,6 +250,4 @@ ev_navigation_action_class_init (EvNavigationActionClass *class) g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); - - g_type_class_add_private (object_class, sizeof (EvNavigationActionPrivate)); } -- cgit v1.2.1