From 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 25 Feb 2011 16:20:41 +0100 Subject: Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly --- calendar/gui/alarm-notify/alarm-notify.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'calendar/gui/alarm-notify/alarm-notify.c') diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 7f39f484fe..1a990a18b8 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -34,10 +34,6 @@ #include "config-data.h" #include "common/authentication.h" -#define ALARM_NOTIFY_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), TYPE_ALARM_NOTIFY, AlarmNotifyPrivate)) - struct _AlarmNotifyPrivate { /* Mapping from EUri's to LoadedClient structures */ /* FIXME do we need per source type uri hashes? or perhaps we @@ -208,7 +204,7 @@ alarm_notify_finalize (GObject *object) AlarmNotifyPrivate *priv; gint ii; - priv = ALARM_NOTIFY_GET_PRIVATE (object); + priv = ALARM_NOTIFY (object)->priv; for (ii = 0; ii < E_CAL_SOURCE_TYPE_LAST; ii++) { g_hash_table_foreach ( @@ -242,7 +238,7 @@ alarm_notify_init (AlarmNotify *an) { gint ii; - an->priv = ALARM_NOTIFY_GET_PRIVATE (an); + an->priv = G_TYPE_INSTANCE_GET_PRIVATE (an, TYPE_ALARM_NOTIFY, AlarmNotifyPrivate); an->priv->mutex = g_mutex_new (); an->priv->selected_calendars = config_data_get_calendars ( "/apps/evolution/calendar/sources"); -- cgit v1.2.3