GNOME Bugzilla – Bug 678313
Improve copy/pasting with Adium themes
Last modified: 2018-05-22 15:35:30 UTC
Atm we just use webkit_web_view_copy_clipboard() when copying chat from an Adium theme which doesn't copy something very useful with most themes. It would be good to do something smarter, if possible, and save the logs in a more IRC way: <Alice> Oh hi <Bob> Hey what's up? etc But I don't know if that's possible with WebKit.
That would be great indeed! What you can do is use the GObject DOM bindings to poke at the DOM and fetch/manipulate the text data. Unfortunately the DOM bindings do not have documentation generated, so you need to rely on looking at the headers and/or generated files. The entry point is here: http://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#webkit-web-view-get-dom-document Then look at the WebKitDOM* headers and use a DOM API reference to guide you, I guess. There is some usage of DOM bindings inside Epiphany that you can use too. window.getSelection() (so webkit_dom_dom_window_get_selection()) seems to be the first step.
*** Bug 674861 has been marked as a duplicate of this bug. ***
Created attachment 224489 [details] [review] set custom selection color in default themes Ensure that we actually see the text being selected.
Comment on attachment 224489 [details] [review] set custom selection color in default themes wrong bug
-- 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/559.