diff options
author | Dan Winship <danw@src.gnome.org> | 2000-06-17 07:50:29 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-06-17 07:50:29 +0800 |
commit | 78c8bb85778d35a4214ba6626829d180e12af9de (patch) | |
tree | 7c1ef146587d8b1d828f598eeb900a7e2be92792 /mail | |
parent | 9c21067261d2af663d762c7f655eea1a7573f1e9 (diff) | |
download | gsoc2013-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')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/message-list.c | 39 | ||||
-rw-r--r-- | mail/message-list.h | 6 |
3 files changed, 43 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index fbd959274f..a78169097e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,12 +1,20 @@ 2000-06-16 Dan Winship <danw@helixcode.com> + * 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. + +2000-06-16 Dan Winship <danw@helixcode.com> + * message-list.c (get_message_row): new function to do a uid to row mapping. (mark_msg_seen, select_msg, message_changed, message_list_set_folder): Update for Camel flag changes. (on_cursor_change_cmd): Rename "row_to_select" to "selected_row", and keep a "selected_uid" as well. - + * mail-ops.c (composer_send_cb): Update for Camel flag changes, and fix some memory-handling bugs. (Free the post_send_data when the composer is destroyed, not when the user clicks "send", which 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); diff --git a/mail/message-list.h b/mail/message-list.h index f40263407d..d3be0c14bc 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -76,9 +76,9 @@ struct _MessageList { int selected_row; const char *selected_uid; - /* used by the idle-call to select a row */ - guint idle_id; -} ; + /* row-selection and seen-marking timers */ + guint idle_id, seen_id; +}; typedef struct { BonoboObjectClass parent_class; |