sync with sylpheed 0.6.0 release
authorPaul Mangan <paul@claws-mail.org>
Thu, 30 Aug 2001 12:59:38 +0000 (12:59 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 30 Aug 2001 12:59:38 +0000 (12:59 +0000)
19 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
INSTALL
INSTALL.jp
TODO
TODO.jp
configure.in
src/account.c
src/compose.c
src/compose.h
src/defs.h
src/folder.c
src/mh.c
src/prefs_common.c
src/prefs_common.h
src/procmsg.c
src/send.c
src/summaryview.c

index 03fe8c5..8d3ded8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,38 @@
+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
 
index 1c1afea..ebaf16c 100644 (file)
@@ -1,3 +1,10 @@
+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
index 54434e1..59d1ca1 100644 (file)
@@ -1,8 +1,36 @@
+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
 
diff --git a/INSTALL b/INSTALL
index 14ed9d9..ea1b45b 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -89,6 +89,9 @@ I recommend you to install gdk-pixbuf or gdk_imlib library before installing
 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.
 
@@ -104,6 +107,8 @@ WARNING: the GnuPG support is still in the development stage, and it
          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:
index 87b0071..b12c5b9 100644 (file)
@@ -89,6 +89,9 @@ Password: [
 ¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£
 
 
+SSL Âбþ¤òÍ­¸ú¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ./configure ¤Î¸å¤Ë
+--enable-ssl ¥ª¥×¥·¥ç¥ó¤òÄɲ䷤Ƥ¯¤À¤µ¤¤(OpenSSL ¤¬É¬ÍפǤ¹)¡£
+
 IPv6 Âбþ¤òÍ­¸ú¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ./configure ¤Î¸å¤Ë
 --enable-ipv6 ¥ª¥×¥·¥ç¥ó¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£
 
@@ -104,6 +107,8 @@ GnuPG 
       ·è¤·¤ÆËÜÅö¤Î¸°¤ò»È¤ï¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¥µ¥ó¥×¥ë¤Î¸°¤ò¤ª»È¤¤¤¯¤À
       ¤µ¤¤¡£
 
+¤½¤Î¾¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Ï ./configure --help ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
+
 
 ¤â¤· Sylpheed ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë¼ºÇÔ¤·¤¿¤é¡¢É¬Íפʥ饤¥Ö¥é¥ê¤¬Àµ¤·¤¯
 ¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤Ç¤âÂÌÌܤʾì¹ç¡¢
diff --git a/TODO b/TODO
index e8bf552..6b81b93 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,7 +11,6 @@ o template function
 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:)
@@ -20,13 +19,12 @@ o customization of toolbar
 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 :)
@@ -38,11 +36,10 @@ Partially implemented features
 . 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
 ====================
@@ -64,6 +61,9 @@ 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
diff --git a/TODO.jp b/TODO.jp
index 2b5c506..be91377 100644 (file)
--- a/TODO.jp
+++ b/TODO.jp
@@ -11,7 +11,6 @@ o 
 o ¿¶¤êʬ¤±½èÍý¤Î¶¯²½
 o ¿¶¤êʬ¤±¤ÇÀµµ¬É½¸½¤ËÂбþ¤¹¤ë
 o LDAPÂбþ
-o Á÷¼õ¿®¤È¤½¤ì°Ê³°¤È¤ÎʹԽèÍý
 o MH, mbox °Ê³°¤Î·Á¼°¤Ø¤ÎÂбþ(Maildir Åù)
 o ½ÅÍ×ÅÙ (Priority:, X-Priority:, X-MSMail-Priority:)
 o ¼õ¿®³Îǧ (Disposition-Notification-To:)
@@ -20,13 +19,12 @@ o 
 o ¥Õ¥©¥ë¥ÀËè¤ÎÀßÄê
 o RFC 2231 (MIME ¥Õ¥¡¥¤¥ë̾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°) Âбþ
 o ²¾ÁÛ¥Õ¥©¥ë¥À
