aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-12-20 16:33:18 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-12-20 16:33:18 +0800
commit0d7c69dd06f119e279b31210b438b25bbb1b3eba (patch)
tree29cd038e1d864f9705cc170f76fcf5ead7e85a73 /calendar
parent88fd18c50325dec0d2a283f0036ac069cfd58708 (diff)
downloadgsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar
gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar.gz
gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar.bz2
gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar.lz
gsoc2013-evolution-0d7c69dd06f119e279b31210b438b25bbb1b3eba.tar.xz
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')
-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 */