bounce / processing
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Thu, 29 Nov 2001 23:55:49 +0000 (23:55 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Thu, 29 Nov 2001 23:55:49 +0000 (23:55 +0000)
ChangeLog.claws
configure.in
src/compose.c
src/folderview.c

index a68b3df584f980dd4b9d50d77290a3b0b5b8706d..2b187c81e9fce495c1072b3952b1b99e2fec22e1 100644 (file)
@@ -1,3 +1,13 @@
+2001-11-30 [hoa]       0.6.5claws45
+
+       * src/compose.c
+               slightly change bounce function to add
+               information about the user that bounced the mail
+               in the From header line.
+
+       * src/folderview.c
+               permit the use of processing in outbox folder.
+
 2001-11-29 [paul]      0.6.5claws44
 
        * src/mainwindow.[ch]
 2001-11-29 [paul]      0.6.5claws44
 
        * src/mainwindow.[ch]
index 6f9d8eb6653353e3837ce73d5a75a7ea6fd9519a..c6273a33bd6ed8c8671f853a84c2c1f8dd58094e 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws44
+EXTRA_VERSION=claws45
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index c70858b6bb9cc46d9c4f3d71cdc37f69b572e874..523274b7b57b48efaff318ebd297496d576e43cb 100644 (file)
@@ -2405,8 +2405,93 @@ static void compose_wrap_line_all(Compose *compose)
 
        gtk_stext_thaw(text);
 }
 
        gtk_stext_thaw(text);
 }
+<<<<<<< compose.c
 
 
+#if 0
+static void compose_wrap_line_all(Compose *compose)
+{
+       GtkText *text = GTK_STEXT(compose->text);
+       guint text_len;
+       guint line_pos = 0, cur_pos = 0;
+       gint line_len = 0, cur_len = 0;
+       gint ch_len;
+       gchar cbuf[MB_LEN_MAX];
+
+       gtk_stext_freeze(text);
+
+       text_len = gtk_stext_get_length(text);
+
+       for (; cur_pos < text_len; cur_pos++) {
+               if (text->use_wchar)
+                       ch_len = wctomb
+                               (cbuf, (wchar_t)GTK_STEXT_INDEX(text, cur_pos));
+               else {
+                       cbuf[0] = GTK_STEXT_INDEX(text, cur_pos);
+                       ch_len = 1;
+               }
+
+               if (ch_len == 1 && *cbuf == '\n') {
+                       line_pos = cur_pos + 1;
+                       line_len = cur_len = 0;
+                       continue;
+               }
+
+               if (ch_len < 0) {
+                       cbuf[0] = '\0';
+                       ch_len = 1;
+               }
+=======
+>>>>>>> 1.110
+
+<<<<<<< compose.c
+               if (ch_len == 1 && isspace(*cbuf)) {
+                       line_pos = cur_pos + 1;
+                       line_len = cur_len + ch_len;
+               }
+=======
 #undef GET_CHAR
 #undef GET_CHAR
+>>>>>>> 1.110
+
+               if (cur_len + ch_len > prefs_common.linewrap_len &&
+                   line_len > 0) {
+                       gint tlen;
+
+                       if (text->use_wchar)
+                               tlen = wctomb(cbuf, (wchar_t)GTK_STEXT_INDEX(text, line_pos - 1));
+                       else {
+                               cbuf[0] = GTK_STEXT_INDEX(text, line_pos - 1);
+                               tlen = 1;
+                       }
+                       if (tlen == 1 && isspace(*cbuf)) {
+                               gtk_stext_set_point(text, line_pos);
+                               gtk_stext_backward_delete(text, 1);
+                               text_len--;
+                               cur_pos--;
+                               line_pos--;
+                               cur_len--;
+                               line_len--;
+                       }
+
+                       gtk_stext_set_point(text, line_pos);
+                       gtk_stext_insert(text, NULL, NULL, NULL, "\n", 1);
+                       text_len++;
+                       cur_pos++;
+                       line_pos++;
+                       cur_len = cur_len - line_len + ch_len;
+                       line_len = 0;
+                       continue;
+               }
+
+               if (ch_len > 1) {
+                       line_pos = cur_pos + 1;
+                       line_len = cur_len + ch_len;
+               }
+               cur_len += ch_len;
+       }
+
+       gtk_stext_thaw(text);
+}
+#endif
 
 static void compose_set_title(Compose *compose)
 {
 
 static void compose_set_title(Compose *compose)
 {
@@ -2753,8 +2838,26 @@ static gint compose_bounce_write_to_file(Compose *compose, const gchar *file)
                    || (g_strncasecmp(buf, "Delivered-To:",
                                      strlen("Delivered-To:")) == 0))
                        continue;
                    || (g_strncasecmp(buf, "Delivered-To:",
                                      strlen("Delivered-To:")) == 0))
                        continue;
+
                if (fputs(buf, fdest) == -1)
                        goto error;
                if (fputs(buf, fdest) == -1)
                        goto error;
+
+               if (g_strncasecmp(buf, "From:", strlen("From:")) == 0) {
+                       fputs(" (by way of ", fdest);
+                       if (compose->account->name
+                           && *compose->account->name) {
+                               compose_convert_header
+                                       (buf, sizeof(buf),
+                                        compose->account->name,
+                                        strlen("From: "));
+                               fprintf(fdest, "%s <%s>",
+                                       buf, compose->account->address);
+                       } else
+                               fprintf(fdest, "%s",
+                                       compose->account->address);
+                       fputs(")", fdest);
+               }
+
                if (fputs("\n", fdest) == -1)
                        goto error;
        }
                if (fputs("\n", fdest) == -1)
                        goto error;
        }
index afd706b69aec6d616f982c23bc0ca5d9942bedd6..9398e7ac55f8f56bb476e02b12d549a2999260ef 100644 (file)
@@ -1275,6 +1275,8 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
                                folder_property = folder_scoring = folder_processing = TRUE;
                        else if (item->stype == F_TRASH)
                                folder_processing = TRUE;
                                folder_property = folder_scoring = folder_processing = TRUE;
                        else if (item->stype == F_TRASH)
                                folder_processing = TRUE;
+                       else if (item->stype == F_OUTBOX)
+                               folder_processing = TRUE;
                } else if (FOLDER_TYPE(folder) == F_NEWS) {
                        if (item->parent != NULL)
                                delete_folder = folder_scoring = folder_processing = TRUE;
                } else if (FOLDER_TYPE(folder) == F_NEWS) {
                        if (item->parent != NULL)
                                delete_folder = folder_scoring = folder_processing = TRUE;