aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2000-05-02 11:33:55 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-02 11:33:55 +0800
commit56f4dd919f5ab860dfafe79ce6db3a9567de254f (patch)
tree2b5f089d95128a27f424aa3100762069c74882b5 /mail/message-list.c
parente3215000495de098a56e76be3c71eca7db4bd61d (diff)
downloadgsoc2013-evolution-56f4dd919f5ab860dfafe79ce6db3a9567de254f.tar.gz
gsoc2013-evolution-56f4dd919f5ab860dfafe79ce6db3a9567de254f.tar.zst
gsoc2013-evolution-56f4dd919f5ab860dfafe79ce6db3a9567de254f.zip
Added a deleted message icon whcih shows when messages are
deleted (takes a while to update the gui for some reason). Updates the gui when expunged, via a signal. * pixmaps.h: Added envelope-deleted state. (message_list_init_renderers): Added a 3rd state to message_status = deleted. (ml_value_at): Show the message state as deleted, if it is marked for deletion. (folder_changed): When the folder changes, update the display. (message_list_set_folder): Connect to the folder_changed event here. (message_changed): Callback to update the display when the message changes. (select_msg): And connect to the message_changed signal so we know when it cahgnes. svn path=/trunk/; revision=2746
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index d1a87201f8..9a535975dd 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -80,6 +80,12 @@ CamelMessageInfo *get_message_info(MessageList *message_list, gint row)
return info;
}
+static void
+message_changed(CamelMimeMessage *m, enum _MessageChangeType type, MessageList *message_list)
+{
+ e_table_model_changed (message_list->table_model);
+}
+
/* select a message and display it */
static void
select_msg (MessageList *message_list, gint row)
@@ -104,9 +110,11 @@ select_msg (MessageList *message_list, gint row)
}
}
- if (message)
+ if (message) {
+ gtk_signal_connect((GtkObject *)message, "message_changed", message_changed, message_list);
mail_display_set_message (message_list->parent_folder_browser->mail_display,
CAMEL_MEDIUM (message));
+ }
}
}
@@ -183,7 +191,10 @@ ml_value_at (ETableModel *etm, int col, int row, void *data)
break;
case COL_MESSAGE_STATUS:
- retval = GINT_TO_POINTER (1);
+ if (msg_info->flags & CAMEL_MESSAGE_DELETED)
+ retval = GINT_TO_POINTER (2);
+ else
+ retval = GINT_TO_POINTER (1);
break;
case COL_PRIORITY:
@@ -321,6 +332,7 @@ static struct {
{ attachment_header_xpm, NULL },
{ online_status_xpm, NULL },
{ message_status_xpm, NULL },
+ { envelope_deleted_xpm, NULL },
{ NULL, NULL },
};
@@ -357,12 +369,13 @@ message_list_init_renderers (MessageList *message_list)
* Message status
*/
{
- GdkPixbuf *images [2];
+ GdkPixbuf *images [3];
images [0] = states_pixmaps [0].pixbuf;
images [1] = states_pixmaps [1].pixbuf;
+ images [2] = states_pixmaps [7].pixbuf;
- message_list->render_message_status = e_cell_toggle_new (0, 2, images);
+ message_list->render_message_status = e_cell_toggle_new (0, 3, images);
}
/*
@@ -688,6 +701,13 @@ message_list_set_search (MessageList *message_list, const char *search)
select_msg (message_list, 0);
}
+static void
+folder_changed(CamelFolder *f, int type, MessageList *message_list)
+{
+ e_table_model_changed (message_list->table_model);
+ select_msg (message_list, 0);
+}
+
void
message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder)
{
@@ -736,14 +756,15 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder)
}
-
camel_folder_open (camel_folder, FOLDER_OPEN_RW, &ex);
if (camel_exception_get_id (&ex)) {
printf ("Unable to open folder: %s\n",
ex.desc?ex.desc:"unknown_reason");
return;
}
-
+
+ gtk_signal_connect((GtkObject *)camel_folder, "folder_changed", folder_changed, message_list);
+
gtk_object_ref (GTK_OBJECT (camel_folder));
e_table_model_changed (message_list->table_model);