[balsa] main-window: Manage "reply to group" action
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] main-window: Manage "reply to group" action
- Date: Tue, 29 May 2018 20:30:50 +0000 (UTC)
commit a7854edbc7bffe914f89aac9988b6bd541331797
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue May 29 15:55:19 2018 -0400
main-window: Manage "reply to group" action
* src/main-window.c (bw_enable_message_menus): Disable "reply to
group" when the message is not from an RFC-2369-compliant mailing list.
<URL:https://tools.ietf.org/html/rfc2369>
ChangeLog | 6 ++++++
src/main-window.c | 20 +++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index 63847e185..4ac0847c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-05-29 Peter Bloomfield <pbloomfield bellsouth net>
+
+ * src/main-window.c (bw_enable_message_menus): Disable "reply to
+ group" when the message is not from an RFC-2369-compliant mail list.
+ <URL:https://tools.ietf.org/html/rfc2369>
+
2018-05-10 Peter Bloomfield <pbloomfield bellsouth net>
New files for migrating to GResource
diff --git a/src/main-window.c b/src/main-window.c
index 272be3bc7..1e0d5b0bd 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -2140,7 +2140,7 @@ static const gchar *const mailbox_actions[] = {
};
static const gchar *const message_actions[] = {
- "reply", "reply-all", "reply-group",
+ "reply", "reply-all",
"store-address", "view-source", "forward-attached", "forward-inline",
"pipe", "select-thread"
};
@@ -2489,11 +2489,29 @@ bw_enable_message_menus(BalsaWindow * window, guint msgno)
{
gboolean enable, enable_mod, enable_store;
BalsaIndex *bindex = BALSA_INDEX(window->current_index);
+ gboolean enable_reply_group;
enable = (msgno != 0 && bindex != NULL);
bw_actions_set_enabled(window, current_message_actions,
G_N_ELEMENTS(current_message_actions), enable);
+ enable_reply_group = FALSE;
+ if (enable) {
+ GList *messages, *list;
+
+ messages = balsa_index_selected_list(BALSA_INDEX(bindex));
+ for (list = messages; list != NULL; list = list->next) {
+ LibBalsaMessage *message = list->data;
+
+ if (libbalsa_message_get_user_header(message, "list-post") != NULL) {
+ enable_reply_group = TRUE;
+ break;
+ }
+ }
+ g_list_free_full(messages, g_object_unref);
+ }
+ bw_action_set_enabled(window, "reply-group", enable_reply_group);
+
enable = (bindex != NULL
&& balsa_index_count_selected_messages(bindex) > 0);
bw_actions_set_enabled(window, message_actions,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]