evolution r36445 - in trunk: mail plugins/itip-formatter



Author: mcrha
Date: Wed Sep 24 11:56:11 2008
New Revision: 36445
URL: http://svn.gnome.org/viewvc/evolution?rev=36445&view=rev

Log:
2008-09-24  Milan Crha  <mcrha redhat com>

	** Fix for bug #313225

	* mail/message-list.c: (struct states_pixmaps), (ml_tree_value_at),
	(message_list_create_extras): Show meeting icon in 'Attachment'
	column on messages with '$has_cal' user flag set.

	* plugins/itip-formatter/itip-formatter.c: (format_itip): Set the user flag '$has_cal'
	on the message when formatting a calendar attachment.



Modified:
   trunk/mail/ChangeLog
   trunk/mail/message-list.c
   trunk/plugins/itip-formatter/ChangeLog
   trunk/plugins/itip-formatter/itip-formatter.c

Modified: trunk/mail/message-list.c
==============================================================================
--- trunk/mail/message-list.c	(original)
+++ trunk/mail/message-list.c	Wed Sep 24 11:56:11 2008
@@ -236,6 +236,7 @@
 	{ "stock_score-highest",               NULL },
 	{ "stock_mail-flag-for-followup",      NULL },
 	{ "stock_mail-flag-for-followup-done", NULL },
+	{ "stock_new-meeting",                 NULL }
 };
 
 /* FIXME: junk prefs */
@@ -1341,6 +1342,8 @@
 		str = camel_message_info_user_tag(msg_info, "follow-up");
 		return (void *)(str ? str : "");
 	case COL_ATTACHMENT:
+		if (camel_message_info_user_flag (msg_info, "$has_cal"))
+			return GINT_TO_POINTER (2);
 		return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_ATTACHMENTS) != 0);
 	case COL_FROM:
 		str = camel_message_info_from (msg_info);
@@ -1735,8 +1738,9 @@
 
 	for (i = 0; i < 2; i++)
 		images [i] = states_pixmaps [i + 6].pixbuf;
+	images [2] = states_pixmaps [18].pixbuf;
 
-	e_table_extras_add_cell (extras, "render_attachment", e_cell_toggle_new (0, 2, images));
+	e_table_extras_add_cell (extras, "render_attachment", e_cell_toggle_new (0, 3, images));
 
 	images [1] = states_pixmaps [8].pixbuf;
 	e_table_extras_add_cell (extras, "render_flagged", e_cell_toggle_new (0, 2, images));

Modified: trunk/plugins/itip-formatter/itip-formatter.c
==============================================================================
--- trunk/plugins/itip-formatter/itip-formatter.c	(original)
+++ trunk/plugins/itip-formatter/itip-formatter.c	Wed Sep 24 11:56:11 2008
@@ -2243,6 +2243,11 @@
 
 	classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str);
 
+	/* mark message as containing calendar, thus it will show the icon in message list now on */
+	if (target->format->uid && target->format->folder &&
+	    !camel_folder_get_message_user_flag (target->format->folder, target->format->uid, "$has_cal"))
+		camel_folder_set_message_user_flag (target->format->folder, target->format->uid, "$has_cal", TRUE);
+
 	puri = (struct _itip_puri *)em_format_add_puri(target->format, sizeof(struct _itip_puri), classid, target->part, itip_attachment_frame);
 
 	pobj = em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object);



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