-o SSLÂбþ
-o GNOMEÂбþ
 o ¥³¥ó¥½¡¼¥ë¥â¡¼¥É¥¤¥ó¥¿¥Õ¥§¡¼¥¹
 o ¥×¥é¥°¥¤¥óµ¡Ç½
 o ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¥Þ¥Í¡¼¥¸¥ã
 o ¥Þ¥ë¥Á¥Ñ¡¼¥ÈMIME¤Ç¤Î¥¤¥ó¥é¥¤¥ó²èÁüɽ¼¨
 o °µ½Ì¥Õ¥©¥ë¥À
+o GNOMEÂбþ
 o ¥³¡¼¥É¤ò¤µ¤é¤Ë¤­¤ì¤¤¤Ë¤¹¤ë
 o ½èÍý¤ò¤µ¤é¤Ë®¤¯¤¹¤ë
 o ²ø¤·¤²¤Ê±Ñ¸ì¤ò¤Ê¤ó¤È¤«¤¹¤ë :)
@@ -38,11 +36,10 @@ o 
 . ¥É¥é¥Ã¥° & ¥É¥í¥Ã¥×
 . ´°Á´¤Ê¹ñºÝ²½
 . ¼«Æ°²þ¹Ô / ¥ï¡¼¥É¥é¥Ã¥×
-. IMAP4Âбþ
 . PGP/GPGÂбþ
 . HTML¥á¡¼¥ë¤Îɽ¼¨ (HTML¥á¡¼¥ë¤ÎºîÀ®¤ÏͽÄê¤Ê¤·:-P)
 . »þ´Ö¤¬³Ý¤«¤ë½èÍý¤Î¿ÊĽ¾õ¶·É½¼¨
-. É½¼¨¿§¤ÎÊѹ¹
+. Á÷¼õ¿®¤È¤½¤ì°Ê³°¤È¤ÎʹԽèÍý
 
 ¼ÂÁõºÑ¤Îµ¡Ç½
 ============
@@ -65,6 +62,9 @@ o 
 * ¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÎÊä´°
 * Æó½Åµ¯Æ°Ëɻߠ(with Unix domain socket)
 * ¿·Ãå¥á¡¼¥ë¤ÎÄê´üŪ¥Á¥§¥Ã¥¯
+* É½¼¨¿§¤ÎÊѹ¹
 * É½¼¨¤µ¤ì¤ë¥Ø¥Ã¥À¤Î»ØÄê
 * ¥æ¡¼¥¶ÄêµÁ¤Î¥Ø¥Ã¥À
+* IMAP4Âбþ
 * ¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤Î¥ê¥¹¥Èɽ¼¨¤È¤½¤³¤«¤é¤Î¹ØÆÉ¥°¥ë¡¼¥×ÄɲÃ
+* SSLÂбþ
index 3528c29..4cabddc 100644 (file)
@@ -4,11 +4,11 @@ PACKAGE=sylpheed
 
 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
index 409d281..db774b6 100644 (file)
@@ -461,7 +461,7 @@ static void account_edit_create(void)
        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);
 
index 38f2224..e0cfea7 100644 (file)
@@ -171,6 +171,7 @@ static gint compose_write_body_to_file              (Compose        *compose,
                                                 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,
@@ -1090,7 +1091,8 @@ void compose_reedit(MsgInfo *msginfo)
        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;
@@ -1186,7 +1188,7 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
                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
@@ -1196,7 +1198,7 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
                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
@@ -1213,9 +1215,9 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
                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);
 
@@ -2108,6 +2110,13 @@ gint compose_send(Compose *compose)
                        }
                } 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 */
@@ -2323,6 +2332,29 @@ static gint compose_save_to_outbox(Compose *compose, const gchar *file)
        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;
@@ -2407,6 +2439,7 @@ static gint compose_queue(Compose *compose, const gchar *file)
        }
 
        queue = folder_get_default_queue();
+
        folder_item_scan(queue);
        queue_path = folder_item_get_path(queue);
        if (!is_dir_exist(queue_path))
