aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-18 00:15:57 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-18 00:15:57 +0800
commitff736e48b2d4375d86af8bbb9ab535f62180e61d (patch)
tree62488587338dad505397f7538ba4aa554da0a90c
parent1eab1eeaeb5cf5947f931ce2a9a16779e4d0662b (diff)
downloadgsoc2013-evolution-ff736e48b2d4375d86af8bbb9ab535f62180e61d.tar.gz
gsoc2013-evolution-ff736e48b2d4375d86af8bbb9ab535f62180e61d.tar.zst
gsoc2013-evolution-ff736e48b2d4375d86af8bbb9ab535f62180e61d.zip
BugĀ 592034 - Reply to List doesn't work
-rw-r--r--mail/e-mail-reader.c22
-rw-r--r--mail/e-mail-reader.h27
2 files changed, 22 insertions, 27 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 0362cb110a..ed70753719 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2141,6 +2141,7 @@ e_mail_reader_check_state (EMailReader *reader)
gboolean has_unread = FALSE;
gboolean drafts_or_outbox;
gboolean store_supports_vjunk = FALSE;
+ gboolean is_mailing_list;
guint32 state = 0;
guint ii;
@@ -2160,8 +2161,13 @@ e_mail_reader_check_state (EMailReader *reader)
em_utils_folder_is_drafts (folder, folder_uri) ||
em_utils_folder_is_outbox (folder, folder_uri);
+ /* Initialize this flag based on whether there are any
+ * messages selected. We will update it in the loop. */
+ is_mailing_list = (uids->len > 0);
+
for (ii = 0; ii < uids->len; ii++) {
CamelMessageInfo *info;
+ const gchar *string;
guint32 flags;
info = camel_folder_get_message_info (
@@ -2227,6 +2233,9 @@ e_mail_reader_check_state (EMailReader *reader)
can_flag_completed = TRUE;
} else
can_flag_for_followup = TRUE;
+
+ string = camel_message_info_mlist (info);
+ is_mailing_list &= (string != NULL && *string != '\0');
}
if (em_utils_check_user_can_send_mail ())
@@ -2237,10 +2246,6 @@ e_mail_reader_check_state (EMailReader *reader)
state |= E_MAIL_READER_SELECTION_MULTIPLE;
if (!drafts_or_outbox && uids->len == 1)
state |= E_MAIL_READER_SELECTION_CAN_ADD_SENDER;
-#if 0 /* FIXME */
- if (can_edit)
- state |= E_MAIL_READER_SELECTION_CAN_EDIT;
-#endif
if (can_clear_flags)
state |= E_MAIL_READER_SELECTION_FLAG_CLEAR;
if (can_flag_completed)
@@ -2263,14 +2268,8 @@ e_mail_reader_check_state (EMailReader *reader)
state |= E_MAIL_READER_SELECTION_HAS_UNIMPORTANT;
if (has_unread)
state |= E_MAIL_READER_SELECTION_HAS_UNREAD;
-#if 0 /* FIXME */
- if (has_http_uri)
- state |= E_MAIL_READER_SELECTION_HAS_URI_HTTP;
- if (has_mailto_uri)
- state |= E_MAIL_READER_SELECTION_HAS_URI_MAILTO;
if (is_mailing_list)
state |= E_MAIL_READER_SELECTION_IS_MAILING_LIST;
-#endif
em_utils_uids_free (uids);
@@ -2327,7 +2326,7 @@ e_mail_reader_update_actions (EMailReader *reader)
(state & E_MAIL_READER_SELECTION_SINGLE);
multiple_messages_selected =
(state & E_MAIL_READER_SELECTION_MULTIPLE);
- /* FIXME Missing booleans */
+ /* FIXME Missing CAN_ADD_SENDER */
enable_flag_clear =
(state & E_MAIL_READER_SELECTION_FLAG_CLEAR);
enable_flag_completed =
@@ -2350,7 +2349,6 @@ e_mail_reader_update_actions (EMailReader *reader)
(state & E_MAIL_READER_SELECTION_HAS_UNIMPORTANT);
selection_has_unread_messages =
(state & E_MAIL_READER_SELECTION_HAS_UNREAD);
- /* FIXME Missing booleans */
selection_is_mailing_list =
(state & E_MAIL_READER_SELECTION_IS_MAILING_LIST);
diff --git a/mail/e-mail-reader.h b/mail/e-mail-reader.h
index 08d6f23e51..0fb557f5b7 100644
--- a/mail/e-mail-reader.h
+++ b/mail/e-mail-reader.h
@@ -60,21 +60,18 @@ enum {
E_MAIL_READER_SELECTION_SINGLE = 1 << 1,
E_MAIL_READER_SELECTION_MULTIPLE = 1 << 2,
E_MAIL_READER_SELECTION_CAN_ADD_SENDER = 1 << 3,
- E_MAIL_READER_SELECTION_CAN_EDIT = 1 << 4,
- E_MAIL_READER_SELECTION_FLAG_CLEAR = 1 << 5,
- E_MAIL_READER_SELECTION_FLAG_COMPLETED = 1 << 6,
- E_MAIL_READER_SELECTION_FLAG_FOLLOWUP = 1 << 7,
- E_MAIL_READER_SELECTION_HAS_DELETED = 1 << 8,
- E_MAIL_READER_SELECTION_HAS_IMPORTANT = 1 << 9,
- E_MAIL_READER_SELECTION_HAS_JUNK = 1 << 10,
- E_MAIL_READER_SELECTION_HAS_NOT_JUNK = 1 << 11,
- E_MAIL_READER_SELECTION_HAS_READ = 1 << 12,
- E_MAIL_READER_SELECTION_HAS_UNDELETED = 1 << 13,
- E_MAIL_READER_SELECTION_HAS_UNIMPORTANT = 1 << 14,
- E_MAIL_READER_SELECTION_HAS_UNREAD = 1 << 15,
- E_MAIL_READER_SELECTION_HAS_URI_HTTP = 1 << 16,
- E_MAIL_READER_SELECTION_HAS_URI_MAILTO = 1 << 17,
- E_MAIL_READER_SELECTION_IS_MAILING_LIST = 1 << 18
+ E_MAIL_READER_SELECTION_FLAG_CLEAR = 1 << 4,
+ E_MAIL_READER_SELECTION_FLAG_COMPLETED = 1 << 5,
+ E_MAIL_READER_SELECTION_FLAG_FOLLOWUP = 1 << 6,
+ E_MAIL_READER_SELECTION_HAS_DELETED = 1 << 7,
+ E_MAIL_READER_SELECTION_HAS_IMPORTANT = 1 << 8,
+ E_MAIL_READER_SELECTION_HAS_JUNK = 1 << 9,
+ E_MAIL_READER_SELECTION_HAS_NOT_JUNK = 1 << 10,
+ E_MAIL_READER_SELECTION_HAS_READ = 1 << 11,
+ E_MAIL_READER_SELECTION_HAS_UNDELETED = 1 << 12,
+ E_MAIL_READER_SELECTION_HAS_UNIMPORTANT = 1 << 13,
+ E_MAIL_READER_SELECTION_HAS_UNREAD = 1 << 14,
+ E_MAIL_READER_SELECTION_IS_MAILING_LIST = 1 << 15
};
struct _EMailReaderIface {