aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-17 07:50:29 +0800
committerDan Winship <danw@src.gnome.org>2000-06-17 07:50:29 +0800
commit78c8bb85778d35a4214ba6626829d180e12af9de (patch)
tree7c1ef146587d8b1d828f598eeb900a7e2be92792 /mail/message-list.c
parent9c21067261d2af663d762c7f655eea1a7573f1e9 (diff)
downloadgsoc2013-evolution-78c8bb85778d35a4214ba6626829d180e12af9de.tar.gz
gsoc2013-evolution-78c8bb85778d35a4214ba6626829d180e12af9de.tar.zst
gsoc2013-evolution-78c8bb85778d35a4214ba6626829d180e12af9de.zip
Implement clicking on the envelope icon to set read/unread. Based on a
* message-list.c (ml_set_value_at): Implement clicking on the envelope icon to set read/unread. Based on a patch by clahey. (select_msg): keep the timeout id for the "seen" flagging in the message_list structure, so ml_set_value_at can clear it so it doesn't re-mark a message seen after you click it unseen. svn path=/trunk/; revision=3601
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c39
1 files changed, 31 insertions, 8 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 5032e7c6af..9b6de53d82 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -158,16 +158,15 @@ select_msg (MessageList *message_list, gint row)
}
if (message) {
- static guint timeout;
-
- if (timeout)
- gtk_timeout_remove (timeout);
+ if (message_list->seen_id)
+ gtk_timeout_remove (message_list->seen_id);
mail_display_set_message (message_list->parent_folder_browser->mail_display,
CAMEL_MEDIUM (message));
gtk_object_unref (GTK_OBJECT (message));
- timeout = gtk_timeout_add (1500, mark_msg_seen, message_list);
+ message_list->seen_id =
+ gtk_timeout_add (1500, mark_msg_seen, message_list);
}
}
@@ -314,12 +313,38 @@ ml_value_at (ETableModel *etm, int col, int row, void *data)
static void
ml_set_value_at (ETableModel *etm, int col, int row, const void *value, void *data)
{
+ MessageList *message_list = data;
+ CamelMessageInfo *msg_info;
+
+ switch (col) {
+ case COL_MESSAGE_STATUS:
+ msg_info = get_message_info (message_list, row);
+ camel_folder_set_message_flags (message_list->folder,
+ msg_info->uid,
+ CAMEL_MESSAGE_SEEN,
+ ~(msg_info->flags), NULL);
+ if (message_list->seen_id) {
+ gtk_timeout_remove (message_list->seen_id);
+ message_list->seen_id = 0;
+ }
+ break;
+ default:
+ break;
+ }
+
}
static gboolean
ml_is_cell_editable (ETableModel *etm, int col, int row, void *data)
{
- return FALSE;
+ switch (col) {
+ case COL_MESSAGE_STATUS:
+ return TRUE;
+ break;
+ default:
+ return FALSE;
+ break;
+ }
}
static void *
@@ -865,8 +890,6 @@ message_list_set_search (MessageList *message_list, const char *search)
static void
folder_changed(CamelFolder *f, int type, MessageList *message_list)
{
- int row;
-
if (message_list->summary_table)
camel_folder_free_summary(f, message_list->summary_table);
message_list->summary_table = camel_folder_get_summary (f, NULL);