+2002-10-04
+
+ * configure.in: added $LDAP_LIBS for lber library detection.
+
+2002-10-03
+
+ * version 0.8.5
+
+2002-10-03
+
+ * src/procmsg.c: procmsg_msginfo_get_full_info(): fixed a memory
+ leak, and added error checking.
+
+2002-10-03
+
+ * src/compose.[ch]: added a flag Compose::use_newsgroups, and
+ removed Compose::orig_account.
+ compose_check_for_valid_recipient(): check only enabled entries.
+ compose_write_headers()
+ compose_redirect_write_headers(): add Newsgroups header only
+ when the entry is enabled.
+ compose_send(): modified the method of finding a mail account
+ from a news account so that it tries to match the From address.
+ * src/send.c: send_message_queue(): enabled the queueing of news
+ messages.
+ * src/news.[ch]: news_post_stream(): new.
+
+2002-10-03
+
+ * configure.in: check lber first and use $LDAP_LIBS on the check
+ for ldap.
+
+2002-10-02
+
+ * po/*.po: fixed many typos of format strings which will lead to
+ crash (thanks to Sergey Vlasov).
+
+2002-10-02
+
+ * src/procheader.c: procheader_parse_stream(): added Cc header
+ to the target for full parsing.
+ * src/procmsg.[ch]: procmsg_msginfo_get_full_info(): new. It
+ returns the full message information from the given information.
+ * src/compose.c: compose_reply(), compose_forward(): get full
+ message information for Cc header.
+
2002-10-02
* src/inc.c: inc_account_mail(), inc_all_account_mail(): update
+2002-10-04 [paul] 0.8.3claws46
+
+ * sync with 0.8.5
+ see ChangeLog 2002-10-02 and 2002-10-03
+
2002-10-04 [christoph] 0.8.3claws45
* src/inc.c
+2002-10-04
+
+ * configure.in: lber ¥é¥¤¥Ö¥é¥ê¤Î¸¡½Ð¤Ë $LDAP_LIBS ¤òÄɲá£
+
+2002-10-03
+
+ * version 0.8.5
+
+2002-10-03
+
+ * src/procmsg.c: procmsg_msginfo_get_full_info(): ¥á¥â¥ê¥ê¡¼¥¯¤ò
+ ½¤Àµ¤·¡¢¥¨¥é¡¼¥Á¥§¥Ã¥¯¤òÄɲá£
+
+2002-10-03
+
+ * src/compose.[ch]: ¥Õ¥é¥° Compose::use_newsgroups ¤òÄɲä·¡¢
+ Compose::orig_account ¤òºï½ü¡£
+ compose_check_for_valid_recipient(): ͸ú¤Ê¥¨¥ó¥È¥ê¤Î¤ß¤ò¥Á¥§¥Ã¥¯¡£
+ compose_write_headers()
+ compose_redirect_write_headers(): ¥¨¥ó¥È¥ê¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç
+ ¤Î¤ß Newsgroups ¥Ø¥Ã¥À¤òÄɲá£
+ compose_send(): ¥Ë¥å¡¼¥¹¥¢¥«¥¦¥ó¥È¤«¤é¥á¡¼¥ë¥¢¥«¥¦¥ó¥È¤ò¸«¤Ä¤±¤ë
+ ÊýË¡¤ò From ¥¢¥É¥ì¥¹¤ò¥Þ¥Ã¥Á¤µ¤»¤ë¤è¤¦¤ËÊѹ¹¡£
+ * src/send.c: send_message_queue(): ¥Ë¥å¡¼¥¹¥á¥Ã¥»¡¼¥¸¤ÎÁ÷¿®ÂÔµ¡
+ ¤ò͸ú¤Ë¤·¤¿¡£
+ * src/news.[ch]: news_post_stream(): ¿·µ¬¡£
+
+2002-10-03
+
+ * configure.in: lber ¤òÀè¤Ë¥Á¥§¥Ã¥¯¤·¡¢ ldap ¤Î¥Á¥§¥Ã¥¯»þ¤Ë
+ $LDAP_LIBS ¤ò»ÈÍÑ¡£
+
+2002-10-02
+
+ * po/*.po: ¥¯¥é¥Ã¥·¥å¤ò°ú¤µ¯¤³¤¹Â¿¤¯¤Î¥Õ¥©¡¼¥Þ¥Ã¥Èʸ»úÎó¤Î¥ß¥¹
+ ¤ò½¤Àµ(Sergey Vlasov ¤µ¤ó thanks)¡£
+
+2002-10-02
+
+ * src/procheader.c: procheader_parse_stream(): ´°Á´¥Ñ¡¼¥¹¤ÎÂоÝ
+ ¤Ë Cc ¥Ø¥Ã¥À¤òÄɲá£
+ * src/procmsg.[ch]: procmsg_msginfo_get_full_info(): ¿·µ¬¡£»ØÄê
+ ¤µ¤ì¤¿¾ðÊ󤫤鴰Á´¤Ê¥á¥Ã¥»¡¼¥¸¾ðÊó¤òÊÖ¤¹¡£
+ * src/compose.c: compose_reply(), compose_forward(): Cc ¥Ø¥Ã¥À¤Î
+ ¤¿¤á¤Ë´°Á´¤Ê¥á¥Ã¥»¡¼¥¸¾ðÊó¤òÆÀ¤ë¤è¤¦¤Ë¤·¤¿¡£
+
2002-10-02
* src/inc.c: inc_account_mail(), inc_all_account_mail(): IMAP4 ¤È
Changes of Sylpheed
+* 0.8.5
+
+ * Many fatal errors which will lead to crash in message catalogs have
+ been fixed.
+ * Cc header is now correctly recognized on reply and forwarding.
+ * A problem of refresh of summary on IMAP4 and News folder has been fixed.
+ * A bug of changing accounts on composition window has been fixed.
+ * The LDAP library detection of configure script has been fixed again.
+ * Queueing of news messages has been enabled.
+
* 0.8.4
* The 'Select thread' function is added.
MICRO_VERSION=3
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws45
+EXTRA_VERSION=claws46
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
reply_account = account;
compose = compose_create(account, COMPOSE_REPLY);
- compose->replyinfo = procmsg_msginfo_new_ref(msginfo);
-#if 0 /* NEW COMPOSE GUI */
- if (followup_and_reply_to) {
- gtk_widget_show(compose->to_hbox);
- gtk_widget_show(compose->to_entry);
- gtk_table_set_row_spacing(GTK_TABLE(compose->table), 1, 4);
- compose->use_to = TRUE;
- }
-#endif
+ compose->replyinfo = procmsg_msginfo_get_full_info(msginfo);
+ if (!compose->replyinfo)
+ compose->replyinfo = procmsg_msginfo_copy(msginfo);
+
if (msginfo->folder && msginfo->folder->ret_rcpt) {
GtkItemFactory *ifactory;
else
qmark = "> ";
- quote_str = compose_quote_fmt(compose, msginfo,
+ quote_str = compose_quote_fmt(compose, compose->replyinfo,
prefs_common.quotefmt,
qmark, body);
}
} else {
gchar *qmark;
gchar *quote_str;
+ MsgInfo *full_msginfo;
+
+ full_msginfo = procmsg_msginfo_get_full_info(msginfo);
+ if (!full_msginfo)
+ full_msginfo = procmsg_msginfo_copy(msginfo);
if (prefs_common.fw_quotemark &&
*prefs_common.fw_quotemark)
prefs_common.fw_quotefmt,
qmark, body);
compose_attach_parts(compose, msginfo);
+
+ procmsg_msginfo_free(full_msginfo);
}
if (prefs_common.auto_sig)
gtk_widget_show(compose->newsgroups_hbox);
gtk_widget_show(compose->newsgroups_entry);
gtk_table_set_row_spacing(GTK_TABLE(compose->table), 2, 4);
+ compose->use_newsgroups = TRUE;
menuitem = gtk_item_factory_get_item(ifactory, "/View/To");
gtk_check_menu_item_set_active
gtk_widget_hide(compose->newsgroups_entry);
gtk_table_set_row_spacing(GTK_TABLE(compose->table), 2, 0);
gtk_widget_queue_resize(compose->table_vbox);
+ compose->use_newsgroups = FALSE;
menuitem = gtk_item_factory_get_item(ifactory, "/View/To");
gtk_check_menu_item_set_active
if (lock) return 1;
g_return_val_if_fail(compose->account != NULL, -1);
- g_return_val_if_fail(compose->orig_account != NULL, -1);
lock = TRUE;
#if 0 /* NEW COMPOSE GUI */
if (compose->account->protocol != A_NNTP)
ac = compose->account;
- else if (compose->orig_account->protocol != A_NNTP)
- ac = compose->orig_account;
- else if (cur_account && cur_account->protocol != A_NNTP)
- ac = cur_account;
else {
- ac = compose_current_mail_account();
+ ac = account_find_from_address(compose->account->address);
if (!ac) {
+ if (cur_account && cur_account->protocol != A_NNTP)
+ ac = cur_account;
+ else
+ ac = account_get_default();
+ }
+ if (!ac || ac->protocol == A_NNTP) {
+ alertpanel_error(_("Account for sending mail is not specified.\n"
+ "Please select a mail account before sending."));
unlink(tmp);
lock = FALSE;
return -1;
}
if (ok == 0 && compose->newsgroup_list) {
- Folder *folder;
-
- if (compose->account->protocol == A_NNTP)
- folder = FOLDER(compose->account->folder);
- else
- folder = FOLDER(compose->orig_account->folder);
-
- ok = news_post(folder, tmp);
+ ok = news_post(FOLDER(compose->account->folder), tmp);
if (ok < 0) {
alertpanel_error(_("Error occurred while posting the message to %s ."),
compose->account->nntp_server);
debug_print("queueing message...\n");
g_return_val_if_fail(compose->account != NULL, -1);
- g_return_val_if_fail(compose->orig_account != NULL, -1);
lock = TRUE;
if (compose->to_list) {
if (compose->account->protocol != A_NNTP)
mailac = compose->account;
- else if (compose->orig_account->protocol != A_NNTP)
- mailac = compose->orig_account;
else if (cur_account && cur_account->protocol != A_NNTP)
mailac = cur_account;
else if (!(mailac = compose_current_mail_account())) {
if (compose->newsgroup_list) {
if (compose->account->protocol == A_NNTP)
newsac = compose->account;
- else if (!(newsac = compose->orig_account) || (newsac->protocol != A_NNTP)) {
+ else if (!newsac->protocol != A_NNTP) {
lock = FALSE;
alertpanel_error(_("No account for posting news available!"));
return -1;
fprintf(fp, "NSV:\n");
fprintf(fp, "SSH:\n");
/* write recepient list */
- fprintf(fp, "R:");
if (compose->to_list) {
- fprintf(fp, "<%s>", (gchar *)compose->to_list->data);
- for (cur = compose->to_list->next; cur != NULL; cur = cur->next)
+ fprintf(fp, "R:<%s>", (gchar *)compose->to_list->data);
+ for (cur = compose->to_list->next; cur != NULL;
+ cur = cur->next)
fprintf(fp, ",<%s>", (gchar *)cur->data);
- }
+ fprintf(fp, "\n");
+ } else
fprintf(fp, "\n");
/* write newsgroup list */
fprintf(fp, "NG:");
/* Newsgroups */
compose_write_headers_from_headerlist(compose, fp, "Newsgroups");
#if 0 /* NEW COMPOSE GUI */
- str = gtk_entry_get_text(GTK_ENTRY(compose->newsgroups_entry));
- if (*str != '\0') {
- Xstrdup_a(str, str, return -1);
- g_strstrip(str);
- remove_space(str);
+ if (compose->use_newsgroups) {
+ str = gtk_entry_get_text(GTK_ENTRY(compose->newsgroups_entry));
if (*str != '\0') {
- compose->newsgroup_list =
- newsgroup_list_append(compose->newsgroup_list,
- str);
- compose_convert_header(buf, sizeof(buf), str,
- strlen("Newsgroups: "));
- fprintf(fp, "Newsgroups: %s\n", buf);
+ Xstrdup_a(str, str, return -1);
+ g_strstrip(str);
+ remove_space(str);
+ if (*str != '\0') {
+ compose->newsgroup_list =
+ newsgroup_list_append
+ (compose->newsgroup_list, str);
+ compose_convert_header(buf, sizeof(buf), str,
+ strlen("Newsgroups: "));
+ fprintf(fp, "Newsgroups: %s\n", buf);
+ }
}
}
#endif
titles[COL_NAME] = _("Name");
compose->account = account;
- compose->orig_account = account;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
gboolean use_cc;
gboolean use_bcc;
gboolean use_replyto;
+ gboolean use_newsgroups;
gboolean use_followupto;
gboolean use_attach;
GSList *newsgroup_list;
PrefsAccount *account;
- PrefsAccount *orig_account;
UndoMain *undostruct;
gint news_post(Folder *folder, const gchar *file)
{
- NNTPSession *session;
FILE *fp;
gint ok;
g_return_val_if_fail(folder->type == F_NEWS, -1);
g_return_val_if_fail(file != NULL, -1);
- session = news_session_get(folder);
- if (!session) return -1;
-
if ((fp = fopen(file, "rb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
return -1;
}
+ ok = news_post_stream(folder, fp);
+
+ fclose(fp);
+
+ statusbar_pop_all();
+
+ return ok;
+}
+
+gint news_post_stream(Folder *folder, FILE *fp)
+{
+ NNTPSession *session;
+ gint ok;
+
+ g_return_val_if_fail(folder != NULL, -1);
+ g_return_val_if_fail(folder->type == F_NEWS, -1);
+ g_return_val_if_fail(fp != NULL, -1);
+
+ session = news_session_get(folder);
+ if (!session) return -1;
+
ok = nntp_post(session->nntp_sock, fp);
if (ok != NN_SUCCESS) {
log_warning(_("can't post article.\n"));
return -1;
}
- fclose(fp);
-
- statusbar_pop_all();
-
return 0;
}
#define __NEWS_H__
#include <glib.h>
+#include <stdio.h>
#include "folder.h"
#include "session.h"
return newmsginfo;
}
+MsgInfo *procmsg_msginfo_get_full_info(MsgInfo *msginfo)
+{
+ MsgInfo *full_msginfo;
+ gchar *file;
+
+ if (msginfo == NULL) return NULL;
+
+ file = procmsg_get_message_file(msginfo);
+ if (!file) {
+ g_warning("procmsg_msginfo_get_full_info(): can't get message file.\n");
+ return NULL;
+ }
+
+ full_msginfo = procheader_parse_file(file, msginfo->flags, TRUE, FALSE);
+ g_free(file);
+ if (!full_msginfo) return NULL;
+
+ full_msginfo->msgnum = msginfo->msgnum;
+ full_msginfo->size = msginfo->size;
+ full_msginfo->mtime = msginfo->mtime;
+ full_msginfo->folder = msginfo->folder;
+ full_msginfo->to_folder = msginfo->to_folder;
+#if USE_GPGME
+ full_msginfo->plaintext_file = g_strdup(msginfo->plaintext_file);
+ full_msginfo->decryption_failed = msginfo->decryption_failed;
+#endif
+
+ /* return full_msginfo;*/
+ return procmsg_msginfo_new_ref(msginfo);
+}
+
void procmsg_msginfo_free(MsgInfo *msginfo)
{
if (msginfo == NULL) return;
MsgInfo *procmsg_msginfo_new ();
MsgInfo *procmsg_msginfo_new_ref (MsgInfo *msginfo);
MsgInfo *procmsg_msginfo_copy (MsgInfo *msginfo);
+MsgInfo *procmsg_msginfo_get_full_info (MsgInfo *msginfo);
void procmsg_msginfo_free (MsgInfo *msginfo);
guint procmsg_msginfo_memusage (MsgInfo *msginfo);
{"AID:", NULL, FALSE},
{NULL, NULL, FALSE}};
FILE *fp;
- gint val;
+ gint val = 0;
gchar *from = NULL;
gchar *server = NULL;
GSList *to_list = NULL;
gchar buf[BUFFSIZE];
gint hnum;
- PrefsAccount *ac = NULL;
+ glong fpos;
+ PrefsAccount *ac = NULL, *mailac = NULL, *newsac = NULL;
g_return_val_if_fail(file != NULL, -1);
}
}
- if (!to_list || !from) {
+ if (((!ac || (ac && ac->protocol != A_NNTP)) && !to_list) || !from) {
g_warning(_("Queued message header is broken.\n"));
val = -1;
- } else if (ac && ac->use_mail_command && ac->mail_command &&
- (*ac->mail_command)) {
- val = send_message_local(ac->mail_command, fp);
} else if (prefs_common.use_extsend && prefs_common.extsend_cmd) {
val = send_message_local(prefs_common.extsend_cmd, fp);
} else {
- if (!ac) {
+ if (ac && ac->protocol == A_NNTP) {
+ newsac = ac;
+
+ /* search mail account */
+ mailac = account_find_from_address(from);
+ if (!mailac) {
+ if (cur_account &&
+ cur_account->protocol != A_NNTP)
+ mailac = cur_account;
+ else {
+ mailac = account_get_default();
+ if (mailac->protocol == A_NNTP)
+ mailac = NULL;
+ }
+ }
+ } else if (ac) {
+ mailac = ac;
+ } else {
ac = account_find_from_smtp_server(from, server);
if (!ac) {
g_warning(_("Account not found. "
"Using current account...\n"));
ac = cur_account;
+ if (ac && ac->protocol != A_NNTP)
+ mailac = ac;
}
}
- if (ac)
- val = send_message_smtp(ac, to_list, fp);
- else {
- PrefsAccount tmp_ac;
+ fpos = ftell(fp);
+ if (to_list) {
+ if (mailac)
+ val = send_message_smtp(mailac, to_list, fp);
+ else {
+ PrefsAccount tmp_ac;
- g_warning(_("Account not found.\n"));
+ g_warning(_("Account not found.\n"));
- memset(&tmp_ac, 0, sizeof(PrefsAccount));
- tmp_ac.address = from;
- tmp_ac.smtp_server = server;
- tmp_ac.smtpport = SMTP_PORT;
- val = send_message_smtp(&tmp_ac, to_list, fp);
+ memset(&tmp_ac, 0, sizeof(PrefsAccount));
+ tmp_ac.address = from;
+ tmp_ac.smtp_server = server;
+ tmp_ac.smtpport = SMTP_PORT;
+ val = send_message_smtp(&tmp_ac, to_list, fp);
+ }
+ }
+ if (val == 0 && newsac) {
+ fseek(fp, fpos, SEEK_SET);
+ val = news_post_stream(FOLDER(newsac->folder), fp);
}
}