diff options
author | Pablo Barciela <[email protected]> | 2019-08-09 12:02:24 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 20:40:31 +0000 |
commit | 476d7ba2360a5806c4e670059ed6318f5d36a168 (patch) | |
tree | a876d4059c1c56d0dd6b041c003761c2cdea579e | |
parent | 2450be652fd8007e1923718423fcc7dd8d51fd14 (diff) | |
download | atril-476d7ba2360a5806c4e670059ed6318f5d36a168.tar.bz2 atril-476d7ba2360a5806c4e670059ed6318f5d36a168.tar.xz |
ev-window: avoid 'g_type_class_add_private'
-rw-r--r-- | shell/ev-window.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 86019e93..67dc52bf 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -241,9 +241,6 @@ struct _EvWindowPrivate { GtkWidget *ask_caret_navigation_check; }; -#define EV_WINDOW_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_WINDOW, EvWindowPrivate)) - #define EV_WINDOW_IS_PRESENTATION(w) (w->priv->presentation_view != NULL) #define PAGE_SELECTOR_ACTION "PageSelector" @@ -392,7 +389,7 @@ static void zoom_control_changed_cb (EphyZoomAction *action, static gchar *caja_sendto = NULL; -G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_APPLICATION_WINDOW) +G_DEFINE_TYPE_WITH_PRIVATE (EvWindow, ev_window, GTK_TYPE_APPLICATION_WINDOW) static gdouble get_monitor_dpi (EvWindow *ev_window) @@ -6419,8 +6416,6 @@ ev_window_class_init (EvWindowClass *ev_window_class) widget_class->drag_data_received = ev_window_drag_data_received; caja_sendto = g_find_program_in_path ("caja-sendto"); - - g_type_class_add_private (g_object_class, sizeof (EvWindowPrivate)); } /* Normal items */ @@ -7794,7 +7789,7 @@ ev_window_init (EvWindow *ev_window) g_signal_connect (ev_window, "window_state_event", G_CALLBACK (window_state_event_cb), NULL); - ev_window->priv = EV_WINDOW_GET_PRIVATE (ev_window); + ev_window->priv = ev_window_get_instance_private (ev_window); #ifdef ENABLE_DBUS connection = g_application_get_dbus_connection (g_application_get_default ()); |