aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-05-30 11:01:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-05-30 11:01:47 +0800
commit4a67f45b4a68a3748f7be9811bf78897806f37ca (patch)
treebd2247ea2579eb3890ba4dd9a70209bb376dfb0e /mail
parent0fe03707c1dc0fc9ca944688ca0ded20f4f092d2 (diff)
downloadgsoc2013-evolution-4a67f45b4a68a3748f7be9811bf78897806f37ca.tar.gz
gsoc2013-evolution-4a67f45b4a68a3748f7be9811bf78897806f37ca.tar.zst
gsoc2013-evolution-4a67f45b4a68a3748f7be9811bf78897806f37ca.zip
Fixes bug #43805.
2003-05-29 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #43805. * mail-session.c (session_system_beep): Proxy the gdk_beep() call to the main thread. (session_play_sound): Proxy the gnome_sound_play() call to the main thread. svn path=/trunk/; revision=21348
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-session.c36
2 files changed, 40 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1f9bd7ce77..bf7324a27d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-29 Jeffrey Stedfast <fejj@ximian.com>
+
+ Fixes bug #43805.
+
+ * mail-session.c (session_system_beep): Proxy the gdk_beep() call
+ to the main thread.
+ (session_play_sound): Proxy the gnome_sound_play() call to the
+ main thread.
+
2003-05-27 Not Zed <NotZed@Ximian.com>
* message-tag-editor.c (message_tag_editor_init): set the default
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 52bfba7497..081c6aa533 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -763,21 +763,47 @@ get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *e
return mail_tool_uri_to_folder (uri, 0, ex);
}
+
static void
-session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
+main_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
{
- if (!filename || !*filename)
- gdk_beep ();
- else
+ if (filename && *filename)
gnome_sound_play (filename);
+ else
+ gdk_beep ();
+
+ g_free (filename);
+ camel_object_unref (session);
}
static void
-session_system_beep (CamelFilterDriver *driver, gpointer user_data)
+session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
+{
+ MailSession *ms = (MailSession *) session;
+
+ camel_object_ref (session);
+
+ mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_play_sound,
+ driver, g_strdup (filename), user_data);
+}
+
+static void
+main_system_beep (CamelFilterDriver *driver, gpointer user_data)
{
gdk_beep ();
}
+static void
+session_system_beep (CamelFilterDriver *driver, gpointer user_data)
+{
+ MailSession *ms = (MailSession *) session;
+
+ camel_object_ref (session);
+
+ mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_system_beep,
+ driver, user_data, NULL);
+}
+
static CamelFilterDriver *
main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
{