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)
This commit is contained in:
parent
98c47bc895
commit
713d91c73a
@ -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>
|
2002-12-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
||||||
@ -6,7 +12,7 @@
|
|||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
||||||
move_cursor() even if the cursor hasn't moved, since it has the
|
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>
|
2002-12-22 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
@ -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>
|
2002-12-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
||||||
@ -6,7 +12,7 @@
|
|||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
||||||
move_cursor() even if the cursor hasn't moved, since it has the
|
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>
|
2002-12-22 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
@ -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>
|
2002-12-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
||||||
@ -6,7 +12,7 @@
|
|||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
||||||
move_cursor() even if the cursor hasn't moved, since it has the
|
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>
|
2002-12-22 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
@ -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>
|
2002-12-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
||||||
@ -6,7 +12,7 @@
|
|||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
||||||
move_cursor() even if the cursor hasn't moved, since it has the
|
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>
|
2002-12-22 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
@ -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>
|
2002-12-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
||||||
@ -6,7 +12,7 @@
|
|||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
||||||
move_cursor() even if the cursor hasn't moved, since it has the
|
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>
|
2002-12-22 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
@ -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>
|
2002-12-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
* gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts):
|
||||||
@ -6,7 +12,7 @@
|
|||||||
|
|
||||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call
|
||||||
move_cursor() even if the cursor hasn't moved, since it has the
|
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>
|
2002-12-22 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
@ -2931,6 +2931,9 @@ clipboard_text_received (GtkClipboard *clipboard,
|
|||||||
{
|
{
|
||||||
GtkTextIter insert_point;
|
GtkTextIter insert_point;
|
||||||
|
|
||||||
|
if (request_data->interactive)
|
||||||
|
gtk_text_buffer_begin_user_action (buffer);
|
||||||
|
|
||||||
pre_paste_prep (request_data, &insert_point);
|
pre_paste_prep (request_data, &insert_point);
|
||||||
|
|
||||||
if (request_data->interactive)
|
if (request_data->interactive)
|
||||||
@ -2941,6 +2944,9 @@ clipboard_text_received (GtkClipboard *clipboard,
|
|||||||
str, -1);
|
str, -1);
|
||||||
|
|
||||||
post_paste_cleanup (request_data);
|
post_paste_cleanup (request_data);
|
||||||
|
|
||||||
|
if (request_data->interactive)
|
||||||
|
gtk_text_buffer_end_user_action (buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (buffer);
|
g_object_unref (buffer);
|
||||||
@ -3018,18 +3024,22 @@ paste_from_buffer (ClipboardRequest *request_data,
|
|||||||
const GtkTextIter *end)
|
const GtkTextIter *end)
|
||||||
{
|
{
|
||||||
GtkTextIter insert_point;
|
GtkTextIter insert_point;
|
||||||
|
GtkTextBuffer *buffer = request_data->buffer;
|
||||||
|
|
||||||
/* We're about to emit a bunch of signals, so be safe */
|
/* We're about to emit a bunch of signals, so be safe */
|
||||||
g_object_ref (src_buffer);
|
g_object_ref (src_buffer);
|
||||||
|
|
||||||
pre_paste_prep (request_data, &insert_point);
|
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 (!gtk_text_iter_equal (start, end))
|
||||||
{
|
{
|
||||||
if (!request_data->interactive ||
|
if (!request_data->interactive ||
|
||||||
(gtk_text_iter_can_insert (&insert_point,
|
(gtk_text_iter_can_insert (&insert_point,
|
||||||
request_data->default_editable)))
|
request_data->default_editable)))
|
||||||
gtk_text_buffer_real_insert_range (request_data->buffer,
|
gtk_text_buffer_real_insert_range (buffer,
|
||||||
&insert_point,
|
&insert_point,
|
||||||
start,
|
start,
|
||||||
end,
|
end,
|
||||||
@ -3038,6 +3048,9 @@ paste_from_buffer (ClipboardRequest *request_data,
|
|||||||
|
|
||||||
post_paste_cleanup (request_data);
|
post_paste_cleanup (request_data);
|
||||||
|
|
||||||
|
if (request_data->interactive)
|
||||||
|
gtk_text_buffer_end_user_action (buffer);
|
||||||
|
|
||||||
g_object_unref (src_buffer);
|
g_object_unref (src_buffer);
|
||||||
g_free (request_data);
|
g_free (request_data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user