]> Pileus Git - ~andy/gtk/commitdiff
gtk: remove begin-user-action/end-user-action around copying
authorMichael Natterer <mitch@gimp.org>
Sun, 7 Mar 2010 11:15:33 +0000 (12:15 +0100)
committerMichael Natterer <mitch@gimp.org>
Sun, 7 Mar 2010 11:15:33 +0000 (12:15 +0100)
Copying to the clipboard is not a buffer mutation, so calling
gtk_text_buffer_begin_user_action() and _end_user_action() is only
confusing apps which connect to these signals in order to build undo
stacks or otherwise track buffer changes. Most likely, these apps
either didn't notice the bugus undo step or simply work around it.

gtk/gtktextbuffer.c

index 97abf9a26d22cf748be07b1f015c39c95b5b2571..dca5686e466f7897e277e04a8c3cabcb2028b260 100644 (file)
@@ -4016,9 +4016,7 @@ void
 gtk_text_buffer_copy_clipboard (GtkTextBuffer *buffer,
                                GtkClipboard  *clipboard)
 {
-  gtk_text_buffer_begin_user_action (buffer);
   cut_or_copy (buffer, clipboard, FALSE, TRUE, TRUE);
-  gtk_text_buffer_end_user_action (buffer);
 }
 
 /**