diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-12-20 16:33:18 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-12-20 16:33:18 +0800 |
commit | 0d7c69dd06f119e279b31210b438b25bbb1b3eba (patch) | |
tree | 29cd038e1d864f9705cc170f76fcf5ead7e85a73 /calendar/gui | |
parent | 88fd18c50325dec0d2a283f0036ac069cfd58708 (diff) | |
download | gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar.gz gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar.zst gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.zip |
applied an approved patch for fixing #323955. Also correct the date of previous commit.
svn path=/trunk/; revision=30893
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index 348b94a42e..141e49e6d5 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -53,9 +53,6 @@ static BonoboGenericFactory *factory; static AlarmNotify *alarm_notify_service = NULL; -/* to ensure alarm_notify object is created only once */ -GStaticMutex mutex_init = G_STATIC_MUTEX_INIT; - /* Callback for the master client's "die" signal. We must terminate the daemon * since the session is ending. */ @@ -114,15 +111,9 @@ init_session (void) static BonoboObject * alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id, void *data) { - g_static_mutex_lock (&mutex_init); - if (!alarm_notify_service) { - alarm_notify_service = alarm_notify_new (); - g_assert (alarm_notify_service != NULL); - } + g_assert (alarm_notify_service != NULL); bonobo_object_ref (BONOBO_OBJECT (alarm_notify_service)); - - g_static_mutex_unlock (&mutex_init); return BONOBO_OBJECT (alarm_notify_service); } @@ -130,14 +121,8 @@ alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id static gboolean init_alarm_service (gpointer user_data) { - if (!g_static_mutex_trylock (&mutex_init)) - return FALSE; - if (!alarm_notify_service) { - alarm_notify_service = alarm_notify_new (); - g_assert (alarm_notify_service != NULL); - } - g_static_mutex_unlock (&mutex_init); - + alarm_notify_service = alarm_notify_new (); + g_assert (alarm_notify_service != NULL); return FALSE; } @@ -160,6 +145,8 @@ main (int argc, char **argv) e_icon_factory_init (); + init_alarm_service (NULL); + factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory:" BASE_VERSION, (BonoboFactoryCallback) alarm_notify_factory_fn, NULL); if (!factory) @@ -167,8 +154,6 @@ main (int argc, char **argv) init_session (); - g_idle_add ((GSourceFunc) init_alarm_service, NULL); - /* FIXME Ideally we should not use camel libraries in calendar, though it is the case currently for attachments. Remove this once that is fixed. Initialise global camel_object_type */ |