GNOME Bugzilla – Bug 603031
Copy/Paste doesn't work in some cases
Last modified: 2018-05-22 13:52:57 UTC
bug #581488 improved the general copy/paste situation but it still doesn't work properly in some cases (using GTK+ themes): Working: - Copy using Ctrl+V - Copy using the Edit - Copy menu Not working: - Copy using the popup menu when right clicking in the text view - Copy by selecting the text and then pasting it using middle click
Created attachment 148523 [details] [review] http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/copy-paste-603031 fixes the first case. No idea how to solve the middle-click case. libempathy-gtk/empathy-chat-text-view.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
I don't understand what's the code-path when I do ctr-c/ctr-v. But your patch seems correct. r+
I merged the branch; thanks. Let's keep this bug open as the middle-click case is still broken.
After some investigation, my understanding of the middle-click case is that it's due to GtkTextBuffer's clipboard_get_selection_cb function. In it, when pasting plain-text, it calls gtk_text_iter_get_visible text, which basically ignores all images and embedded objects. Only the text is pasted. As far as I can tell, Gtk lacks any way of overriding this. It seems like it would make sense to be able to use gtk_text_buffer_register_serialize_format with a "text/plain" format in order to override this, but it doesn't currently do so.
Mike: Thanks for investigating this. Could you please open a GTK+ bug about this?
GTK+ bug created as bug #611642
is this the reason why copy-paste works differently in pidgin and empathy as well? see ubuntu bugs https://bugs.edge.launchpad.net/ubuntu/+source/empathy/+bug/530222 e.g. with pidgin copy-paste looks the same everywhere. nicely formatted, with color and timestamp, one paragraph per message. with empathy it does not, some examples: 1. copy multiple messages from one chat window - paste into another the result is one big message, including all the messages as text. name and date coming with it. 2. copy multiple messages from one chat window - paste into openoffice an ugly formatted (html?) table is produced, with dead icons. 3. copy multiple messages from one chat window - paste intogmail rich text formatted mail, firefox-3.6 no paste at all is possible. 4. copy multiple messages from one chat window - paste into text editor, or text formated gmail the format is ugly and inconsistent, i.e. for a multiline message copied: * first line is name and time, * second line is only text * third line is text and time * fourth line is space
*** Bug 619199 has been marked as a duplicate of this bug. ***
i say that https://bugzilla.gnome.org/show_bug.cgi?id=621859 is the dup of this one ?
*** Bug 621859 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > is this the reason why copy-paste works differently in pidgin and empathy as > well? No, this bug is about not copying anything at all, not badly formated text being copied. See bug #678313 for that.
Let's consider only Adium chat themes, as they will be mandatory soon (bug #645921), so make sure your themes in Empathy preferences is not 'Classic', 'Blue', 'Clean' or 'Simple'. The 'Ubuntu' theme is fine as it's in HTML. I did some testing and the only case where we can't actually copy is when typing something in the chat window, selecting it and using Ctrl+C. Is there more broken cases?
(In reply to comment #12) > I did some testing and the only case where we can't actually copy is when > typing something in the chat window, selecting it and using Ctrl+C. It's actually: - Select some text A in the chat view - Type something in the input entry and select it (B) - Hit Ctrl+C - A is copied and not B
This seems to be because of a WebKitGtk bug: https://bugs.webkit.org/show_bug.cgi?id=90144
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/149.