diff options
author | Matthias Clasen <maclas@gmx.de> | 2002-12-24 22:24:48 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-12-24 22:24:48 +0000 |
commit | 713d91c73a9506afdc0b748e268d383e3c017c50 (patch) | |
tree | 27422c2cfc895a80ed42fc82ec2c2c9500e860d8 | |
parent | 98c47bc895788ba273d60d22f1aadd1774f2f326 (diff) | |
download | gtk+-713d91c73a9506afdc0b748e268d383e3c017c50.tar.gz |
Let the user action span the insertion and the deletion of the old
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):
(clipboard_text_received): Let the user action span the insertion
and the deletion of the old selection. (#82844)
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 8 | ||||
-rw-r--r-- | gtk/gtktextbuffer.c | 21 |
7 files changed, 59 insertions, 10 deletions
@@ -1,3 +1,9 @@ +2002-12-24 Matthias Clasen <maclas@gmx.de> + + * gtk/gtktextbuffer.c (paste_from_buffer): + (clipboard_text_received): Let the user action span the insertion + and the deletion of the old selection. (#82844) + 2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): @@ -6,7 +12,7 @@ * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the - side effect of canceling the selection. (#81395, #98537, #9833) + side effect of canceling the selection. (#81395, #98537, #98333) 2002-12-22 Matthias Clasen <maclas@gmx.de> diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9220aa7804..8d82366dce 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-12-24 Matthias Clasen <maclas@gmx.de> + + * gtk/gtktextbuffer.c (paste_from_buffer): + (clipboard_text_received): Let the user action span the insertion + and the deletion of the old selection. (#82844) + 2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): @@ -6,7 +12,7 @@ * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the - side effect of canceling the selection. (#81395, #98537, #9833) + side effect of canceling the selection. (#81395, #98537, #98333) 2002-12-22 Matthias Clasen <maclas@gmx.de> diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9220aa7804..8d82366dce 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-12-24 Matthias Clasen <maclas@gmx.de> + + * gtk/gtktextbuffer.c (paste_from_buffer): + (clipboard_text_received): Let the user action span the insertion + and the deletion of the old selection. (#82844) + 2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): @@ -6,7 +12,7 @@ * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the - side effect of canceling the selection. (#81395, #98537, #9833) + side effect of canceling the selection. (#81395, #98537, #98333) 2002-12-22 Matthias Clasen <maclas@gmx.de> diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9220aa7804..8d82366dce 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-12-24 Matthias Clasen <maclas@gmx.de> + + * gtk/gtktextbuffer.c (paste_from_buffer): + (clipboard_text_received): Let the user action span the insertion + and the deletion of the old selection. (#82844) + 2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): @@ -6,7 +12,7 @@ * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the - side effect of canceling the selection. (#81395, #98537, #9833) + side effect of canceling the selection. (#81395, #98537, #98333) 2002-12-22 Matthias Clasen <maclas@gmx.de> diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9220aa7804..8d82366dce 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-12-24 Matthias Clasen <maclas@gmx.de> + + * gtk/gtktextbuffer.c (paste_from_buffer): + (clipboard_text_received): Let the user action span the insertion + and the deletion of the old selection. (#82844) + 2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): @@ -6,7 +12,7 @@ * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the - side effect of canceling the selection. (#81395, #98537, #9833) + side effect of canceling the selection. (#81395, #98537, #98333) 2002-12-22 Matthias Clasen <maclas@gmx.de> diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9220aa7804..8d82366dce 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-12-24 Matthias Clasen <maclas@gmx.de> + + * gtk/gtktextbuffer.c (paste_from_buffer): + (clipboard_text_received): Let the user action span the insertion + and the deletion of the old selection. (#82844) + 2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): @@ -6,7 +12,7 @@ * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the - side effect of canceling the selection. (#81395, #98537, #9833) + side effect of canceling the selection. (#81395, #98537, #98333) 2002-12-22 Matthias Clasen <maclas@gmx.de> diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index 3271a55736..d5327d0aae 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -2930,17 +2930,23 @@ clipboard_text_received (GtkClipboard *clipboard, if (str) { GtkTextIter insert_point; + + if (request_data->interactive) + gtk_text_buffer_begin_user_action (buffer); pre_paste_prep (request_data, &insert_point); - if (request_data->interactive) - gtk_text_buffer_insert_interactive (buffer, &insert_point, - str, -1, request_data->default_editable); + if (request_data->interactive) + gtk_text_buffer_insert_interactive (buffer, &insert_point, + str, -1, request_data->default_editable); else gtk_text_buffer_insert (buffer, &insert_point, str, -1); post_paste_cleanup (request_data); + + if (request_data->interactive) + gtk_text_buffer_end_user_action (buffer); } g_object_unref (buffer); @@ -3018,18 +3024,22 @@ paste_from_buffer (ClipboardRequest *request_data, const GtkTextIter *end) { GtkTextIter insert_point; + GtkTextBuffer *buffer = request_data->buffer; /* We're about to emit a bunch of signals, so be safe */ g_object_ref (src_buffer); pre_paste_prep (request_data, &insert_point); + if (request_data->interactive) + gtk_text_buffer_begin_user_action (buffer); + if (!gtk_text_iter_equal (start, end)) { if (!request_data->interactive || (gtk_text_iter_can_insert (&insert_point, request_data->default_editable))) - gtk_text_buffer_real_insert_range (request_data->buffer, + gtk_text_buffer_real_insert_range (buffer, &insert_point, start, end, @@ -3038,6 +3048,9 @@ paste_from_buffer (ClipboardRequest *request_data, post_paste_cleanup (request_data); + if (request_data->interactive) + gtk_text_buffer_end_user_action (buffer); + g_object_unref (src_buffer); g_free (request_data); } |