#include "procmsg.h"
#include "menu.h"
#include "send.h"
+#include "imap.h"
#include "news.h"
#include "customheader.h"
#include "prefs_common.h"
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_FORWARDED);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_REPLIED);
-
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_set_perm_flags(msginfo, MSG_REPLIED);
CHANGE_FLAGS(msginfo);
compose = compose_create(account, COMPOSE_REPLY);
g_return_val_if_fail(msginfo->folder != NULL, NULL);
account = msginfo->folder->folder->account;
- if (!account && msginfo->to && prefs_common.forward_account_autosel) {
+ if (!account && msginfo->to && prefs_common.forward_account_autosel) {
gchar *to;
Xstrdup_a(to, msginfo->to, return NULL);
extract_address(to);
account = account_find_from_address(to);
}
- if(!account && prefs_common.forward_account_autosel) {
- gchar cc[BUFFSIZE];
+ if(!account && prefs_common.forward_account_autosel) {
+ gchar cc[BUFFSIZE];
if(!get_header_from_msginfo(msginfo,cc,sizeof(cc),"CC:")){ /* Found a CC header */
extract_address(cc);
account = account_find_from_address(cc);
}
}
- if (account == NULL) {
+ if (account == NULL) {
account = cur_account;
/*
account = msginfo->folder->folder->account;
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_REPLIED);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_FORWARDED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_REPLIED);
CHANGE_FLAGS(msginfo);
compose = compose_create(account, COMPOSE_FORWARD);
if ((compose->account->protocol != A_NNTP) || followup_and_reply_to)
compose_entry_append(compose,
- ((compose->mailinglist && !ignore_replyto)
- ? compose->mailinglist
- : (compose->replyto && !ignore_replyto)
+ ((compose->replyto && !ignore_replyto)
? compose->replyto
+ : (compose->mailinglist && !ignore_replyto)
+ ? compose->mailinglist
: msginfo->from ? msginfo->from : ""),
COMPOSE_TO);
if (compose->account->protocol == A_NNTP) {
for (; cur_pos < tlen; cur_pos++) {
/* mark position of new line - needed for quotation wrap */
- if (linewrap_quote && is_new_line) {
- qlen = gtkut_text_str_compare
- (text, cur_pos, tlen, qfmt);
+ if (is_new_line) {
+ if (linewrap_quote) {
+ qlen = gtkut_text_str_compare
+ (text, cur_pos, tlen, qfmt);
+ if (qlen)
+ i_len = get_indent_length
+ (text, cur_pos, tlen);
+ else
+ i_len = 0;
+ }
is_new_line = FALSE;
- if (qlen)
- i_len = get_indent_length(text, cur_pos, tlen);
- else
- i_len = 0;
p_pos = cur_pos;
#ifdef WRAP_DEBUG
printf("new line i_len=%d qlen=%d p_pos=", i_len, qlen);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
gtk_widget_set_usize(window, -1, prefs_common.compose_height);
+ gtk_window_set_wmclass(GTK_WINDOW(window), "compose window", "Sylpheed");
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(compose_delete_cb), compose);
gtk_signal_connect(GTK_OBJECT(window), "destroy",
account->auto_replyto);
#endif
}
+
if (account->protocol != A_NNTP) {
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(compose->header_last->combo)->entry), _("To:"));
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(compose->header_last->combo)->entry), prefs_common.trans_hdr ? _("To:") : "To:");
} else {
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(compose->header_last->combo)->entry), _("Newsgroups:"));
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(compose->header_last->combo)->entry), prefs_common.trans_hdr ? _("Newsgroups:") : "Newsgroups:");
}
menuitem = gtk_item_factory_get_item(ifactory, "/Tool/Show ruler");
if (GTK_CHECK_MENU_ITEM(widget)->active) {
gtk_widget_ref(compose->edit_vbox);
- gtk_container_remove(GTK_CONTAINER(compose->vbox2),
- compose->edit_vbox);
+ gtkut_container_remove(GTK_CONTAINER(compose->vbox2),
+ compose->edit_vbox);
gtk_paned_add2(GTK_PANED(compose->paned), compose->edit_vbox);
gtk_box_pack_start(GTK_BOX(compose->vbox2), compose->paned,
TRUE, TRUE, 0);
gtk_widget_ref(compose->paned);
gtk_widget_ref(compose->edit_vbox);
- gtk_container_remove(GTK_CONTAINER(compose->vbox2),
- compose->paned);
- gtk_container_remove(GTK_CONTAINER(compose->paned),
- compose->edit_vbox);
+ gtkut_container_remove(GTK_CONTAINER(compose->vbox2),
+ compose->paned);
+ gtkut_container_remove(GTK_CONTAINER(compose->paned),
+ compose->edit_vbox);
gtk_box_pack_start(GTK_BOX(compose->vbox2),
compose->edit_vbox, TRUE, TRUE, 0);