From: Paul Mangan Date: Thu, 22 Aug 2002 08:17:06 +0000 (+0000) Subject: sync with 0.8.1cvs28 X-Git-Tag: rel_0_8_2~34 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=b6d2bae7c4321ca7591344bcbd854323f33866e0 sync with 0.8.1cvs28 --- diff --git a/ChangeLog b/ChangeLog index e6ff36f64..cc552c912 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-08-22 + + * src/compose.c: compose_wrap_line_all(): freeze widget only if + required to repress flickers. + 2002-08-21 * src/compose.c: improved line wrapping. diff --git a/ChangeLog.claws b/ChangeLog.claws index 13acbbcb0..9dfabf32e 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2002-08-22 [paul] 0.8.1claws98 + + * sync with 0.8.1cvs28 + see ChangeLog 2002-08-22 + 2002-08-21 [alfons] 0.8.1claws97 * src/crash.c diff --git a/ChangeLog.jp b/ChangeLog.jp index 1347d9668..20e6f2ba2 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,8 @@ +2002-08-22 + + * src/compose.c: compose_wrap_line_all(): ¤Á¤é¤Ä¤­¤òÍÞ¤¨¤ë¤¿¤á¤Ë + ɬÍפʤȤ­¤Î¤ß widget ¤ò freeze ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£ + 2002-08-21 * src/compose.c: ¹ÔÀÞ¤êÊÖ¤·¤ò²þÎÉ¡£ diff --git a/configure.in b/configure.in index ff6df7fc0..b2a945161 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws97 +EXTRA_VERSION=claws98 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/compose.c b/src/compose.c index 1882e9ef8..61a3a6fe0 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2343,6 +2343,9 @@ static gboolean join_next_line(GtkSText *text, guint start_pos, guint tlen, return do_join; } +#define STEXT_FREEZE() \ + if (!frozen) { gtk_stext_freeze(text); frozen = TRUE; } + static void compose_wrap_line_all(Compose *compose) { GtkSText *text = GTK_STEXT(compose->text); @@ -2355,12 +2358,11 @@ static void compose_wrap_line_all(Compose *compose) gboolean linewrap_quote = TRUE; gboolean set_editable_pos = FALSE; gint editable_pos = 0; + gboolean frozen = FALSE; guint linewrap_len = prefs_common.linewrap_len; gchar *qfmt = prefs_common.quotemark; gchar cbuf[MB_LEN_MAX]; - gtk_stext_freeze(text); - tlen = gtk_stext_get_length(text); for (; cur_pos < tlen; cur_pos++) { @@ -2426,6 +2428,7 @@ static void compose_wrap_line_all(Compose *compose) #endif /* should we delete to perform smart wrapping */ if (line_len < linewrap_len && do_delete) { + STEXT_FREEZE(); /* get rid of newline */ gtk_stext_set_point(text, cur_pos); gtk_stext_forward_delete(text, 1); @@ -2512,6 +2515,7 @@ static void compose_wrap_line_all(Compose *compose) if (p_pos + i_len != line_pos || !gtkut_stext_is_uri_string (text, line_pos, tlen)) { + STEXT_FREEZE(); /* workaround for correct cursor position */ if (set_editable_pos == FALSE) { @@ -2540,6 +2544,7 @@ static void compose_wrap_line_all(Compose *compose) } /* insert CR */ + STEXT_FREEZE(); gtk_stext_set_point(text, line_pos); gtk_stext_insert(text, NULL, NULL, NULL, "\n", 1); /* gtk_stext_compact_buffer(text); */ @@ -2569,8 +2574,6 @@ static void compose_wrap_line_all(Compose *compose) ins_len = ins_quote (text, i_len, p_pos, tlen, qfmt); - - /* gtk_stext_compact_buffer(text); */ tlen += ins_len; } #ifdef WRAP_DEBUG @@ -2590,12 +2593,14 @@ static void compose_wrap_line_all(Compose *compose) cur_len += ch_len; } - gtk_stext_thaw(text); + if (frozen) + gtk_stext_thaw(text); if (set_editable_pos && editable_pos <= tlen) gtk_editable_set_position(GTK_EDITABLE(text), editable_pos); } +#undef STEXT_FREEZE #undef GET_CHAR static void compose_set_title(Compose *compose)