From 3c4e6e0e44d836b05e086961fbf67fc6c71db65c Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Tue, 7 Feb 2006 18:16:43 +0000 Subject: [PATCH] 2006-02-07 [colin] 2.0.0cvs28 * src/action.c Freeze/thaw message list and folder list while processing %as{} actions * src/compose.c Fix auto-wrap disabling after a middle-click paste --- ChangeLog | 9 +++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/action.c | 24 +++++++++++++++++++++++- src/compose.c | 9 ++++++--- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 551b3c037..d52ef7b46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-02-07 [colin] 2.0.0cvs28 + + * src/action.c + Freeze/thaw message list and folder list while + processing %as{} actions + * src/compose.c + Fix auto-wrap disabling after a middle-click + paste + 2006-02-07 [paul] 2.0.0cvs27 * src/folder.c diff --git a/PATCHSETS b/PATCHSETS index 476da8a69..1645fccda 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1211,3 +1211,4 @@ ( cvs diff -u -r 1.213.2.81 -r 1.213.2.82 src/folder.c; ) > 2.0.0cvs25.patchset ( cvs diff -u -r 1.213.2.82 -r 1.213.2.83 src/folder.c; ) > 2.0.0cvs26.patchset ( cvs diff -u -r 1.213.2.83 -r 1.213.2.84 src/folder.c; ) > 2.0.0cvs27.patchset +( cvs diff -u -r 1.12.2.30 -r 1.12.2.31 src/action.c; cvs diff -u -r 1.382.2.235 -r 1.382.2.236 src/compose.c; ) > 2.0.0cvs28.patchset diff --git a/configure.ac b/configure.ac index fbaa53b93..03bb5c699 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=0 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=27 +EXTRA_VERSION=28 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/action.c b/src/action.c index 96bbd40b1..88a946e66 100644 --- a/src/action.c +++ b/src/action.c @@ -588,7 +588,14 @@ static gboolean execute_filtering_actions(gchar *action, GSList *msglist) GSList *action_list, *p; const gchar *sbegin, *send; gchar *action_string; - + SummaryView *summaryview = NULL; + MainWindow *mainwin = NULL; + + if (mainwindow_get_mainwindow()) { + summaryview = mainwindow_get_mainwindow()->summaryview; + mainwin = mainwindow_get_mainwindow(); + } + if (NULL == (sbegin = strstr2(action, "%as{"))) return FALSE; sbegin += sizeof "%as{" - 1; @@ -605,7 +612,22 @@ static gboolean execute_filtering_actions(gchar *action, GSList *msglist) filteringaction_apply_action_list(action_list, (MsgInfo *) p->data); } + + if (summaryview) { + summary_lock(summaryview); + main_window_cursor_wait(mainwin); + gtk_clist_freeze(GTK_CLIST(summaryview->ctree)); + folder_item_update_freeze(); + } + filtering_move_and_copy_msgs(msglist); + + if (summaryview) { + folder_item_update_thaw(); + gtk_clist_thaw(GTK_CLIST(summaryview->ctree)); + main_window_cursor_normal(mainwin); + summary_unlock(summaryview); + } for (p = action_list; p; p = g_slist_next(p)) if (p->data) filteringaction_free(p->data); g_slist_free(action_list); diff --git a/src/compose.c b/src/compose.c index ff8217875..915957e82 100644 --- a/src/compose.c +++ b/src/compose.c @@ -3282,6 +3282,7 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter, gint startq_offset = -1, noq_offset = -1; gint uri_start = -1, uri_stop = -1; gint nouri_start = -1, nouri_stop = -1; + gint num_blocks = 0; compose->autowrap = FALSE; @@ -3346,11 +3347,12 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter, gchar *o_walk = NULL, *walk = NULL, *bp = NULL, *ep = NULL; gint walk_pos; - if (!prev_autowrap) + if (!prev_autowrap && num_blocks == 0) { + num_blocks++; g_signal_handlers_block_by_func(G_OBJECT(buffer), G_CALLBACK(text_inserted), compose); - + } if (gtk_text_iter_has_tag(&iter, compose->no_wrap_tag) && !force) goto colorize; @@ -3430,10 +3432,11 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter, } colorize: - if (!prev_autowrap) + if (!prev_autowrap) { g_signal_handlers_unblock_by_func(G_OBJECT(buffer), G_CALLBACK(text_inserted), compose); + } end_of_line = iter; while (!gtk_text_iter_ends_line(&end_of_line)) { gtk_text_iter_forward_char(&end_of_line); -- 2.25.1