summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 11:48:43 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commit25a2449a3c43a123fe5e3bff16b64d917ec1808c (patch)
tree4e5e63b6b7bb436edb7909b8c1cdd6e0829138b2 /shell
parente315dc04a808f0b15cf186ca312f2071fece466b (diff)
downloadatril-25a2449a3c43a123fe5e3bff16b64d917ec1808c.tar.bz2
atril-25a2449a3c43a123fe5e3bff16b64d917ec1808c.tar.xz
ev-file-monitor: avoid 'g_type_class_add_private'
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-file-monitor.c9
1 files changed, 2 insertions, 7 deletions
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 */