From e1f68793ebb05c4a325db6664bf1c0362d9c925b Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Wed, 14 Sep 2005 14:43:21 +0000 Subject: [PATCH] 2005-09-14 [paul] 1.9.14cvs30 * src/compose.c fix a little annoyance when pasting with 3rd button with wrap_pastes=0 and wrap_input=1 Patch by Colin --- ChangeLog-gtk2.claws | 7 ++++++ PATCHSETS | 1 + configure.ac | 2 +- src/compose.c | 59 +++++++++++++++++++++++++------------------- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 9b67c0e7e..6e5ee1252 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,10 @@ +2005-09-14 [paul] 1.9.14cvs30 + + * src/compose.c + fix a little annoyance when pasting with 3rd button + with wrap_pastes=0 and wrap_input=1 + Patch by Colin + 2005-09-14 [paul] 1.9.14cvs29 * src/prefs_account.c diff --git a/PATCHSETS b/PATCHSETS index 2bf97e708..32d7c0c42 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -798,3 +798,4 @@ ( cvs diff -u -r 1.60.2.13 -r 1.60.2.14 po/es.po; cvs diff -u -r 1.382.2.168 -r 1.382.2.169 src/compose.c; cvs diff -u -r 1.50.2.10 -r 1.50.2.11 src/compose.h; cvs diff -u -r 1.28.2.7 -r 1.28.2.8 src/mbox.c; cvs diff -u -r 1.96.2.75 -r 1.96.2.76 src/textview.c; ) > 1.9.14cvs27.patchset ( cvs diff -u -r 1.2.2.14 -r 1.2.2.15 po/sk.po; ) > 1.9.14cvs28.patchset ( cvs diff -u -r 1.105.2.33 -r 1.105.2.34 src/prefs_account.c; ) > 1.9.14cvs29.patchset +( cvs diff -u -r 1.382.2.169 -r 1.382.2.170 src/compose.c; ) > 1.9.14cvs30.patchset diff --git a/configure.ac b/configure.ac index 9afd0a0e9..b81bc81c3 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=14 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=29 +EXTRA_VERSION=30 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c index ca353ed08..78e132d21 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4856,13 +4856,45 @@ static void compose_savemsg_select_cb(GtkWidget *widget, Compose *compose) static void entry_paste_clipboard(Compose *compose, GtkWidget *entry, gboolean wrap, GdkAtom clip); + +#define BLOCK_WRAP() { \ + prev_autowrap = compose->autowrap; \ + buffer = gtk_text_view_get_buffer( \ + GTK_TEXT_VIEW(compose->text)); \ + compose->autowrap = FALSE; \ + \ + g_signal_handlers_block_by_func(G_OBJECT(buffer), \ + G_CALLBACK(compose_changed_cb), \ + compose); \ + g_signal_handlers_block_by_func(G_OBJECT(buffer), \ + G_CALLBACK(text_inserted), \ + compose); \ +} +#define UNBLOCK_WRAP() { \ + compose->autowrap = prev_autowrap; \ + if (compose->autowrap) \ + compose_wrap_all(compose); \ + \ + g_signal_handlers_unblock_by_func(G_OBJECT(buffer), \ + G_CALLBACK(compose_changed_cb), \ + compose); \ + g_signal_handlers_unblock_by_func(G_OBJECT(buffer), \ + G_CALLBACK(text_inserted), \ + compose); \ +} + + static gboolean text_clicked(GtkWidget *text, GdkEventButton *event, Compose *compose) { + gint prev_autowrap; + GtkTextBuffer *buffer; if (event->button == 2) { + BLOCK_WRAP(); entry_paste_clipboard(compose, compose->focused_editable, prefs_common.linewrap_pastes, GDK_SELECTION_PRIMARY); + UNBLOCK_WRAP(); return TRUE; } return FALSE; @@ -4934,6 +4966,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode) geometry.max_width = gdk_screen_width(); geometry.max_height = gdk_screen_height(); } + gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry, GDK_HINT_MAX_SIZE); if (!geometry.min_width) { @@ -6917,32 +6950,6 @@ static void compose_copy_cb(Compose *compose) entry_copy_clipboard(compose->focused_editable); } -#define BLOCK_WRAP() { \ - prev_autowrap = compose->autowrap; \ - buffer = gtk_text_view_get_buffer( \ - GTK_TEXT_VIEW(compose->text)); \ - compose->autowrap = FALSE; \ - \ - g_signal_handlers_block_by_func(G_OBJECT(buffer), \ - G_CALLBACK(compose_changed_cb), \ - compose); \ - g_signal_handlers_block_by_func(G_OBJECT(buffer), \ - G_CALLBACK(text_inserted), \ - compose); \ -} -#define UNBLOCK_WRAP() { \ - compose->autowrap = prev_autowrap; \ - if (compose->autowrap) \ - compose_wrap_all(compose); \ - \ - g_signal_handlers_unblock_by_func(G_OBJECT(buffer), \ - G_CALLBACK(compose_changed_cb), \ - compose); \ - g_signal_handlers_unblock_by_func(G_OBJECT(buffer), \ - G_CALLBACK(text_inserted), \ - compose); \ -} - static void compose_paste_cb(Compose *compose) { gint prev_autowrap; -- 2.25.1