From 25a2449a3c43a123fe5e3bff16b64d917ec1808c Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Fri, 9 Aug 2019 11:48:43 +0200 Subject: ev-file-monitor: avoid 'g_type_class_add_private' --- shell/ev-file-monitor.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'shell') diff --git a/shell/ev-file-monitor.c b/shell/ev-file-monitor.c index fcb711d4..e7822be5 100644 --- a/shell/ev-file-monitor.c +++ b/shell/ev-file-monitor.c @@ -44,17 +44,14 @@ static void ev_file_monitor_changed_cb (GFileMonitor *monitor, GFileMonitorEvent event_type, EvFileMonitor *ev_monitor); -#define EV_FILE_MONITOR_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_FILE_MONITOR, EvFileMonitorPrivate)) - -G_DEFINE_TYPE (EvFileMonitor, ev_file_monitor, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (EvFileMonitor, ev_file_monitor, G_TYPE_OBJECT) static guint signals[N_SIGNALS] = { 0 }; static void ev_file_monitor_init (EvFileMonitor *ev_monitor) { - ev_monitor->priv = EV_FILE_MONITOR_GET_PRIVATE (ev_monitor); + ev_monitor->priv = ev_file_monitor_get_instance_private (ev_monitor); } static void @@ -80,8 +77,6 @@ ev_file_monitor_class_init (EvFileMonitorClass *klass) { GObjectClass *g_object_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (g_object_class, sizeof (EvFileMonitorPrivate)); - g_object_class->finalize = ev_file_monitor_finalize; /* Signals */ -- cgit v1.2.1