aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-11-29 05:33:07 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-11-29 05:33:07 +0000
commite7f6d03d3475bb24aba9c850b04e06cd3027edb9 (patch)
tree050d48cd8f4342213c84504f8a77e4a77bcc8528 /src
parent09874681f486f97526251c166a8675fcdfc08a23 (diff)
added an option to inherit recipients on reply to self messages.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1384 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/compose.c13
-rw-r--r--src/prefs_common_dialog.c9
2 files changed, 21 insertions, 1 deletions
diff --git a/src/compose.c b/src/compose.c
index 42bf2083..359cbe42 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -1578,12 +1578,23 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
!address_equal(compose->replyto, compose->ml_post))
compose_entry_set(compose, compose->replyto,
COMPOSE_ENTRY_CC);
- } else
+ } else if (prefs_common.inherit_recipient_on_self_reply &&
+ address_equal(compose->account->address,
+ msginfo->from)) {
+ compose_entry_set(compose, msginfo->to,
+ COMPOSE_ENTRY_TO);
+ if (to_all) {
+ compose_entry_set(compose, compose->cc,
+ COMPOSE_ENTRY_CC);
+ to_all = FALSE;
+ }
+ } else {
compose_entry_set(compose,
(compose->replyto && !ignore_replyto)
? compose->replyto
: msginfo->from ? msginfo->from : "",
COMPOSE_ENTRY_TO);
+ }
} else {
if (ignore_replyto) {
compose_entry_set(compose,
diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c
index f17c185d..812856e9 100644
--- a/src/prefs_common_dialog.c
+++ b/src/prefs_common_dialog.c
@@ -102,6 +102,7 @@ static struct Compose {
GtkWidget *checkbtn_reply_account_autosel;
GtkWidget *checkbtn_quote;
GtkWidget *checkbtn_default_reply_list;
+ GtkWidget *checkbtn_inherit_recipient_on_self_reply;
} compose;
static struct Quote {
@@ -320,6 +321,9 @@ static PrefsUIData ui_data[] = {
prefs_set_data_from_toggle, prefs_set_toggle},
{"default_reply_list", &compose.checkbtn_default_reply_list,
prefs_set_data_from_toggle, prefs_set_toggle},
+ {"inherit_recipient_on_self_reply",
+ &compose.checkbtn_inherit_recipient_on_self_reply,
+ prefs_set_data_from_toggle, prefs_set_toggle},
/* {"show_ruler", NULL, NULL, NULL}, */
@@ -973,6 +977,7 @@ static void prefs_compose_create(void)
GtkWidget *checkbtn_reply_account_autosel;
GtkWidget *checkbtn_quote;
GtkWidget *checkbtn_default_reply_list;
+ GtkWidget *checkbtn_inherit_recipient_on_self_reply;
GtkWidget *quote_wid;
#if USE_GTKSPELL
@@ -1027,6 +1032,8 @@ static void prefs_compose_create(void)
_("Quote message when replying"));
PACK_CHECK_BUTTON (vbox2, checkbtn_default_reply_list,
_("Reply button invokes mailing list reply"));
+ PACK_CHECK_BUTTON (vbox2, checkbtn_inherit_recipient_on_self_reply,
+ _("Inherit recipients on reply to self messages"));
/* editor */
@@ -1160,6 +1167,8 @@ static void prefs_compose_create(void)
compose.checkbtn_reply_account_autosel =
checkbtn_reply_account_autosel;
compose.checkbtn_default_reply_list = checkbtn_default_reply_list;
+ compose.checkbtn_inherit_recipient_on_self_reply =
+ checkbtn_inherit_recipient_on_self_reply;
}
static GtkWidget *prefs_quote_create(void)