aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-09-18 05:19:04 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-09-18 05:19:04 +0800
commit81a0ff5bc44a3bd11399e6b3c985735737606c8c (patch)
tree54b5ed4342a6843c1db4c7e75f2e1b1fe9b82dff /mail/mail-mt.c
parenta36a1bb70b6ebcb51ac39304370c89bda63e11b9 (diff)
downloadgsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar
gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.gz
gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.bz2
gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.lz
gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.xz
gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.zst
gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.zip
cvs removed.
2003-09-17 Not Zed <NotZed@Ximian.com> * folder-browser.c, folder-browser.h, folder-browser-ui.c folder-browser-ui.h, mail-callbacks.c, mail-callbacks.h mail-display.c, mail-display.h, mail-display-stream.c mail-display-stream.h, mail-format.c, mail-format.h mail-identify.c, mail-search.c, mail-search.h message-browser.c, message-browser.h, subscribe-dialog.c subscribe-dialog.h, mail-font-prefs.c, mail-font-prefs.h: cvs removed. * Makefile.am: Removed mail-font-prefs.[ch], hasn't been built for ages. * em-*.c: killed a bunch of printfs. * em-format-html-display.c (efhd_html_button_press_event): update for html object api chagnes. ** Merge in mail-refactor-2 branch. svn path=/trunk/; revision=22602
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 0cef1f2b30..66b8d68130 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -529,21 +529,28 @@ void mail_msg_cleanup(void)
e_msgport_destroy(mail_gui_reply_port);
}
-void mail_msg_init(void)
+static guint
+em_channel_setup(EMsgPort **port, GIOChannel **channel, GIOFunc func)
{
- mail_gui_reply_port = e_msgport_new();
- mail_gui_reply_channel = g_io_channel_unix_new(e_msgport_fd(mail_gui_reply_port));
- g_io_add_watch(mail_gui_reply_channel, G_IO_IN, mail_msgport_replied, mail_gui_reply_port);
+ GSource *source;
+ guint id;
- mail_gui_port = e_msgport_new();
- mail_gui_channel = g_io_channel_unix_new(e_msgport_fd(mail_gui_port));
- mail_gui_watch = g_io_add_watch(mail_gui_channel, G_IO_IN, mail_msgport_received, mail_gui_port);
+ *port = e_msgport_new();
+ *channel = g_io_channel_unix_new(e_msgport_fd(*port));
+ source = g_io_create_watch(*channel, G_IO_IN);
+ g_source_set_callback(source, (GSourceFunc)func, *port, NULL);
+ g_source_set_can_recurse(source, FALSE);
+ id = g_source_attach(source, NULL);
+ g_source_unref(source);
- /* experimental temporary */
- mail_gui_port2 = e_msgport_new();
- mail_gui_channel2 = g_io_channel_unix_new(e_msgport_fd(mail_gui_port2));
- mail_gui_watch2 = g_io_add_watch(mail_gui_channel2, G_IO_IN, mail_msgport_received2, mail_gui_port2);
+ return id;
+}
+void mail_msg_init(void)
+{
+ em_channel_setup(&mail_gui_reply_port, &mail_gui_reply_channel, mail_msgport_replied);
+ mail_gui_watch = em_channel_setup(&mail_gui_port, &mail_gui_channel, mail_msgport_received);
+ mail_gui_watch2 = em_channel_setup(&mail_gui_port2, &mail_gui_channel2, mail_msgport_received2);
mail_thread_queued = e_thread_new(E_THREAD_QUEUE);
e_thread_set_msg_destroy(mail_thread_queued, mail_msg_destroy, 0);