sync with 0.7.4cvs24
authorPaul Mangan <paul@claws-mail.org>
Fri, 29 Mar 2002 07:23:03 +0000 (07:23 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 29 Mar 2002 07:23:03 +0000 (07:23 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/compose.c
src/esmtp.c
src/folderview.c

index 154bb65..070999c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-03-29
+
+       * src/esmtp.c: esmtp_auth(): fixed a bug that some garbages are
+         shown after the decoded challenge string. Fixed a memory leak.
+         Removed strtok().
+       * src/compose.c: compose_draft_cb(): mark draft messages as read.
+       * src/folderview.c: folderview_update_node(): disable emphasis
+         for Outbox and Draft folders.
+
 2002-03-28
 
        * src/messageview.c: messageview_show(): fixed a memory leak.
index e60fa08..43d4dda 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-29 [paul]      0.7.4claws53
+
+       * sync with 0.7.4cvs24
+               see ChangeLog entry 2002-03-29
+
 2002-03-28 [paul]      0.7.4claws52
 
        * sync with 0.7.4cvs23
index 3bb7efd..d86e73e 100644 (file)
@@ -1,3 +1,12 @@
+2002-03-29
+
+       * src/esmtp.c: esmtp_auth(): ¥Ç¥³¡¼¥É¤µ¤ì¤¿¥Á¥ã¥ì¥ó¥¸Ê¸»úÎó¤Î¸å¤Ë
+         ¥´¥ß¤¬É½¼¨¤µ¤ì¤ë¥Ð¥°¤ò½¤Àµ¡£¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£ strtok() ¤òºï½ü¡£
+       * src/compose.c: compose_draft_cb(): Áð¹Æ¥á¥Ã¥»¡¼¥¸¤ò´ûÆɤȤ·¤Æ
+         ¥Þ¡¼¥¯¡£
+       * src/folderview.c: folderview_update_node(): Á÷¿®¹µ¤ÈÁð¹Æ¥Õ¥©¥ë¥À
+         ¤Î¶¯Ä´¤ò¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+
 2002-03-28
 
        * src/messageview.c: messageview_show(): ¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£
index 557639e..a1133cb 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws52
+EXTRA_VERSION=claws53
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index aa01979..e4d6837 100644 (file)
@@ -5883,6 +5883,8 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
        FolderItem *draft;
        gchar *tmp;
        gint msgnum;
+       gchar *draft_path;
+       FILE *fp;
        static gboolean lock = FALSE;
 
        if (lock) return;
@@ -5923,6 +5925,20 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
                                               TRUE);
        }
 
+       draft_path = folder_item_get_path(draft);
+       if ((fp = procmsg_open_mark_file(draft_path, TRUE)) == NULL)
+               g_warning(_("can't open mark file\n"));
+       else {
+               MsgInfo newmsginfo;
+
+               newmsginfo.msgnum = msgnum;
+               newmsginfo.flags.perm_flags = 0;
+               newmsginfo.flags.tmp_flags = 0;
+               procmsg_write_flags(&newmsginfo, fp);
+               fclose(fp);
+       }
+       g_free(draft_path);
+
        folder_item_scan(draft);
        folderview_update_item(draft, TRUE);
 
index 5c8a9c0..80eec30 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -76,7 +76,6 @@ gint esmtp_auth(SockInfo *sock, SMTPAuthType authtype,
        guchar hexdigest[33];
        gchar *challenge, *response, *response64;
        gint challengelen;
-       gchar *token;
 
        switch (authtype) {
        case SMTPAUTH_LOGIN:
@@ -103,21 +102,22 @@ gint esmtp_auth(SockInfo *sock, SMTPAuthType authtype,
        case SMTPAUTH_CRAM_MD5:
                if (!strncmp(esmtp_response, "334 ", 4)) {
                        /* remove 334 from esmtp_response */
-                       g_snprintf(buf, sizeof(buf), "%s",esmtp_response);
-                       token = strtok(buf, " ");
-                       token = strtok(NULL, " ");
-                       challenge = g_malloc(strlen(token)+1);
-                       challengelen = from64tobits(challenge,token);
+                       gchar *p = esmtp_response + 4;
+
+                       challenge = g_malloc(strlen(p) + 1);
+                       challengelen = from64tobits(challenge, p);
+                       challenge[challengelen] = '\0';
                        if (verbose)
-                               log_print("ESMTP< Decoded: %s\n", challenge);
+                               log_print("ESMTP< [Decoded: %s]\n", challenge);
 
                        g_snprintf(buf, sizeof(buf), "%s", passwd);
                        md5_hex_hmac(hexdigest, challenge, challengelen,
                                     buf, strlen(passwd));
+                       g_free(challenge);
 
                        response = g_strdup_printf("%s %s", userid, hexdigest);
                        if (verbose)
-                               log_print("ESMTP> Encoded %s\n",response);
+                               log_print("ESMTP> [Encoded: %s]\n", response);
 
                        response64 = g_malloc((strlen(response) + 3) * 2 + 1);
                        to64frombits(response64, response, strlen(response));
index b5f9d56..cf73b82 100644 (file)
@@ -1121,9 +1121,10 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
                gtk_ctree_node_set_text(ctree, node, COL_TOTAL,  itos(item->total));
        }
 
-       if (item->stype == F_TRASH)
+       if (item->stype == F_OUTBOX || item->stype == F_DRAFT ||
+           item->stype == F_TRASH) {
                use_bold = use_color = FALSE;
-       if (item->stype == F_QUEUE) {
+       } else if (item->stype == F_QUEUE) {
                /* highlight queue folder if there are any messages */
                use_bold = use_color = (item->total > 0);
        } else {