2004-11-22 [colin] 0.9.12cvs158.4
authorColin Leroy <colin@colino.net>
Mon, 22 Nov 2004 07:32:16 +0000 (07:32 +0000)
committerColin Leroy <colin@colino.net>
Mon, 22 Nov 2004 07:32:16 +0000 (07:32 +0000)
* src/compose.c
fix dump_text()
patch by Alfons

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c

index 0507af2..f10c48f 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-22 [colin]     0.9.12cvs158.4
+
+       * src/compose.c
+               fix dump_text()
+               patch by Alfons
+
 2004-11-19 [colin]     0.9.12cvs158.3
 
        * src/textview.c
index c21f912..b7c78c4 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.654.2.280 -r 1.654.2.281 configure.ac; cvs diff -u -r 1.382.2.68 -r 1.382.2.69 src/compose.c; cvs diff -u -r 1.274.2.24 -r 1.274.2.25 src/mainwindow.c; cvs diff -u -r 1.94.2.34 -r 1.94.2.35 src/messageview.c; cvs diff -u -r 1.204.2.22 -r 1.204.2.23 src/prefs_common.c; cvs diff -u -r 1.36.2.15 -r 1.36.2.16 src/common/utils.c; cvs diff -u -r 1.20.2.10 -r 1.20.2.11 src/common/utils.h; ) > 0.9.12cvs158.1.patchset
 ( cvs diff -u -r 1.5.10.5 -r 1.5.10.6 src/addrgather.c; cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/exphtmldlg.c; cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/expldifdlg.c; cvs diff -u -r 1.83.2.24 -r 1.83.2.25 src/mimeview.c; cvs diff -u -r 1.204.2.23 -r 1.204.2.24 src/prefs_common.c; cvs diff -u -r 1.7.2.8 -r 1.7.2.9 src/plugins/image_viewer/viewer.c; cvs diff -u -r 1.23.2.6 -r 1.23.2.7 src/plugins/spamassassin/spamassassin_gtk.c; ) > 0.9.12cvs158.2.patchset
 ( cvs diff -u -r 1.96.2.35 -r 1.96.2.36 src/textview.c; ) > 0.9.12cvs158.3.patchset
+( cvs diff -u -r 1.382.2.69 -r 1.382.2.70 src/compose.c; ) > 0.9.12cvs158.4.patchset
index 31608f1..d98cd3e 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=158
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.3
+EXTRA_GTK2_VERSION=.4
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 9d5a508..dbd86ff 100644 (file)
@@ -2599,16 +2599,17 @@ static void compose_wrap_line(Compose *compose)
 #undef WRAP_DEBUG
 #ifdef WRAP_DEBUG
 /* Darko: used when I debug wrapping */
-void dump_text(GtkTextBuffer textbuf, int pos, int tlen, int breakoncr)
+void dump_text(GtkTextBuffer *textbuf, int pos, int tlen, int breakoncr)
 {
        gint i, clen;
        gchar cbuf[CHAR_BUF_SIZE];
+       GtkTextIter iter, end_iter;
 
        printf("%d [", pos);
        gtk_text_buffer_get_iter_at_offset(textbuf, &iter, pos);
        gtk_text_buffer_get_iter_at_offset(textbuf, &end_iter, pos + tlen);
        for (; gtk_text_iter_forward_char(&iter) &&
-                    gtk_text_iter_compare(&iter, &end_iter) < 0;)
+                    gtk_text_iter_compare(&iter, &end_iter) < 0;) {
                GET_CHAR(&iter, cbuf, clen);
                if (clen < 0) break;
                if (breakoncr && clen == 1 && cbuf[0] == '\n')
@@ -2915,7 +2916,7 @@ static void compose_wrap_line_all_full(Compose *compose, gboolean autowrap)
                                is_new_line = TRUE;
 #ifdef WRAP_DEBUG
                                g_print("after delete l_pos=");
-                               dump_text(text, line_pos, tlen, 1);
+                               dump_text(textbuf, line_pos, tlen, 1);
 #endif
                                /* move beginning of line if we are on LF */
                                gtk_text_buffer_get_iter_at_offset(textbuf,
@@ -2956,8 +2957,8 @@ static void compose_wrap_line_all_full(Compose *compose, gboolean autowrap)
 
 #ifdef WRAP_DEBUG
                        g_print("should wrap cur_pos=%d ", cur_pos);
-                       dump_text(text, p_pos, tlen, 1);
-                       dump_text(text, line_pos, tlen, 1);
+                       dump_text(textbuf, p_pos, tlen, 1);
+                       dump_text(textbuf, line_pos, tlen, 1);
 #endif
                        /* force wrapping if it is one long word but not URL */
                        if (line_pos - p_pos <= i_len)
@@ -3009,7 +3010,7 @@ static void compose_wrap_line_all_full(Compose *compose, gboolean autowrap)
                            gtkut_text_buffer_is_uri_string(textbuf, line_pos, tlen)) {
 #ifdef WRAP_DEBUG
                                g_print("found URL at ");
-                               dump_text(text, line_pos, tlen, 1);
+                               dump_text(textbuf, line_pos, tlen, 1);
 #endif
                                continue;
                        }
@@ -3035,8 +3036,8 @@ static void compose_wrap_line_all_full(Compose *compose, gboolean autowrap)
                                do_delete = FALSE;
 #ifdef WRAP_DEBUG
                        g_print("after CR insert ");
-                       dump_text(text, line_pos, tlen, 1);
-                       dump_text(text, cur_pos, tlen, 1);
+                       dump_text(textbuf, line_pos, tlen, 1);
+                       dump_text(textbuf, cur_pos, tlen, 1);
 #endif
 
                        /* should we insert quotation ? */
@@ -3056,7 +3057,7 @@ static void compose_wrap_line_all_full(Compose *compose, gboolean autowrap)
                                        }
 #ifdef WRAP_DEBUG
                                        g_print("after quote insert ");
-                                       dump_text(text, line_pos, tlen, 1);
+                                       dump_text(textbuf, line_pos, tlen, 1);
 #endif
                                }
                        }