* src/compose.c
authorColin Leroy <colin@colino.net>
Thu, 12 Sep 2002 00:10:06 +0000 (00:10 +0000)
committerColin Leroy <colin@colino.net>
Thu, 12 Sep 2002 00:10:06 +0000 (00:10 +0000)
                Put SCF: pseudo-header on top of message
                Set draft tmp_flag when saved as draft

        * src/procmsg.c
          src/procheader.c
                Skip after first \n\n for beginning of real message
                for drafts too

ChangeLog.claws
configure.in
src/compose.c
src/procheader.c
src/procmsg.c

index 890fc5e..8056fc9 100644 (file)
@@ -1,3 +1,14 @@
+2002-09-11 [colin]     0.8.2claws41
+       
+       * src/compose.c
+               Put SCF: pseudo-header on top of message
+               Set draft tmp_flag when saved as draft
+
+       * src/procmsg.c
+         src/procheader.c
+               Skip after first \n\n for beginning of real message
+               for drafts too
+
 2002-09-11 [christoph] 0.8.2claws40
 
        * src/filtering.c
index 084e784..2330f8f 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws40
+EXTRA_VERSION=claws41
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index e326783..5fb89ac 100644 (file)
@@ -3787,6 +3787,19 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
        g_return_val_if_fail(compose->account != NULL, -1);
        g_return_val_if_fail(compose->account->address != NULL, -1);
 
+       /* Save copy folder */
+       if(is_draft) {
+               if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(compose->savemsg_checkbtn))) {
+                       gchar *savefolderid;
+
+                       savefolderid = gtk_editable_get_chars(GTK_EDITABLE(compose->savemsg_entry), 0, -1);
+                       fprintf(fp, "SCF:%s\n\n", savefolderid);
+                       g_free(savefolderid);
+               } else {
+                       fprintf(fp, " \n\n");
+               }
+       }
+
        /* Date */
        if (compose->account->add_date) {
                get_rfc822_date(buf, sizeof(buf));
@@ -4012,15 +4025,6 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                }
        }
        
-       /* Save copy folder */
-       if(is_draft && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(compose->savemsg_checkbtn))) {
-               gchar *savefolderid;
-               
-               savefolderid = gtk_editable_get_chars(GTK_EDITABLE(compose->savemsg_entry), 0, -1);
-               fprintf(fp, "SCF:%s\n", savefolderid);
-               g_free(savefolderid);
-       }
-
        /* separator between header and body */
        fputs("\n", fp);
 
@@ -6218,6 +6222,7 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
 
        newmsginfo = folder_item_fetch_msginfo(draft, msgnum);
        procmsg_msginfo_unset_flags(newmsginfo, ~0, ~0);
+       MSG_SET_TMP_FLAGS(newmsginfo->flags, MSG_DRAFT);
        folderview_update_item(draft, TRUE);
        procmsg_msginfo_free(newmsginfo);
        
index 7622ea5..63c8ffb 100644 (file)
@@ -531,7 +531,7 @@ MsgInfo *procheader_parse_stream(FILE *fp, MsgFlags flags, gboolean full,
 
        hentry = full ? hentry_full : hentry_short;
 
-       if (MSG_IS_QUEUED(flags)) {
+       if (MSG_IS_QUEUED(flags) || MSG_IS_DRAFT(flags)) {
                while (fgets(buf, sizeof(buf), fp) != NULL)
                        if (buf[0] == '\r' || buf[0] == '\n') break;
        }
index 56c9411..1db8695 100644 (file)
@@ -774,7 +774,7 @@ FILE *procmsg_open_message(MsgInfo *msginfo)
 
        g_free(file);
 
-       if (MSG_IS_QUEUED(msginfo->flags)) {
+       if (MSG_IS_QUEUED(msginfo->flags) || MSG_IS_DRAFT(msginfo->flags)) {
                gchar buf[BUFFSIZE];
 
                while (fgets(buf, sizeof(buf), fp) != NULL)