aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-05 12:54:42 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-05 12:54:42 +0800
commit19e2fea988754f3f4f43667e30463bd7fd4e18cc (patch)
tree46b9ff2b9b97ad4975283906f1c3033fe03bfe61 /mail
parente6167ecdd056fb748d2132480378acbdee7de4a9 (diff)
downloadgsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.tar
gsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.tar.gz
gsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.tar.bz2
gsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.tar.lz
gsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.tar.xz
gsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.tar.zst
gsoc2013-evolution-19e2fea988754f3f4f43667e30463bd7fd4e18cc.zip
handle the "reply" parameter, if set.
2005-01-05 Not Zed <NotZed@Ximian.com> * mail-component.c (handleuri_got_folder): handle the "reply" parameter, if set. * em-composer-utils.c (em_utils_reply_to_message): only ref the source if supplied. (reply_to_message): only unref the source if supplied. svn path=/trunk/; revision=28241
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-composer-utils.c6
-rw-r--r--mail/mail-component.c29
3 files changed, 35 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8c17fb9cec..7db637dfd2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-05 Not Zed <NotZed@Ximian.com>
+
+ * mail-component.c (handleuri_got_folder): handle the "reply"
+ parameter, if set.
+
+ * em-composer-utils.c (em_utils_reply_to_message): only ref the
+ source if supplied.
+ (reply_to_message): only unref the source if supplied.
+
2004-12-28 Mengjie Yu <meng-jie.yu@sun.com>
* em-folder-tree.c: (em_folder_tree_new_with_model):
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 691354af97..5653107082 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1717,7 +1717,8 @@ reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message
if (message != NULL)
em_utils_reply_to_message(folder, uid, message, rd->mode, rd->source);
- g_object_unref(rd->source);
+ if (rd->source)
+ g_object_unref(rd->source);
g_free(rd);
}
@@ -1754,7 +1755,8 @@ em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage
rd->mode = mode;
rd->source = source;
- g_object_ref(rd->source);
+ if (rd->source)
+ g_object_ref(rd->source);
mail_get_message(folder, uid, reply_to_message, rd, mail_thread_new);
return;
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 44d6b5fa55..7608fe4f84 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -768,13 +768,28 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
EMMessageBrowser *emmb;
if (folder != NULL) {
- emmb = (EMMessageBrowser *)em_message_browser_window_new();
- /*message_list_set_threaded(((EMFolderView *)emmb)->list, emfv->list->threaded);*/
- /* FIXME: session needs to be passed easier than this */
- em_format_set_session((EMFormat *)((EMFolderView *)emmb)->preview, session);
- em_folder_view_set_folder((EMFolderView *)emmb, folder, uri);
- em_folder_view_set_message((EMFolderView *)emmb, camel_url_get_param(url, "uid"), FALSE);
- gtk_widget_show(emmb->window);
+ const char *reply = camel_url_get_param(url, "reply");
+
+ if (reply) {
+ int mode;
+
+ if (!strcmp(reply, "all"))
+ mode = REPLY_MODE_ALL;
+ else if (!strcmp(reply, "list"))
+ mode = REPLY_MODE_LIST;
+ else /* if "sender" or anything else */
+ mode = REPLY_MODE_SENDER;
+
+ em_utils_reply_to_message(folder, camel_url_get_param(url, "uid"), NULL, mode, NULL);
+ } else {
+ emmb = (EMMessageBrowser *)em_message_browser_window_new();
+ /*message_list_set_threaded(((EMFolderView *)emmb)->list, emfv->list->threaded);*/
+ /* FIXME: session needs to be passed easier than this */
+ em_format_set_session((EMFormat *)((EMFolderView *)emmb)->preview, session);
+ em_folder_view_set_folder((EMFolderView *)emmb, folder, uri);
+ em_folder_view_set_message((EMFolderView *)emmb, camel_url_get_param(url, "uid"), FALSE);
+ gtk_widget_show(emmb->window);
+ }
} else {
g_warning("Couldn't open folder '%s'", uri);
}