diff options
author | Dan Winship <danw@src.gnome.org> | 2000-04-23 02:07:14 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-04-23 02:07:14 +0800 |
commit | f5ec554c152ece6b2cac94f030760df4b53bb1c7 (patch) | |
tree | a4e616dba27372dadf0bdc2bcbe067161885d9f4 /mail/folder-browser-factory.c | |
parent | ee7f36f84b8f45356fae240c13dd68b0e8aee8d5 (diff) | |
download | gsoc2013-evolution-f5ec554c152ece6b2cac94f030760df4b53bb1c7.tar.gz gsoc2013-evolution-f5ec554c152ece6b2cac94f030760df4b53bb1c7.tar.zst gsoc2013-evolution-f5ec554c152ece6b2cac94f030760df4b53bb1c7.zip |
move msg_composer_cb and msg_composer_send_cb to mail-ops. Attach send,
* folder-browser-factory.c: move msg_composer_cb and
msg_composer_send_cb to mail-ops. Attach send, reply, and "reply
to all" buttons.
* mail-ops.c (composer_send_cb, send): moved from
folder-browser-factory.c.
(reply_to_sender, reply_to_all): new functions to do replies.
* mail-format.c (text_to_html): Add an "add_pre" flag, to make
it wrap the output in <pre></pre>.
(mail_generate_reply): New function to create a composer and build
a reply in it.
svn path=/trunk/; revision=2554
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r-- | mail/folder-browser-factory.c | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index db828514c7..e86fddd9e9 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -100,41 +100,6 @@ development_warning () } static void -msg_composer_send_cb (EMsgComposer *composer, - gpointer data) -{ - CamelMimeMessage *message; - CamelStream *stream; - gint stdout_dup; - - message = e_msg_composer_get_message (composer); - - stdout_dup = dup (1); - stream = camel_stream_fs_new_with_fd (stdout_dup); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), - stream); - camel_stream_close (stream); - - gtk_object_unref (GTK_OBJECT (message)); - -#if 0 - gtk_widget_destroy (GTK_WIDGET (composer)); - gtk_main_quit (); -#endif -} - - -static void -msg_composer_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GtkWidget *composer; - - composer = e_msg_composer_new (); - gtk_signal_connect (GTK_OBJECT (composer), "send", GTK_SIGNAL_FUNC (msg_composer_send_cb), NULL); - gtk_widget_show (composer); -} - -static void random_cb (GtkWidget *button, gpointer user_data) { printf ("Yow! I am called back!\n"); @@ -142,13 +107,13 @@ random_cb (GtkWidget *button, gpointer user_data) static GnomeUIInfo gnome_toolbar [] = { GNOMEUIINFO_ITEM_STOCK (N_("New mail"), N_("Check for new mail"), fetch_mail, GNOME_STOCK_PIXMAP_MAIL_RCV), - GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send a new message"), random_cb, GNOME_STOCK_PIXMAP_MAIL_SND), + GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send a new message"), send, GNOME_STOCK_PIXMAP_MAIL_SND), GNOMEUIINFO_ITEM_STOCK (N_("Find"), N_("Find messages"), random_cb, GNOME_STOCK_PIXMAP_SEARCH), GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_ITEM_STOCK (N_("Reply"), N_("Reply to the sender of this message"), random_cb, GNOME_STOCK_PIXMAP_SEARCH), - GNOMEUIINFO_ITEM_STOCK (N_("Reply to All"), N_("Reply to all recipients of this message"), random_cb, GNOME_STOCK_PIXMAP_MAIL_RPL), + GNOMEUIINFO_ITEM_STOCK (N_("Reply"), N_("Reply to the sender of this message"), reply_to_sender, GNOME_STOCK_PIXMAP_MAIL_RPL), + GNOMEUIINFO_ITEM_STOCK (N_("Reply to All"), N_("Reply to all recipients of this message"), reply_to_all, GNOME_STOCK_PIXMAP_MAIL_RPL), GNOMEUIINFO_ITEM_STOCK (N_("Forward"), N_("Forward this message"), random_cb, GNOME_STOCK_PIXMAP_MAIL_FWD), @@ -174,7 +139,7 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih) bonobo_ui_handler_menu_new_item (uih, "/File/Mail", N_("_Mail"), NULL, -1, BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, msg_composer_cb, NULL); + 0, 0, send, NULL); folder_browser = bonobo_control_get_widget (control); |