+2001-08-30
+
+ * version 0.6.0
+
+2001-08-30
+
+ * src/send.c: implemented sending with local sendmail command.
+ send_message_local(): new. It executes command with popen()
+ and send the contents of RFC822 message to the command.
+ * src/prefs_common.[ch]: enabled the external sending command option.
+ * src/defs.h: #define DEFAULT_SENDMAIL_CMD /usr/sbin/sendmail -t
+ * src/account.c: account_edit_create(): widened the protocol column.
+ * src/summaryview.c: summary_set_colorlabel_color(): cleanup of
+ the code.
+
+2001-08-30
+
+ * src/folder.c: folder_item_remove_msg(): scan the folder again
+ if the last message is removed.
+ * src/compose.c: compose_queue(), compose_draft_cb(): remove the
+ old reedited message after adding the new message.
+
2001-08-29
* src/compose.c: compose_queue(): added AID: to the queueing header.
* src/send.c: send_message_queue(): look for AID: header, and use
the server specified in the account instead of SSV: header.
+ * src/summaryview.c
+ src/compose.[ch]: queued messages can be reedited now.
+ compose_remove_reedit_target(): new. It removes the old reedited
+ message.
+ compose_send(), compose_queue(), compose_draft_cb(): if reedit
+ mode, remove the old message.
+ * src/procmsg.c: procmsg_msg_exist(): fixed a bug that output
+ warning.
2001-08-28
+2001-08-30 [paul]
+
+ * configure.in
+ change to version 0.6.0claws
+
+ * sync with sylpheed 0.6.0 release
+
2001-08-30 [christoph]
* configure.in
+2001-08-30
+
+ * version 0.6.0
+
+2001-08-30
+
+ * src/send.c: ¥í¡¼¥«¥ë¤Î sendmail ¥³¥Þ¥ó¥É¤Ë¤è¤ëÁ÷¿®¤ò¼ÂÁõ¡£
+ send_message_local(): ¿·µ¬¡£¥³¥Þ¥ó¥É¤ò popen() ¤Ç¸Æ¤Ó½Ð¤·¡¢
+ RFC822 ¥á¥Ã¥»¡¼¥¸¤ÎÆâÍƤò¥³¥Þ¥ó¥É¤ËÁ÷¿®¤¹¤ë¡£
+ * src/prefs_common.[ch]: ³°ÉôÁ÷¿®¥³¥Þ¥ó¥É¤Î¥ª¥×¥·¥ç¥ó¤ò͸ú¤Ë¤·¤¿¡£
+ * src/defs.h: #define DEFAULT_SENDMAIL_CMD /usr/sbin/sendmail -t
+ * src/account.c: account_edit_create(): ¥×¥í¥È¥³¥ë¹Ô¤ò¹¤²¤¿¡£
+ * src/summaryview.c: summary_set_colorlabel_color(): ¥³¡¼¥É¤ÎÀ°Íý¡£
+
+2001-08-30
+
+ * src/folder.c: folder_item_remove_msg(): ºÇ¸å¤Î¥á¥Ã¥»¡¼¥¸¤¬ºï½ü
+ ¤µ¤ì¤¿¤é¥Õ¥©¥ë¥À¤òºÆ¤Ó¥¹¥¥ã¥ó¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+ * src/compose.c: compose_queue(), compose_draft_cb(): ¿·¤·¤¤¥á¥Ã
+ ¥»¡¼¥¸¤òÄɲä·¤¿¸å¤ËºÆÊÔ½¸ÂоݤΥá¥Ã¥»¡¼¥¸¤òºï½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
2001-08-29
* src/compose.c: compose_queue(): ¥¥å¡¼¥¤¥ó¥°¥Ø¥Ã¥À¤Ë AID: ¤òÄɲá£
* src/send.c: send_message_queue(): AID: ¥Ø¥Ã¥À¤òõ¤·¡¢ SSV: ¤Î
Âå¤ï¤ê¤Ë¥¢¥«¥¦¥ó¥È¤Ç»ØÄꤵ¤ì¤¿¥µ¡¼¥Ð¤ò»ÈÍѤ¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+ * src/summaryview.c
+ src/compose.[ch]: Á÷¿®ÂÔ¤Á¥á¥Ã¥»¡¼¥¸¤òºÆÊÔ½¸²Äǽ¤Ë¤·¤¿¡£
+ compose_remove_reedit_target(): ¿·µ¬¡£¸Å¤¤ºÆÊÔ½¸ÂоݤΥá¥Ã¥»¡¼¥¸
+ ¤òºï½ü¤¹¤ë¡£
+ compose_send(), compose_queue(), compose_draft_cb(): ºÆÊÔ½¸
+ ¥â¡¼¥É¤Î¤È¤¤Ï¡¢¸Å¤¤¥á¥Ã¥»¡¼¥¸¤òºï½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+ * src/procmsg.c: procmsg_msg_exist(): ·Ù¹ð¤ò½ÐÎϤ¹¤ë¥Ð¥°¤ò½¤Àµ¡£
2001-08-28
for built-in image view support, and libcompface for X-Face support.
+If you want to enable SSL support, append the option
+--enable-ssl after ./configure (you need OpenSSL).
+
If you want to enable IPv6 support, append the option
--enable-ipv6 after ./configure.
may not work correctly. I suggest never to use a real key.
Please use sample keys.
+For other options, refer to ./configure --help .
+
If the installation of Sylpheed failed, check all needed libraries are
correctly installed. If it still failed, please send bug report to:
¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£
+SSL Âбþ¤ò͸ú¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ./configure ¤Î¸å¤Ë
+--enable-ssl ¥ª¥×¥·¥ç¥ó¤òÄɲ䷤Ƥ¯¤À¤µ¤¤(OpenSSL ¤¬É¬ÍפǤ¹)¡£
+
IPv6 Âбþ¤ò͸ú¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ./configure ¤Î¸å¤Ë
--enable-ipv6 ¥ª¥×¥·¥ç¥ó¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£
·è¤·¤ÆËÜÅö¤Î¸°¤ò»È¤ï¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¥µ¥ó¥×¥ë¤Î¸°¤ò¤ª»È¤¤¤¯¤À
¤µ¤¤¡£
+¤½¤Î¾¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Ï ./configure --help ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
+
¤â¤· Sylpheed ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë¼ºÇÔ¤·¤¿¤é¡¢É¬Íפʥ饤¥Ö¥é¥ê¤¬Àµ¤·¤¯
¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤Ç¤âÂÌÌܤʾì¹ç¡¢
o speed-up of filtering
o regular expression support at filtering
o LDAP support
-o parallel processing between sending-receiving and others
o support for some formats other than MH and mbox (ex. Maildir)
o priority (Priority:, X-Priority:, X-MSMail-Priority:)
o notification of reception (Disposition-Notification-To:)
o configuration for each folders
o RFC 2231 (MIME filename encoding) compliant
o virtual folder
-o SSL support
-o GNOME support
o console mode interface
o plug-in faculty
o mailing list manager
o inline image display on multipart MIME
o compressed folder
+o GNOME support
o make the code cleaner
o make the process faster
o make the dubious English much decent :)
. drag and drop
. full internationalization
. autowrap / wordwrap
-. IMAP4 support
. PGP/GPG support
. display of HTML messages (composition of HTML message is not scheduled :-P)
. progress display of time-consuming processes
-. modification of display color
+. parallel processing between sending-receiving and others
Implemented features
====================
* completion of mail address
* prohibition of multiple execution (with Unix domain socket)
* periodical check of newly arrived mails
+* modification of display color
* designate the displayed headers
* user-defined headers
+* IMAP4 support
* list view of newsgroups and subscription of groups from there
+* SSL support
o ¿¶¤êʬ¤±½èÍý¤Î¶¯²½
o ¿¶¤êʬ¤±¤ÇÀµµ¬É½¸½¤ËÂбþ¤¹¤ë
o LDAPÂбþ
-o Á÷¼õ¿®¤È¤½¤ì°Ê³°¤È¤ÎʹԽèÍý
o MH, mbox °Ê³°¤Î·Á¼°¤Ø¤ÎÂбþ(Maildir Åù)
o ½ÅÍ×ÅÙ (Priority:, X-Priority:, X-MSMail-Priority:)
o ¼õ¿®³Îǧ (Disposition-Notification-To:)
o ¥Õ¥©¥ë¥ÀËè¤ÎÀßÄê
o RFC 2231 (MIME ¥Õ¥¡¥¤¥ë̾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°) Âбþ
o ²¾ÁÛ¥Õ¥©¥ë¥À
-o SSLÂбþ
-o GNOMEÂбþ
o ¥³¥ó¥½¡¼¥ë¥â¡¼¥É¥¤¥ó¥¿¥Õ¥§¡¼¥¹
o ¥×¥é¥°¥¤¥óµ¡Ç½
o ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¥Þ¥Í¡¼¥¸¥ã
o ¥Þ¥ë¥Á¥Ñ¡¼¥ÈMIME¤Ç¤Î¥¤¥ó¥é¥¤¥ó²èÁüɽ¼¨
o °µ½Ì¥Õ¥©¥ë¥À
+o GNOMEÂбþ
o ¥³¡¼¥É¤ò¤µ¤é¤Ë¤¤ì¤¤¤Ë¤¹¤ë
o ½èÍý¤ò¤µ¤é¤Ë®¤¯¤¹¤ë
o ²ø¤·¤²¤Ê±Ñ¸ì¤ò¤Ê¤ó¤È¤«¤¹¤ë :)
. ¥É¥é¥Ã¥° & ¥É¥í¥Ã¥×
. ´°Á´¤Ê¹ñºÝ²½
. ¼«Æ°²þ¹Ô / ¥ï¡¼¥É¥é¥Ã¥×
-. IMAP4Âбþ
. PGP/GPGÂбþ
. HTML¥á¡¼¥ë¤Îɽ¼¨ (HTML¥á¡¼¥ë¤ÎºîÀ®¤ÏͽÄê¤Ê¤·:-P)
. »þ´Ö¤¬³Ý¤«¤ë½èÍý¤Î¿ÊĽ¾õ¶·É½¼¨
-. ɽ¼¨¿§¤ÎÊѹ¹
+. Á÷¼õ¿®¤È¤½¤ì°Ê³°¤È¤ÎʹԽèÍý
¼ÂÁõºÑ¤Îµ¡Ç½
============
* ¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÎÊä´°
* Æó½Åµ¯Æ°ËÉ»ß (with Unix domain socket)
* ¿·Ãå¥á¡¼¥ë¤ÎÄê´üŪ¥Á¥§¥Ã¥¯
+* ɽ¼¨¿§¤ÎÊѹ¹
* ɽ¼¨¤µ¤ì¤ë¥Ø¥Ã¥À¤Î»ØÄê
* ¥æ¡¼¥¶ÄêµÁ¤Î¥Ø¥Ã¥À
+* IMAP4Âбþ
* ¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤Î¥ê¥¹¥Èɽ¼¨¤È¤½¤³¤«¤é¤Î¹ØÆÉ¥°¥ë¡¼¥×ÄɲÃ
+* SSLÂбþ
dnl version number
MAJOR_VERSION=0
-MINOR_VERSION=5
-MICRO_VERSION=3
+MINOR_VERSION=6
+MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws6
+EXTRA_VERSION=claws
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl
gtk_clist_set_column_width (GTK_CLIST(clist), COL_DEFAULT , 10);
gtk_clist_set_column_width (GTK_CLIST(clist), COL_GETALL , 10);
gtk_clist_set_column_width (GTK_CLIST(clist), COL_NAME , 100);
- gtk_clist_set_column_width (GTK_CLIST(clist), COL_PROTOCOL, 70);
+ gtk_clist_set_column_width (GTK_CLIST(clist), COL_PROTOCOL, 100);
gtk_clist_set_column_width (GTK_CLIST(clist), COL_SERVER , 100);
gtk_clist_set_selection_mode (GTK_CLIST(clist), GTK_SELECTION_BROWSE);
const gchar *file);
static gint compose_save_to_outbox (Compose *compose,
const gchar *file);
+static gint compose_remove_reedit_target (Compose *compose);
static gint compose_queue (Compose *compose,
const gchar *file);
static void compose_write_attach (Compose *compose,
g_return_if_fail(account != NULL);
compose = compose_create(account);
- compose->mode = COMPOSE_REEDIT_DRAFT;
+ compose->mode = COMPOSE_REEDIT;
+
compose->targetinfo = procmsg_msginfo_copy(msginfo);
if (compose_parse_header(compose, msginfo) < 0) return;
hentry[H_CC].body = NULL;
}
if (hentry[H_REFERENCES].body != NULL) {
- if (compose->mode == COMPOSE_REEDIT_DRAFT)
+ if (compose->mode == COMPOSE_REEDIT)
compose->references = hentry[H_REFERENCES].body;
else {
compose->references = compose_parse_references
hentry[H_REFERENCES].body = NULL;
}
if (hentry[H_BCC].body != NULL) {
- if (compose->mode == COMPOSE_REEDIT_DRAFT) {
+ if (compose->mode == COMPOSE_REEDIT) {
conv_unmime_header_overwrite(hentry[H_BCC].body);
compose->bcc = hentry[H_BCC].body;
} else
hentry[H_FOLLOWUP_TO].body = NULL;
}
- if (compose->mode == COMPOSE_REEDIT_DRAFT && msginfo->inreplyto)
+ if (compose->mode == COMPOSE_REEDIT && msginfo->inreplyto)
compose->inreplyto = g_strdup(msginfo->inreplyto);
- else if (compose->mode != COMPOSE_REEDIT_DRAFT &&
+ else if (compose->mode != COMPOSE_REEDIT &&
msginfo->msgid && *msginfo->msgid) {
compose->inreplyto = g_strdup(msginfo->msgid);
}
} else
alertpanel_error(_("Error occurred while sending the message."));
+ } else {
+ if (compose->mode == COMPOSE_REEDIT) {
+ compose_remove_reedit_target(compose);
+ if (compose->targetinfo)
+ folderview_update_item
+ (compose->targetinfo->folder, TRUE);
+ }
}
/* save message to outbox */
return 0;
}
+static gint compose_remove_reedit_target(Compose *compose)
+{
+ FolderItem *item;
+ MsgInfo *msginfo = compose->targetinfo;
+
+ g_return_val_if_fail(compose->mode == COMPOSE_REEDIT, -1);
+ if (!msginfo) return -1;
+
+ item = msginfo->folder;
+ g_return_val_if_fail(item != NULL, -1);
+
+ folder_item_scan(item);
+ if (procmsg_msg_exist(msginfo) &&
+ (item->stype == F_DRAFT || item->stype == F_QUEUE)) {
+ if (folder_item_remove_msg(item, msginfo->msgnum) < 0) {
+ g_warning(_("can't remove the old message\n"));
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
static gint compose_queue(Compose *compose, const gchar *file)
{
FolderItem *queue;
}
queue = folder_get_default_queue();
+
folder_item_scan(queue);
queue_path = folder_item_get_path(queue);
if (!is_dir_exist(queue_path))
}
g_free(tmp);
+ if (compose->mode == COMPOSE_REEDIT) {
+ compose_remove_reedit_target(compose);
+ if (compose->targetinfo &&
+ compose->targetinfo->folder != queue)
+ folderview_update_item
+ (compose->targetinfo->folder, TRUE);
+ }
+
if ((fp = procmsg_open_mark_file(queue_path, TRUE)) == NULL)
g_warning(_("can't open mark file\n"));
else {
gchar *tmp;
draft = folder_get_default_draft();
- folder_item_scan(draft);
- if (procmsg_msg_exist(compose->targetinfo) &&
- compose->targetinfo->folder == draft) {
- if (folder_item_remove_msg(draft,
- compose->targetinfo->msgnum) < 0)
- g_warning(_("can't remove the old draft message\n"));
- }
- tmp = g_strdup_printf("%s%cdraft.%d", g_get_tmp_dir(),
+ tmp = g_strdup_printf("%s%cdraft.%d", g_get_tmp_dir(),
G_DIR_SEPARATOR, (gint)compose);
if (compose_write_to_file(compose, tmp, TRUE) < 0) {
return;
}
+ folder_item_scan(draft);
if (folder_item_add_msg(draft, tmp, TRUE) < 0) {
unlink(tmp);
g_free(tmp);
return;
}
-
g_free(tmp);
- /* folderview_scan_folder_a(DRAFT_DIR, TRUE); */
+ if (compose->mode == COMPOSE_REEDIT) {
+ compose_remove_reedit_target(compose);
+ if (compose->targetinfo &&
+ compose->targetinfo->folder != draft)
+ folderview_update_item(compose->targetinfo->folder,
+ TRUE);
+ }
+
+ folder_item_scan(draft);
+ folderview_update_item(draft, TRUE);
gtk_widget_destroy(compose->window);
}
COMPOSE_FORWARD,
COMPOSE_FORWARD_AS_ATTACH,
COMPOSE_NEW,
- COMPOSE_REEDIT_DRAFT
+ COMPOSE_REEDIT
} ComposeReplyMode;
struct _Compose
#define DEFAULT_INC_PROGRAM "inc"
/* #define DEFAULT_INC_PATH "/usr/bin/imget" */
/* #define DEFAULT_INC_PROGRAM "imget" */
+#define DEFAULT_SENDMAIL_CMD "/usr/sbin/sendmail -t"
#ifdef _PATH_MAILDIR
# define DEFAULT_SPOOL_PATH _PATH_MAILDIR
gint folder_item_remove_msg(FolderItem *item, gint num)
{
Folder *folder;
- gint result;
+ gint ret;
g_return_val_if_fail(item != NULL, -1);
folder = item->folder;
-
- g_return_val_if_fail(folder->scan != NULL, -1);
- g_return_val_if_fail(folder->remove_msg != NULL, -1);
-
- if (folder->finished_remove)
- folder->finished_remove(folder, item);
-
- result = folder->remove_msg(folder, item, num);
-
if (item->last_num < 0) folder->scan(folder, item);
- if (result == 0){
- if (folder->finished_remove)
- folder->finished_remove(folder, item);
- }
+ ret = folder->remove_msg(folder, item, num);
+ if (ret == 0 && num == item->last_num)
+ folder->scan(folder, item);
- return result;
+ return ret;
}
gint folder_item_remove_all_msg(FolderItem *item)
g_return_if_fail(item != NULL);
+ debug_print("mh_scan_folder(): Scanning %s ...\n", item->path);
+
path = folder_item_get_path(item);
g_return_if_fail(path != NULL);
if (change_dir(path) < 0) {
} receive;
static struct Send {
- GtkWidget *checkbtn_sendext;
- GtkWidget *entry_sendext;
- GtkWidget *button_sendext;
+ GtkWidget *checkbtn_extsend;
+ GtkWidget *entry_extsend;
+ GtkWidget *button_extsend;
GtkWidget *checkbtn_savemsg;
GtkWidget *checkbtn_queuemsg;
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
/* Send */
- {"use_ext_send", "FALSE", &prefs_common.use_extsend, P_BOOL,
- &send.checkbtn_sendext,
+ {"use_ext_sendmail", "FALSE", &prefs_common.use_extsend, P_BOOL,
+ &send.checkbtn_extsend,
prefs_set_data_from_toggle, prefs_set_toggle},
- {"ext_send_path", NULL, &prefs_common.extsend_path, P_STRING,
- &send.entry_sendext, prefs_set_data_from_entry, prefs_set_entry},
+ {"ext_sendmail_cmd", DEFAULT_SENDMAIL_CMD,
+ &prefs_common.extsend_cmd, P_STRING,
+ &send.entry_extsend, prefs_set_data_from_entry, prefs_set_entry},
{"save_message", "TRUE", &prefs_common.savemsg, P_BOOL,
&send.checkbtn_savemsg,
prefs_set_data_from_toggle, prefs_set_toggle},
GtkWidget *hbox;
GtkWidget *label_incext;
GtkWidget *entry_incext;
- GtkWidget *button_incext;
+ /* GtkWidget *button_incext; */
GtkWidget *frame_spool;
GtkWidget *checkbtn_local;
entry_incext = gtk_entry_new ();
gtk_widget_show (entry_incext);
gtk_box_pack_start (GTK_BOX (hbox), entry_incext, TRUE, TRUE, 0);
-
+#if 0
button_incext = gtk_button_new_with_label ("... ");
-
gtk_widget_show (button_incext);
gtk_box_pack_start (GTK_BOX (hbox), button_incext, FALSE, FALSE, 0);
-
+#endif
PACK_FRAME(vbox1, frame_spool, _("Local spool"));
vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
receive.checkbtn_incext = checkbtn_incext;
receive.entry_incext = entry_incext;
- receive.button_incext = button_incext;
+ /* receive.button_incext = button_incext; */
receive.checkbtn_local = checkbtn_local;
receive.checkbtn_filter_on_inc = checkbtn_filter_on_inc;
{
GtkWidget *vbox1;
GtkWidget *vbox2;
- GtkWidget *frame_sendext;
- GtkWidget *vbox_sendext;
- GtkWidget *checkbtn_sendext;
+ GtkWidget *frame_extsend;
+ GtkWidget *vbox_extsend;
+ GtkWidget *checkbtn_extsend;
GtkWidget *hbox1;
- GtkWidget *label_sendext;
- GtkWidget *entry_sendext;
- GtkWidget *button_sendext;
+ GtkWidget *label_extsend;
+ GtkWidget *entry_extsend;
+ /* GtkWidget *button_extsend; */
GtkWidget *checkbtn_savemsg;
GtkWidget *checkbtn_queuemsg;
GtkWidget *label_outcharset;
gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
- PACK_FRAME(vbox1, frame_sendext, _("External program"));
-
- gtk_widget_set_sensitive(frame_sendext, FALSE);
+ PACK_FRAME(vbox1, frame_extsend, _("External program"));
- vbox_sendext = gtk_vbox_new (FALSE, VSPACING_NARROW);
- gtk_widget_show (vbox_sendext);
- gtk_container_add (GTK_CONTAINER (frame_sendext), vbox_sendext);
- gtk_container_set_border_width (GTK_CONTAINER (vbox_sendext), 8);
+ vbox_extsend = gtk_vbox_new (FALSE, VSPACING_NARROW);
+ gtk_widget_show (vbox_extsend);
+ gtk_container_add (GTK_CONTAINER (frame_extsend), vbox_extsend);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox_extsend), 8);
- PACK_CHECK_BUTTON (vbox_sendext, checkbtn_sendext,
+ PACK_CHECK_BUTTON (vbox_extsend, checkbtn_extsend,
_("Use external program for sending"));
hbox1 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_sendext), hbox1, FALSE, FALSE, 0);
- SET_TOGGLE_SENSITIVITY(checkbtn_sendext, hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox_extsend), hbox1, FALSE, FALSE, 0);
+ SET_TOGGLE_SENSITIVITY(checkbtn_extsend, hbox1);
- label_sendext = gtk_label_new (_("Program path"));
- gtk_widget_show (label_sendext);
- gtk_box_pack_start (GTK_BOX (hbox1), label_sendext, FALSE, FALSE, 0);
+ label_extsend = gtk_label_new (_("Program path"));
+ gtk_widget_show (label_extsend);
+ gtk_box_pack_start (GTK_BOX (hbox1), label_extsend, FALSE, FALSE, 0);
- entry_sendext = gtk_entry_new ();
- gtk_widget_show (entry_sendext);
- gtk_box_pack_start (GTK_BOX (hbox1), entry_sendext, TRUE, TRUE, 0);
+ entry_extsend = gtk_entry_new ();
+ gtk_widget_show (entry_extsend);
+ gtk_box_pack_start (GTK_BOX (hbox1), entry_extsend, TRUE, TRUE, 0);
- button_sendext = gtk_button_new_with_label ("... ");
- gtk_widget_show (button_sendext);
- gtk_box_pack_start (GTK_BOX (hbox1), button_sendext, FALSE, FALSE, 0);
+#if 0
+ button_extsend = gtk_button_new_with_label ("... ");
+ gtk_widget_show (button_extsend);
+ gtk_box_pack_start (GTK_BOX (hbox1), button_extsend, FALSE, FALSE, 0);
+#endif
vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
gtk_widget_show (vbox2);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu), optmenu_menu);
- send.checkbtn_sendext = checkbtn_sendext;
- send.entry_sendext = entry_sendext;
- send.button_sendext = button_sendext;
+ send.checkbtn_extsend = checkbtn_extsend;
+ send.entry_extsend = entry_extsend;
+ /* send.button_extsend = button_extsend; */
send.checkbtn_savemsg = checkbtn_savemsg;
send.checkbtn_queuemsg = checkbtn_queuemsg;
/* Send */
gboolean use_extsend;
- gchar *extsend_path;
+ gchar *extsend_cmd;
gboolean savemsg;
gboolean queue_msg;
gchar *outgoing_charset;
if (!msginfo) return FALSE;
- path = procmsg_get_message_file_path(msginfo);
+ path = folder_item_get_path(msginfo->folder);
change_dir(path);
ret = !folder_item_is_msg_changed(msginfo->folder, msginfo);
g_free(path);
#include "ssl.h"
#include "smtp.h"
#include "esmtp.h"
+#include "prefs_common.h"
#include "prefs_account.h"
#include "account.h"
#include "compose.h"
gboolean cancelled;
};
+static gint send_message_local (const gchar *command, FILE *fp);
+
#if USE_SSL
static gint send_message_smtp (GSList *to_list, const gchar *from,
const gchar *server, gushort port,
static void send_progress_dialog_destroy(SendProgressDialog *dialog);
static void send_cancel(GtkWidget *widget, gpointer data);
-static gint send_message_with_command(GSList *to_list, gchar * mailcmd,
- FILE * fp);
-
gint send_message(const gchar *file, PrefsAccount *ac_prefs, GSList *to_list)
{
FILE *fp;
return -1;
}
- if (ac_prefs->protocol == A_LOCAL && ac_prefs->use_mail_command) {
- val = send_message_with_command(to_list,
- ac_prefs->mail_command,
- fp);
- } else {
+ if (prefs_common.use_extsend && prefs_common.extsend_cmd) {
+ val = send_message_local(prefs_common.extsend_cmd, fp);
+ fclose(fp);
+ return val;
+ }
+
#if USE_SSL
port = ac_prefs->set_smtpport ? ac_prefs->smtpport :
ac_prefs->ssl_smtp == SSL_SMTP_TUNNEL ? SSMTP_PORT : SMTP_PORT;
ac_prefs->userid, ac_prefs->passwd,
ac_prefs->use_smtp_auth, fp);
#endif
- }
fclose(fp);
return val;
Q_ACCOUNT_ID = 3
};
-static gint send_message_with_command(GSList *to_list, gchar * mailcmd,
- FILE * fp)
-{
- FILE * p;
- int len;
- gchar * cmdline;
- GSList *cur;
- gchar buf[BUFFSIZE];
-
- len = strlen(mailcmd);
- for (cur = to_list; cur != NULL; cur = cur->next)
- len += strlen((gchar *)cur->data) + 1;
-
- cmdline = g_new(gchar, len + 1);
- strcpy(cmdline, mailcmd);
-
- for (cur = to_list; cur != NULL; cur = cur->next) {
- cmdline = strncat(cmdline, " ", len);
- cmdline = strncat(cmdline, (gchar *)cur->data, len);
- }
-
- log_message(_("Using command to send mail: %s ...\n"), cmdline);
-
- p = popen(cmdline, "w");
- if (p != NULL) {
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- strretchomp(buf);
-
- /* escape when a dot appears on the top */
- if (buf[0] == '.')
- fputs(".", p);
-
- fputs(buf, p);
- fputs("\n", p);
- }
- pclose(p);
- }
-
- log_message(_("Mail sent successfully ...\n"));
-
- return 0;
-}
-
gint send_message_queue(const gchar *file)
{
static HeaderEntry qentry[] = {{"S:", NULL, FALSE},
if (!to_list || !from) {
g_warning(_("Queued message header is broken.\n"));
val = -1;
+ } else if (prefs_common.use_extsend && prefs_common.extsend_cmd) {
+ val = send_message_local(prefs_common.extsend_cmd, fp);
} else {
gushort port;
gchar *domain;
return val;
}
+static gint send_message_local(const gchar *command, FILE *fp)
+{
+ FILE *pipefp;
+ gchar buf[BUFFSIZE];
+
+ g_return_val_if_fail(command != NULL, -1);
+ g_return_val_if_fail(fp != NULL, -1);
+
+ pipefp = popen(command, "w");
+ if (!pipefp) {
+ g_warning(_("Can't execute external command: %s\n"), command);
+ return -1;
+ }
+
+ while (fgets(buf, sizeof(buf), fp) != NULL) {
+ strretchomp(buf);
+ /* escape when a dot appears on the top */
+ if (buf[0] == '.')
+ fputc('.', pipefp);
+ fputs(buf, pipefp);
+ fputc('\n', pipefp);
+ }
+
+ pclose(pipefp);
+
+ return 0;
+}
+
#define EXIT_IF_CANCELLED() \
{ \
if (dialog->cancelled) { \
MsgInfo *msginfo;
gint color_index;
+ msginfo = gtk_ctree_node_get_row_data(ctree, node);
+ MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_CLABEL_FLAG_MASK);
+ MSG_SET_COLORLABEL_VALUE(msginfo->flags, labelcolor);
+
color_index = labelcolor == 0 ? -1 : (gint)labelcolor - 1;
ctree_style = gtk_widget_get_style(GTK_WIDGET(ctree));
prev_style = gtk_ctree_node_get_row_style(ctree, node);
- if (!prev_style)
- prev_style = ctree_style;
- style = gtk_style_copy(prev_style);
if (color_index < 0 || color_index >= N_COLOR_LABELS) {
- color_index = 0;
- color.red = ctree_style->fg[GTK_STATE_NORMAL].red;
- color.green = ctree_style->fg[GTK_STATE_NORMAL].green;
- color.blue = ctree_style->fg[GTK_STATE_NORMAL].blue;
+ if (!prev_style) return;
+ style = gtk_style_copy(prev_style);
+ color = ctree_style->fg[GTK_STATE_NORMAL];
style->fg[GTK_STATE_NORMAL] = color;
-
- color.red = ctree_style->fg[GTK_STATE_SELECTED].red;
- color.green = ctree_style->fg[GTK_STATE_SELECTED].green;
- color.blue = ctree_style->fg[GTK_STATE_SELECTED].blue;
+ color = ctree_style->fg[GTK_STATE_SELECTED];
style->fg[GTK_STATE_SELECTED] = color;
- gtk_ctree_node_set_row_style(ctree, node, style);
- } else
+ } else {
+ if (prev_style)
+ style = gtk_style_copy(prev_style);
+ else
+ style = gtk_style_copy(ctree_style);
color = colorlabel_get_color(color_index);
-
- msginfo = gtk_ctree_node_get_row_data(ctree, node);
-
- MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_CLABEL_FLAG_MASK);
- MSG_SET_COLORLABEL_VALUE(msginfo->flags, labelcolor);
-
- if (style) {
style->fg[GTK_STATE_NORMAL] = color;
style->fg[GTK_STATE_SELECTED] = color;
- gtk_ctree_node_set_row_style(ctree, node, style);
}
+
+ gtk_ctree_node_set_row_style(ctree, node, style);
}
void summary_set_colorlabel(SummaryView *summaryview, guint labelcolor,