aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog12
-rw-r--r--calendar/gui/alarm-notify/notify-main.c25
2 files changed, 16 insertions, 21 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 75f057229c..8ead359e95 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,4 +1,14 @@
-2005-12-15 Johnny Jacob <johnnyjacob@gmail.com>
+2005-12-20 P S Chakravarthi <pchakravarthi@novell.com>
+
+ Fixes #323955
+
+ * gui/alarm-notify/notify-main.c main (), init_alarm_service (),
+ alarm_notify_factory_fn ():
+ Removed the mutex code for creating alarm_notify_service and
+ made init_alarm_service a simple function call rather than in
+ a g_idle_add () to avoid evolution hang.
+
+2005-12-19 Johnny Jacob <johnnyjacob@gmail.com>
Fixes Bug #324196
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 */