From: José Dapena Paz Date: Wed, 27 Jan 2010 08:57:41 +0000 (+0100) Subject: API for reply calendar doesn't need now the msg, as the method internally X-Git-Tag: 3.2.11-1~1 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=d0cf020c70a28d62f1eee1d30722ee71a77ee4a1 API for reply calendar doesn't need now the msg, as the method internally can get the original msg. --- diff --git a/src/modest-plugin-ui-actions.h b/src/modest-plugin-ui-actions.h index d5b208a..01fc21b 100644 --- a/src/modest-plugin-ui-actions.h +++ b/src/modest-plugin-ui-actions.h @@ -68,14 +68,16 @@ modest_ui_actions_on_reload_message (const gchar *msg_id); /** * modest_ui_actions_reply_calendar: * @win: parent #ModestWindow - * @msg: original #TnyMsg * @header_pairs: #TnyList of #TnyPair of header pairs * * this method opens the mail composer with a reply of a message with calendar * allowing to add @header_pairs with the result of the calendar request. + * + * @win should be a #ModestMsgViewWindow. We don't put the exact type to avoid + * exporting to plugins #ModestMsgViewWindow API */ void -modest_ui_actions_reply_calendar (ModestWindow *win, TnyMsg *msg, TnyList *header_pairs); +modest_ui_actions_reply_calendar (ModestWindow *win, TnyList *header_pairs); G_END_DECLS diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 3b2ab68..08af12c 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -2222,7 +2222,7 @@ reply_forward (ReplyForwardAction action, ModestWindow *win) } void -modest_ui_actions_reply_calendar (ModestWindow *win, TnyMsg *msg, TnyList *header_pairs) +modest_ui_actions_reply_calendar (ModestWindow *win, TnyList *header_pairs) { gchar *from; gchar *recipient; @@ -2235,6 +2235,7 @@ modest_ui_actions_reply_calendar (ModestWindow *win, TnyMsg *msg, TnyList *heade const gchar *mailbox; TnyHeader *msg_header; ModestWindowMgr *mgr; + TnyMsg *msg; g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW(win)); @@ -2253,6 +2254,9 @@ modest_ui_actions_reply_calendar (ModestWindow *win, TnyMsg *msg, TnyList *heade &use_signature); g_free (recipient); + msg = modest_msg_view_window_get_message(MODEST_MSG_VIEW_WINDOW(win)); + g_return_if_fail(msg); + msg_header = tny_msg_get_header (msg); new_msg = modest_tny_msg_create_reply_calendar_msg (msg, msg_header, from,