aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2009-07-23 21:04:02 +0800
committerChenthill Palanisamy <pchenthill@novell.com>2009-07-23 21:25:25 +0800
commit606f6c15dbfbd7821a5aa92a81d64b318842fe7a (patch)
tree7db5234345e8d2c83dc38bdabd50962f0492a069 /mail
parent5d4e8994e83c9ab650981c332eaef57f4fab2788 (diff)
downloadgsoc2013-evolution-606f6c15dbfbd7821a5aa92a81d64b318842fe7a.tar.gz
gsoc2013-evolution-606f6c15dbfbd7821a5aa92a81d64b318842fe7a.tar.zst
gsoc2013-evolution-606f6c15dbfbd7821a5aa92a81d64b318842fe7a.zip
Bug #339361 (bnc) - soap threading not working.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-composer-utils.c25
-rw-r--r--mail/em-event.c7
-rw-r--r--mail/em-event.h7
-rw-r--r--mail/em-folder-view.c2
4 files changed, 25 insertions, 16 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 11f4272cf8..8b77c716a5 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -2336,18 +2336,7 @@ em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessag
g_return_val_if_fail(message != NULL, NULL);
- /** @Event: message.replying
- * @Title: Message being replied to
- * @Target: EMEventTargetMessage
- *
- * message.replying is emitted when a user starts replying to a message.
- */
-
- eme = em_event_peek();
- target = em_event_target_new_message(eme, folder, message, uid,
- mode == REPLY_MODE_ALL ? EM_EVENT_MESSAGE_REPLY_ALL : 0);
- e_event_emit((EEvent *)eme, "message.replying", (EEventTarget *)target);
-
+
to = camel_internet_address_new();
cc = camel_internet_address_new();
@@ -2385,6 +2374,18 @@ em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessag
composer_set_body (composer, message, source);
+ /** @Event: message.replying
+ * @Title: Message being replied to
+ * @Target: EMEventTargetMessage
+ *
+ * message.replying is emitted when a user starts replying to a message.
+ */
+
+ eme = em_event_peek();
+ target = em_event_target_new_message(eme, folder, message, uid,
+ mode == REPLY_MODE_ALL ? EM_EVENT_MESSAGE_REPLY_ALL | EM_EVENT_MESSAGE_REPLY : EM_EVENT_MESSAGE_REPLY, composer);
+ e_event_emit((EEvent *)eme, "message.replying", (EEventTarget *)target);
+
em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL);
composer_set_no_change (composer, TRUE, FALSE);
diff --git a/mail/em-event.c b/mail/em-event.c
index b1bf7a7d05..4e79c31d08 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -76,6 +76,8 @@ eme_target_free(EEvent *ep, EEventTarget *t)
if (s->message)
camel_object_unref(s->message);
g_free(s->uid);
+ if (s->composer)
+ g_object_unref (s->composer);
break; }
case EM_EVENT_TARGET_COMPOSER : {
EMEventTargetComposer *s = (EMEventTargetComposer *)t;
@@ -169,7 +171,7 @@ em_event_target_new_composer (EMEvent *eme, const EMsgComposer *composer, guint3
}
EMEventTargetMessage *
-em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags)
+em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags, EMsgComposer *composer)
{
EMEventTargetMessage *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_MESSAGE, sizeof(*t));
@@ -181,6 +183,8 @@ em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage
if (message)
camel_object_ref(message);
t->target.mask = ~flags;
+ if (composer)
+ t->composer = g_object_ref(G_OBJECT(composer));
return t;
}
@@ -233,6 +237,7 @@ static const EEventHookTargetMask emeh_composer_masks[] = {
static const EEventHookTargetMask emeh_message_masks[] = {
{ "replyall", EM_EVENT_MESSAGE_REPLY_ALL },
+ { "reply", EM_EVENT_MESSAGE_REPLY },
{ NULL }
};
diff --git a/mail/em-event.h b/mail/em-event.h
index e2235a122a..6b6a5cf675 100644
--- a/mail/em-event.h
+++ b/mail/em-event.h
@@ -57,7 +57,8 @@ enum {
/* Flags that describe TARGET_MESSAGE */
enum {
- EM_EVENT_MESSAGE_REPLY_ALL = 1<< 0
+ EM_EVENT_MESSAGE_REPLY_ALL = 1<< 0,
+ EM_EVENT_MESSAGE_REPLY = 1<< 1
};
/* Flags that describe TARGET_COMPOSER */
@@ -92,6 +93,7 @@ struct _EMEventTargetMessage {
CamelFolder *folder;
gchar *uid;
CamelMimeMessage *message;
+ EMsgComposer *composer;
};
typedef struct _EMEventTargetComposer EMEventTargetComposer;
@@ -150,7 +152,8 @@ EMEvent *em_event_peek(void);
EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const gchar *uri, guint32 flags);
EMEventTargetFolderBrowser *em_event_target_new_folder_browser (EMEvent *eme, EMFolderBrowser *emfb);
EMEventTargetComposer *em_event_target_new_composer(EMEvent *emp, const EMsgComposer *composer, guint32 flags);
-EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags);
+EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags,
+ EMsgComposer *composer);
EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags);
EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *uri, guint32 flags);
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index de87a10ed0..5923e6ef9c 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -2462,7 +2462,7 @@ emfv_list_done_message_selected(CamelFolder *folder, const gchar *uid, CamelMime
*/
/* TODO: do we emit a message.reading with no message when we're looking at nothing or don't care? */
eme = em_event_peek();
- target = em_event_target_new_message(eme, folder, msg, uid, 0);
+ target = em_event_target_new_message(eme, folder, msg, uid, 0, NULL);
e_event_emit((EEvent *)eme, "message.reading", (EEventTarget *)target);
em_format_format((EMFormat *)emfv->preview, folder, uid, msg);