[evolution-patches] xlib async reply fix



forget the bug #, maybe toshok knows

Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
? xlib-async-reply.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2738
diff -u -r1.2738 ChangeLog
--- ChangeLog	27 May 2003 23:39:43 -0000	1.2738
+++ ChangeLog	30 May 2003 01:58:25 -0000
@@ -1,3 +1,10 @@
+2003-05-29  Jeffrey Stedfast  <fejj ximian com>
+
+	* 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
Index: mail-session.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-session.c,v
retrieving revision 1.67
diff -u -r1.67 mail-session.c
--- mail-session.c	16 May 2003 18:52:14 -0000	1.67
+++ mail-session.c	30 May 2003 01:58:26 -0000
@@ -763,19 +763,45 @@
 	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 *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]