[anjal] 2009-03-19 Srinivasa Ragavan <sragavan novell com>



commit a9f6f462ffdd332752b165e35011a855246ae421
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Thu Mar 19 13:54:44 2009 +0530

    2009-03-19 Srinivasa Ragavan <sragavan novell com>
    
    	** src/mail-message-view.c: Mark mail as unread, as you scroll through
    	the message. Not all messages are marked unread, when the conversation
    	is opened.
---
 ChangeLog               |    6 ++++++
 src/mail-message-view.c |   14 +++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9e17511..619fc08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-19 Srinivasa Ragavan <sragavan novell com>
+
+	** src/mail-message-view.c: Mark mail as unread, as you scroll through
+	the message. Not all messages are marked unread, when the conversation
+	is opened.
+
 2009-03-19 Priit Laes <plaes plaes org>
 	
 	** src/mail-conv-view.c: Make Shift UP/Down to scroll in steps in
diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index 6f69d1f..01d232a 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -41,7 +41,7 @@ struct  _MailMessageViewPrivate {
 	GtkWidget *arrow;
 	GtkWidget *focus;
 	CamelMimeMessage *msg;
-	 CamelMessageInfo *info;
+	CamelMessageInfoBase *info;
 	GtkWidget *header_row;
 	const char *active_color;
 	GtkWidget *spinner;
@@ -303,12 +303,20 @@ filter_date (time_t date)
 	return g_strdup (buf);
 }
 
+static void
+mmv_set_flags (MailMessageView *mmv, guint32 mask, guint32 set)
+{
+	 camel_message_info_set_flags(mmv->priv->info, mask, set);
+}
+
 static int
 mark_mail_read  (GtkWidget *w, GdkEventExpose *event, MailMessageView *mmv)
 {
-	 printf("mark %s as read: %s\n", camel_message_info_subject(mmv->priv->info),mmv->priv->info->uid );
+	 if ((mmv->priv->info->flags & CAMEL_MESSAGE_SEEN) == 0)
+		  mmv_set_flags (mmv, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+	 
 	 g_signal_handlers_disconnect_by_func(w, mark_mail_read, mmv);
-	return FALSE;
+	 return FALSE;
 }
 
 static void



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