[evolution-mapi] Bug #649442 - Meeting responses should contain type prefix in subject



commit 0e6bcef9b8aeff6f89cdc755bf2d5316e970b034
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 10 15:04:50 2011 +0200

    Bug #649442 - Meeting responses should contain type prefix in subject

 po/POTFILES.in                                |    1 +
 src/libexchangemapi/exchange-mapi-cal-utils.c |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a4d68fc..c7eac2b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,4 +10,5 @@ src/camel/camel-mapi-folder.c
 src/camel/camel-mapi-provider.c
 src/camel/camel-mapi-store.c
 src/camel/camel-mapi-transport.c
+src/libexchangemapi/exchange-mapi-cal-utils.c
 src/libexchangemapi/exchange-mapi-connection.c
diff --git a/src/libexchangemapi/exchange-mapi-cal-utils.c b/src/libexchangemapi/exchange-mapi-cal-utils.c
index 5d4cd31..4005c92 100644
--- a/src/libexchangemapi/exchange-mapi-cal-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-utils.c
@@ -26,6 +26,7 @@
 #endif
 
 #include <glib/gstdio.h>
+#include <glib/gi18n-lib.h>
 #include <fcntl.h>
 #include <libecal/e-cal-util.h>
 #include "exchange-mapi-cal-utils.h"
@@ -1810,15 +1811,36 @@ exchange_mapi_cal_utils_write_props_cb (ExchangeMapiConnection *conn, mapi_id_t
 
 			break;
 		case MEETING_RESPONSE :
+			#define prefix_subject(prefix) {					\
+				const gchar *summary;						\
+												\
+				summary = icalcomponent_get_summary (ical_comp);		\
+				if (!(summary && *summary))					\
+					summary = "";						\
+												\
+				summary = talloc_asprintf (mem_ctx, "%s %s", prefix, summary);	\
+												\
+				set_value (PR_SUBJECT_UNICODE, summary);			\
+				set_value (PR_NORMALIZED_SUBJECT_UNICODE, summary);		\
+				if (cbdata->appt_seq == 0)					\
+					set_value (PR_CONVERSATION_TOPIC_UNICODE, summary);	\
+			}
 			if (cbdata->resp == olResponseAccepted) {
+				/* Translators: This is a meeting response prefix which will be shown in a message Subject */
+				prefix_subject (C_("MeetingResp", "Accepted:"));
 				text = IPM_SCHEDULE_MEETING_RESP_POS;
 			} else if (cbdata->resp == olResponseTentative) {
+				/* Translators: This is a meeting response prefix which will be shown in a message Subject */
+				prefix_subject (C_("MeetingResp", "Tentative:"));
 				text = IPM_SCHEDULE_MEETING_RESP_TENT;
 			} else if (cbdata->resp == olResponseDeclined) {
+				/* Translators: This is a meeting response prefix which will be shown in a message Subject */
+				prefix_subject (C_("MeetingResp", "Declined:"));
 				text = IPM_SCHEDULE_MEETING_RESP_NEG;
 			} else {
 				text = "";
 			}
+			#undef prefix_subject
 			set_value (PR_MESSAGE_CLASS, text);
 			text = NULL;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]