2005-09-14 [paul] 1.9.14cvs30
authorPaul Mangan <paul@claws-mail.org>
Wed, 14 Sep 2005 14:43:21 +0000 (14:43 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 14 Sep 2005 14:43:21 +0000 (14:43 +0000)
* 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
PATCHSETS
configure.ac
src/compose.c

index 9b67c0e7ed8970ba97525ff4d4fe1ae2785c119b..6e5ee12528b76c7be3c3025cee8d249b2eee05e6 100644 (file)
@@ -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
index 2bf97e708c740e452511b0b8047e4c47d13312d4..32d7c0c428c6bbbf4418b2473c5e7a467ffe2422 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index 9afd0a0e941e7627a873babb252328a994739102..b81bc81c391ee021b91ada0602fc4e22841e68f1 100644 (file)
@@ -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=
 
index ca353ed08a9ab8a7e9ff4a68882b870831990228..78e132d217ec99dc173488751651bdff3cb72a3b 100644 (file)
@@ -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;