aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-12-10 11:50:36 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-12-10 11:50:36 +0800
commitb5e7713c8e99f2cddf309d3034108c18190fd3cb (patch)
treeb6b22ff8bdbb379e0e4e939c09df54a8dd52c447
parent098db6b2ad41196ee43d68e7f4f7d879d97d93b7 (diff)
downloadgsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.gz
gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.zst
gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.zip
Implements marking messages as "Need Reply".
Implements marking messages as "Need Reply". 2001-12-09 Jon Trowbridge <trow@ximian.com> * mail-need-reply.xpm: Added a really, really ugly and awful icon to symbolize "message needs a reply". * Makefile.am (EXTRA_DIST): Added mail-need-reply.xpm. 2001-12-09 Jon Trowbridge <trow@ximian.com> * camel-folder-summary.c: Add "NeedsReply" to the flag_names array for CAMEL_MESSAGE_NEEDS_REPLY. * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag. 2001-12-09 Jon Trowbridge <trow@ximian.com> * vfoldertypes.xml: Add "Needs Reply" option to different status types. * filtertypes.xml: Add "Needs Reply" option to different status types. 2001-12-09 Jon Trowbridge <trow@ximian.com> * message-list.c: #include "art/mail-need-reply.xpm". (ml_tree_value_at): Adjust magic numbers, show "Need Reply" icon if the message needs reply. (message_list_create_extras): Adjust magic numbers to add new icon. (on_click): Changed to toggle between unread, read, and need reply when the status icon is clicked. * mail-callbacks.c (mark_as_needing_reply): Added. (mark_as_not_needing_reply): Added. Add "set" value to struct post_send_data. (composer_sent_cb): Use both "flags" and "set" elements of post_send_data when setting message flags. (mail_reply): Clear "Needs Reply" flag when we actually reply to a message. * folder-browser.c: Changed flag values to be given by bit-shifting (1<<5) vs. base-ten (32). Added CAN_MARK_DOESNT_NEED_REPLY flag. Added "Mark as Needing Reply" and "Mark as Not Needing Reply" elements to context menu. (on_right_click): Hide "Mark as (Not) Needing Reply" context menu elements as appropriate. svn path=/trunk/; revision=14946
-rw-r--r--art/ChangeLog7
-rw-r--r--art/Makefile.am1
-rw-r--r--art/mail-need-reply.xpm71
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/Makefile.am4
-rw-r--r--camel/camel-folder-summary.c1
-rw-r--r--camel/camel-folder-summary.h1
-rw-r--r--filter/filtertypes.xml3
-rw-r--r--filter/vfoldertypes.xml3
-rw-r--r--mail/ChangeLog25
-rw-r--r--mail/folder-browser.c41
-rw-r--r--mail/mail-callbacks.c28
-rw-r--r--mail/mail-callbacks.h28
-rw-r--r--mail/message-list.c70
14 files changed, 239 insertions, 51 deletions
diff --git a/art/ChangeLog b/art/ChangeLog
index c291218cfa..3292315f2a 100644
--- a/art/ChangeLog
+++ b/art/ChangeLog
@@ -1,3 +1,10 @@
+2001-12-09 Jon Trowbridge <trow@ximian.com>
+
+ * mail-need-reply.xpm: Added a really, really ugly and
+ awful icon to symbolize "message needs a reply".
+
+ * Makefile.am (EXTRA_DIST): Added mail-need-reply.xpm.
+
2001-11-06 Ettore Perazzoli <ettore@ximian.com>
* evolution.png: New, updated icon from Tuomas.
diff --git a/art/Makefile.am b/art/Makefile.am
index 407c30db60..334318a4af 100644
--- a/art/Makefile.am
+++ b/art/Makefile.am
@@ -202,6 +202,7 @@ EXTRA_DIST = \
check-filled.xpm \
empty.xpm \
jump.xpm \
+ mail-need-reply.xpm \
mail-new.xpm \
mail-read.xpm \
mail-replied.xpm \
diff --git a/art/mail-need-reply.xpm b/art/mail-need-reply.xpm
new file mode 100644
index 0000000000..df66036173
--- /dev/null
+++ b/art/mail-need-reply.xpm
@@ -0,0 +1,71 @@
+/* XPM */
+static char * mail_need_reply_xpm[] = {
+"16 16 52 1",
+" c None",
+". c #010101",
+"+ c #D9D6D0",
+"@ c #C3C0B9",
+"# c #DDBFB9",
+"$ c #E5908C",
+"% c #F49F9C",
+"& c #F8C1C1",
+"* c #FAFAFA",
+"= c #B6B4AE",
+"- c #737373",
+"; c #C2BFB8",
+"> c #D6817C",
+", c #FF0505",
+"' c #FF5858",
+") c #D2CFC9",
+"! c #707070",
+"~ c #FFFFFF",
+"{ c #5D5B57",
+"] c #FFABAB",
+"^ c #FF7474",
+"/ c #868580",
+"( c #E5E2DB",
+"_ c #FBFBF8",
+": c #A04B49",
+"< c #FF2121",
+"[ c #ED0F0E",
+"} c #F8F7F2",
+"| c #DDDAD4",
+"1 c #FCA9A7",
+"2 c #FBDFDD",
+"3 c #F7F5F1",
+"4 c #FCA8A6",
+"5 c #FE2020",
+"6 c #FC716F",
+"7 c #F0EEE8",
+"8 c #DDD9D2",
+"9 c #FBFAF7",
+"0 c #A5514E",
+"a c #E3E0D9",
+"b c #7D7A77",
+"c c #F8F6F2",
+"d c #FADDDA",
+"e c #B1413F",
+"f c #E2DFD8",
+"g c #090808",
+"h c #D7D4CE",
+"i c #D8D5CF",
+"j c #D6D3CD",
+"k c #DAD7D1",
+"l c #E0DCD5",
+"m c #222221",
+" ..... ",
+" .+++++. ",
+" .++++++@. ",
+" .+#$$$%&*=. ",
+" .-;>,,,,,')!. ",
+" .~{],,]^,,/(. ",
+" .~_:,,'<,[}|. ",
+" .~_1,,,,,23|. ",
+" .~_4,,25,678. ",
+" .~90,,_6,,a8. ",
+" .~b1,,cd,,ef. ",
+" .ghiiij++klm. ",
+" ........... ",
+" ",
+" ",
+" "};
diff --git a/camel/ChangeLog b/camel/ChangeLog
index f0900610d3..cc32f5b29c 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2001-12-09 Jon Trowbridge <trow@ximian.com>
+
+ * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
+ for CAMEL_MESSAGE_NEEDS_REPLY.
+
+ * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
+
2001-11-29 Jeffrey Stedfast <fejj@ximian.com>
* camel-folder-search.c (search_body_contains): Don't use regex
diff --git a/camel/Makefile.am b/camel/Makefile.am
index 0fad241d6a..1ea31d5add 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -18,7 +18,6 @@ INCLUDES = -I.. -I$(srcdir)/.. \
$(KRB4_CFLAGS) \
$(NSPR_CFLAGS) \
$(NSS_CFLAGS) \
- $(OPENSSL_CFLAGS) \
-DCAMEL_SBINDIR=\""$(sbindir)"\" \
-DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
-DG_LOG_DOMAIN=\"camel\"
@@ -201,8 +200,7 @@ libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la \
$(CAMEL_LIBS) \
$(KRB4_LDFLAGS) \
$(NSPR_LDFLAGS) \
- $(NSS_LDFLAGS) \
- $(OPENSSL_LDFLAGS)
+ $(NSS_LDFLAGS)
libcamel_static_la_SOURCES = $(libcamel_la_SOURCES)
libcamel_static_la_LIBADD = $(libcamel_la_LIBADD)
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 2591e868ab..9a97a0bb59 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -2348,6 +2348,7 @@ struct flag_names_t {
{ "flagged", CAMEL_MESSAGE_FLAGGED },
{ "seen", CAMEL_MESSAGE_SEEN },
{ "attachments", CAMEL_MESSAGE_ATTACHMENTS },
+ { "needsreply", CAMEL_MESSAGE_NEEDS_REPLY },
{ NULL, 0 }
};
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index f63a1d49a0..ee5b69bf37 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -57,6 +57,7 @@ enum _CamelMessageFlags {
CAMEL_MESSAGE_FLAGGED = 1<<3,
CAMEL_MESSAGE_SEEN = 1<<4,
CAMEL_MESSAGE_ATTACHMENTS = 1<<5,
+ CAMEL_MESSAGE_NEEDS_REPLY = 1<<6,
/* following flags are for the folder, and are not really permanent flags */
CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<16, /* for use by the folder implementation */
diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml
index 8b931cad74..0f651527ee 100644
--- a/filter/filtertypes.xml
+++ b/filter/filtertypes.xml
@@ -463,6 +463,9 @@
<option value="Seen">
<title>Read</title>
</option>
+ <option value="NeedsReply">
+ <title>Needs Reply</title>
+ </option>
</input>
</part>
diff --git a/filter/vfoldertypes.xml b/filter/vfoldertypes.xml
index 7f38eb7834..dfcd85bb94 100644
--- a/filter/vfoldertypes.xml
+++ b/filter/vfoldertypes.xml
@@ -288,6 +288,9 @@
<option value="Seen">
<title>Read</title>
</option>
+ <option value="NeedsReply">
+ <title>Needs Reply</title>
+ </option>
</input>
</part>
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f0c521d76f..bbfbca8527 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,28 @@
+2001-12-09 Jon Trowbridge <trow@ximian.com>
+
+ * message-list.c: #include "art/mail-need-reply.xpm".
+ (ml_tree_value_at): Adjust magic numbers, show "Need Reply" icon
+ if the message needs reply.
+ (message_list_create_extras): Adjust magic numbers to add new
+ icon.
+ (on_click): Changed to toggle between unread, read, and need reply
+ when the status icon is clicked.
+
+ * mail-callbacks.c (mark_as_needing_reply): Added.
+ (mark_as_not_needing_reply): Added. Add "set" value to struct
+ post_send_data.
+ (composer_sent_cb): Use both "flags" and "set" elements of
+ post_send_data when setting message flags.
+ (mail_reply): Clear "Needs Reply" flag when we actually reply to a
+ message.
+
+ * folder-browser.c: Changed flag values to be given by
+ bit-shifting (1<<5) vs. base-ten (32). Added
+ CAN_MARK_DOESNT_NEED_REPLY flag. Added "Mark as Needing Reply"
+ and "Mark as Not Needing Reply" elements to context menu.
+ (on_right_click): Hide "Mark as (Not) Needing Reply" context menu
+ elements as appropriate.
+
2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (stream_write_or_redisplay_when_loaded): Check
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index ddcc305fe6..158ce0cc0e 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -1412,15 +1412,17 @@ hide_sender(GtkWidget *w, FolderBrowser *fb)
}
enum {
- SELECTION_SET = 2,
- CAN_MARK_READ = 4,
- CAN_MARK_UNREAD = 8,
- CAN_DELETE = 16,
- CAN_UNDELETE = 32,
- IS_MAILING_LIST = 64,
- CAN_RESEND = 128,
- CAN_MARK_IMPORTANT = 256,
- CAN_MARK_UNIMPORTANT = 512
+ SELECTION_SET = 1<<1,
+ CAN_MARK_READ = 1<<2,
+ CAN_MARK_UNREAD = 1<<3,
+ CAN_DELETE = 1<<4,
+ CAN_UNDELETE = 1<<5,
+ IS_MAILING_LIST = 1<<6,
+ CAN_RESEND = 1<<7,
+ CAN_MARK_IMPORTANT = 1<<8,
+ CAN_MARK_UNIMPORTANT = 1<<9,
+ CAN_MARK_NEEDS_REPLY = 1<<10,
+ CAN_MARK_DOESNT_NEED_REPLY = 1<<11
};
#define MLIST_VFOLDER (3)
@@ -1460,6 +1462,8 @@ static EPopupMenu context_menu[] = {
{ N_("Mark as U_nread"), NULL, GTK_SIGNAL_FUNC (mark_as_unseen), NULL, CAN_MARK_UNREAD },
{ N_("Mark as _Important"), NULL, GTK_SIGNAL_FUNC (mark_as_important), NULL, CAN_MARK_IMPORTANT },
{ N_("Mark as Unim_portant"), NULL, GTK_SIGNAL_FUNC (mark_as_unimportant), NULL, CAN_MARK_UNIMPORTANT },
+ { N_("Mark as Needing Reply"), NULL, GTK_SIGNAL_FUNC (mark_as_needing_reply), NULL, CAN_MARK_NEEDS_REPLY },
+ { N_("Mark as Not Needing Reply"), NULL, GTK_SIGNAL_FUNC (mark_as_not_needing_reply), NULL, CAN_MARK_DOESNT_NEED_REPLY },
E_POPUP_SEPARATOR,
@@ -1550,6 +1554,8 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
gboolean have_unseen = FALSE;
gboolean have_important = FALSE;
gboolean have_unimportant = FALSE;
+ gboolean have_needs_reply = FALSE;
+ gboolean have_doesnt_need_reply = FALSE;
for (i = 0; i < uids->len; i++) {
info = camel_folder_get_message_info (fb->folder, uids->pdata[i]);
@@ -1570,6 +1576,11 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
have_important = TRUE;
else
have_unimportant = TRUE;
+
+ if (info->flags & CAMEL_MESSAGE_NEEDS_REPLY)
+ have_needs_reply = TRUE;
+ else
+ have_doesnt_need_reply = TRUE;
camel_folder_free_message_info (fb->folder, info);
@@ -1591,6 +1602,11 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
enable_mask |= CAN_MARK_IMPORTANT;
if (!have_important)
enable_mask |= CAN_MARK_UNIMPORTANT;
+
+ if (!have_needs_reply)
+ enable_mask |= CAN_MARK_DOESNT_NEED_REPLY;
+ if (!have_doesnt_need_reply)
+ enable_mask |= CAN_MARK_NEEDS_REPLY;
/*
* Hide items that wont get used.
@@ -1615,6 +1631,13 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
else
hide_mask |= CAN_MARK_UNIMPORTANT;
}
+
+ if (!(have_needs_reply && have_doesnt_need_reply)) {
+ if (have_needs_reply)
+ hide_mask |= CAN_MARK_NEEDS_REPLY;
+ else
+ hide_mask |= CAN_MARK_DOESNT_NEED_REPLY;
+ }
}
/* free uids */
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index ee30562111..8942aaf283 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -118,7 +118,7 @@ e_gnome_ok_cancel_dialog_parented (const char *message, GnomeReplyCallback callb
struct post_send_data {
CamelFolder *folder;
gchar *uid;
- guint32 flags;
+ guint32 flags, set;
};
static void
@@ -420,7 +420,7 @@ composer_sent_cb (char *uri, CamelMimeMessage *message, gboolean sent, void *dat
if (sent) {
if (send->psd) {
camel_folder_set_message_flags (send->psd->folder, send->psd->uid,
- send->psd->flags, send->psd->flags);
+ send->psd->flags, send->psd->set);
}
gtk_widget_destroy (GTK_WIDGET (send->composer));
} else {
@@ -646,7 +646,7 @@ composer_postpone_cb (EMsgComposer *composer, gpointer data)
camel_object_unref (CAMEL_OBJECT (message));
if (psd)
- camel_folder_set_message_flags (psd->folder, psd->uid, psd->flags, psd->flags);
+ camel_folder_set_message_flags (psd->folder, psd->uid, psd->flags, psd->set);
gtk_widget_destroy (GTK_WIDGET (composer));
}
@@ -1024,7 +1024,8 @@ mail_reply (CamelFolder *folder, CamelMimeMessage *msg, const char *uid, int mod
psd->folder = folder;
camel_object_ref (CAMEL_OBJECT (psd->folder));
psd->uid = g_strdup (uid);
- psd->flags = CAMEL_MESSAGE_ANSWERED;
+ psd->flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_NEEDS_REPLY;
+ psd->set = CAMEL_MESSAGE_ANSWERED;
composer = mail_generate_reply (folder, msg, uid, mode);
if (!composer)
@@ -1664,6 +1665,25 @@ toggle_as_important (BonoboUIComponent *uih, void *user_data, const char *path)
}
void
+mark_as_needing_reply (BonoboUIComponent *uih, void *user_data, const char *path)
+{
+ flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_DELETED, 0);
+ flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_NEEDS_REPLY, CAMEL_MESSAGE_NEEDS_REPLY);
+}
+
+void
+mark_as_not_needing_reply (BonoboUIComponent *uih, void *user_data, const char *path)
+{
+ flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_NEEDS_REPLY, 0);
+}
+
+void
+toggle_need_reply (BonoboUIComponent *uih, void *user_data, const char *path)
+{
+ toggle_flags (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_NEEDS_REPLY);
+}
+
+void
zoom_in (BonoboUIComponent *uih, void *user_data, const char *path)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
diff --git a/mail/mail-callbacks.h b/mail/mail-callbacks.h
index f2bee415cf..5859411727 100644
--- a/mail/mail-callbacks.h
+++ b/mail/mail-callbacks.h
@@ -81,19 +81,21 @@ void resend_msg (GtkWidget *widget, gpointer user_data);
void search_msg (GtkWidget *widget, gpointer user_data);
void load_images (GtkWidget *widget, gpointer user_data);
-void add_sender_to_addrbook (BonoboUIComponent *uih, void *user_data, const char *path);
-void move_msg (BonoboUIComponent *uih, void *user_data, const char *path);
-void copy_msg (BonoboUIComponent *uih, void *user_data, const char *path);
-void add_sender_to_addrbook(BonoboUIComponent *uih, void *user_data, const char *path);
-void select_all (BonoboUIComponent *uih, void *user_data, const char *path);
-void select_thread (BonoboUIComponent *uih, void *user_data, const char *path);
-void invert_selection (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_important (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_unimportant (BonoboUIComponent *uih, void *user_data, const char *path);
-void toggle_as_important (BonoboUIComponent *uih, void *user_data, const char *path);
+void add_sender_to_addrbook (BonoboUIComponent *uih, void *user_data, const char *path);
+void move_msg (BonoboUIComponent *uih, void *user_data, const char *path);
+void copy_msg (BonoboUIComponent *uih, void *user_data, const char *path);
+void select_all (BonoboUIComponent *uih, void *user_data, const char *path);
+void select_thread (BonoboUIComponent *uih, void *user_data, const char *path);
+void invert_selection (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_as_important (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_as_unimportant (BonoboUIComponent *uih, void *user_data, const char *path);
+void toggle_as_important (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_as_needing_reply (BonoboUIComponent *uih, void *user_data, const char *path);
+void mark_as_not_needing_reply (BonoboUIComponent *uih, void *user_data, const char *path);
+void toggle_need_reply (BonoboUIComponent *uih, void *user_data, const char *path);
void zoom_in (BonoboUIComponent *uih, void *user_data, const char *path);
void zoom_out (BonoboUIComponent *uih, void *user_data, const char *path);
diff --git a/mail/message-list.c b/mail/message-list.c
index 61ff949ac5..02e6d234c9 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -47,6 +47,7 @@
#include "art/mail-new.xpm"
#include "art/mail-read.xpm"
#include "art/mail-replied.xpm"
+#include "art/mail-need-reply.xpm"
#include "art/attachment.xpm"
#include "art/priority-high.xpm"
#include "art/empty.xpm"
@@ -137,6 +138,7 @@ static struct {
{ mail_new_xpm, NULL },
{ mail_read_xpm, NULL },
{ mail_replied_xpm, NULL },
+ { mail_need_reply_xpm, NULL },
/* FIXME: Replace these with pixmaps for multiple_read and multiple_unread */
{ mail_new_xpm, NULL },
{ mail_read_xpm, NULL },
@@ -792,12 +794,14 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
child = e_tree_model_node_get_first_child(etm, path);
if (child && !e_tree_node_is_expanded(message_list->tree, path)) {
if (subtree_unread(message_list, child))
- return (void *)3;
- else
return (void *)4;
+ else
+ return (void *)5;
}
- if (msg_info->flags & CAMEL_MESSAGE_ANSWERED)
+ if (msg_info->flags & CAMEL_MESSAGE_NEEDS_REPLY)
+ return GINT_TO_POINTER (3);
+ else if (msg_info->flags & CAMEL_MESSAGE_ANSWERED)
return GINT_TO_POINTER (2);
else if (msg_info->flags & CAMEL_MESSAGE_SEEN)
return GINT_TO_POINTER (1);
@@ -962,28 +966,28 @@ message_list_create_extras (void)
extras = e_table_extras_new();
e_table_extras_add_pixbuf(extras, "status", states_pixmaps [0].pixbuf);
- e_table_extras_add_pixbuf(extras, "score", states_pixmaps [13].pixbuf);
- e_table_extras_add_pixbuf(extras, "attachment", states_pixmaps [6].pixbuf);
- e_table_extras_add_pixbuf(extras, "flagged", states_pixmaps [7].pixbuf);
+ e_table_extras_add_pixbuf(extras, "score", states_pixmaps [14].pixbuf);
+ e_table_extras_add_pixbuf(extras, "attachment", states_pixmaps [7].pixbuf);
+ e_table_extras_add_pixbuf(extras, "flagged", states_pixmaps [8].pixbuf);
e_table_extras_add_compare(extras, "address_compare", address_compare);
e_table_extras_add_compare(extras, "subject_compare", subject_compare);
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 6; i++)
images [i] = states_pixmaps [i].pixbuf;
- e_table_extras_add_cell(extras, "render_message_status", e_cell_toggle_new (0, 5, images));
+ e_table_extras_add_cell(extras, "render_message_status", e_cell_toggle_new (0, 6, images));
for (i = 0; i < 2; i++)
- images [i] = states_pixmaps [i + 5].pixbuf;
+ images [i] = states_pixmaps [i + 6].pixbuf;
e_table_extras_add_cell(extras, "render_attachment", e_cell_toggle_new (0, 2, images));
- images [1] = states_pixmaps [7].pixbuf;
+ images [1] = states_pixmaps [8].pixbuf;
e_table_extras_add_cell(extras, "render_flagged", e_cell_toggle_new (0, 2, images));
for (i = 0; i < 7; i++)
- images[i] = states_pixmaps [i + 7].pixbuf;
+ images[i] = states_pixmaps [i + 8].pixbuf;
e_table_extras_add_cell(extras, "render_score", e_cell_toggle_new (0, 7, images));
@@ -2024,29 +2028,51 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess
int flag;
CamelMessageInfo *info;
- if (col == COL_MESSAGE_STATUS)
- flag = CAMEL_MESSAGE_SEEN;
- else if (col == COL_FLAGGED)
+ if (col == COL_MESSAGE_STATUS) {
+ guint32 msg_flags;
+
+ info = get_message_info (list, path);
+ if (info == NULL) {
+ return FALSE;
+ }
+
+ msg_flags = camel_folder_get_message_flags (list->folder, camel_message_info_uid (info));
+
+ if (msg_flags & CAMEL_MESSAGE_NEEDS_REPLY) {
+ flag = 0;
+ } else if (msg_flags & CAMEL_MESSAGE_SEEN) {
+ flag = CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_NEEDS_REPLY;
+ } else {
+ flag = CAMEL_MESSAGE_SEEN;
+ }
+
+ camel_folder_set_message_flags (list->folder, camel_message_info_uid (info),
+ CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_NEEDS_REPLY, flag);
+
+ if (flag & CAMEL_MESSAGE_SEEN && list->seen_id) {
+ gtk_timeout_remove (list->seen_id);
+ list->seen_id = 0;
+ }
+
+ return TRUE;
+ }
+
+ if (col == COL_FLAGGED)
flag = CAMEL_MESSAGE_FLAGGED;
else
return FALSE;
-
+
info = get_message_info (list, path);
if (info == NULL) {
return FALSE;
}
-
+
/* If a message was marked as deleted and the user flags it as important, undelete it */
if (col == COL_FLAGGED && (info->flags & CAMEL_MESSAGE_DELETED))
flag |= CAMEL_MESSAGE_DELETED;
camel_folder_set_message_flags (list->folder, camel_message_info_uid (info), flag, ~info->flags);
-
- if (flag == CAMEL_MESSAGE_SEEN && list->seen_id) {
- gtk_timeout_remove (list->seen_id);
- list->seen_id = 0;
- }
-
+
return TRUE;
}