@@ -2420,6 +2453,14 @@ static gint compose_queue(Compose *compose, const gchar *file)
        }
        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 {
@@ -4424,15 +4465,8 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
        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) {
@@ -4440,15 +4474,24 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
                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);
 }
index 6418862..1ae1817 100644 (file)
@@ -61,7 +61,7 @@ typedef enum
        COMPOSE_FORWARD,
        COMPOSE_FORWARD_AS_ATTACH,
        COMPOSE_NEW,
-       COMPOSE_REEDIT_DRAFT
+       COMPOSE_REEDIT
 } ComposeReplyMode;
 
 struct _Compose
index a67922a..294af68 100644 (file)
@@ -68,6 +68,7 @@
 #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
index df28f26..3f47754 100644 (file)
@@ -798,28 +798,18 @@ gint folder_item_copy_msgs_with_dest(FolderItem *dest, GSList *msglist)
 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)
index 0ff17be..ae10a65 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -622,6 +622,8 @@ void mh_scan_folder(Folder *folder, 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) {
index a9008a0..b9ff701 100644 (file)
@@ -80,9 +80,9 @@ static struct Receive {
 } 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;
@@ -265,11 +265,12 @@ static PrefParam param[] = {
         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},
@@ -813,7 +814,7 @@ static void prefs_receive_create(void)
        GtkWidget *hbox;
        GtkWidget *label_incext;
        GtkWidget *entry_incext;
-       GtkWidget *button_incext;
+       /* GtkWidget *button_incext; */
 
        GtkWidget *frame_spool;
        GtkWidget *checkbtn_local;
@@ -865,12 +866,11 @@ static void prefs_receive_create(void)
        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);
@@ -968,7 +968,7 @@ static void prefs_receive_create(void)
 
        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;
@@ -991,13 +991,13 @@ static void prefs_send_create(void)
 {
        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;
@@ -1011,34 +1011,34 @@ static void prefs_send_create(void)
        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);
@@ -1104,9 +1104,9 @@ static void prefs_send_create(void)
 
        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;
index 30aee90..0451c85 100644 (file)
@@ -55,7 +55,7 @@ struct _PrefsCommon
 
        /* Send */
        gboolean use_extsend;
-       gchar *extsend_path;
+       gchar *extsend_cmd;
        gboolean savemsg;
        gboolean queue_msg;
        gchar *outgoing_charset;
index a22c92e..7f2b29f 100644 (file)
@@ -630,7 +630,7 @@ gboolean procmsg_msg_exist(MsgInfo *msginfo)
 
        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);
index 1d6c8bf..5966442 100644 (file)
@@ -39,6 +39,7 @@
 #include "ssl.h"
 #include "smtp.h"
 #include "esmtp.h"
+#include "prefs_common.h"
 #include "prefs_account.h"
 #include "account.h"
 #include "compose.h"
@@ -63,6 +64,8 @@ struct _SendProgressDialog
        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,
@@ -86,9 +89,6 @@ static SendProgressDialog *send_progress_dialog_create(void);
 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;
@@ -105,11 +105,12 @@ gint send_message(const gchar *file, PrefsAccount *ac_prefs, GSList *to_list)
                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;
@@ -130,7 +131,6 @@ gint send_message(const gchar *file, PrefsAccount *ac_prefs, GSList *to_list)
                                ac_prefs->userid, ac_prefs->passwd,
                                ac_prefs->use_smtp_auth, fp);
 #endif
-       }
 
        fclose(fp);
        return val;
@@ -144,49 +144,6 @@ enum
        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},
@@ -234,6 +191,8 @@ gint send_message_queue(const gchar *file)
        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;
@@ -289,6 +248,34 @@ gint send_message_queue(const gchar *file)
        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) { \
index 27158e0..81b6faa 100644 (file)
@@ -3471,38 +3471,32 @@ void summary_set_colorlabel_color(GtkCTree *ctree, GtkCTreeNode *node,
        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,