GNOME Bugzilla – Bug 756848
entryArea: Don't flash pasted text when using paste service
Last modified: 2015-10-20 16:35:19 UTC
See patch. This would also allow us to handle entry text and pasted text separately in the future: "nick: what do you think about <ctrl-v>" => "nick: what do you think about https://paste.gnome.org/foobar"
Created attachment 313728 [details] [review] entryArea: Don't flash pasted text when using paste service We currently decide whether to offer paste service integration when the entry's text changes, which means that pasted text flashes up briefly before switching to the paste UI. We can avoid this by subclassing GtkEntry and intercepting the paste operation itself.
(In reply to Florian Müllner from comment #1) > Created attachment 313728 [details] [review] [review] > entryArea: Don't flash pasted text when using paste service > > We currently decide whether to offer paste service integration when > the entry's text changes, which means that pasted text flashes up > briefly before switching to the paste UI. We can avoid this by > subclassing GtkEntry and intercepting the paste operation itself. I can't get the patch to apply on master :s
(In reply to Bastian Ilsø from comment #2) > I can't get the patch to apply on master :s Did you update after bug 756363 landed? (I also have the patch from bug 710731 locally, but that shouldn't conflict with the patch here)
Review of attachment 313728 [details] [review]: ::: src/entryArea.js @@ +21,3 @@ + Name: 'ChatEntry', + Extends: Gtk.Entry, + Signals: { 'text-pasted': { param_types: [GObject.TYPE_STRING, Getting: [bastian@archxps polari]$ jhbuild run polari (org.gnome.Polari:11327): Gjs-WARNING **: JS ERROR: ReferenceError: GObject is not defined @resource:///org/gnome/Polari/js/entryArea.js:19 @resource:///org/gnome/Polari/js/roomStack.js:7 @resource:///org/gnome/Polari/js/mainWindow.js:15 @resource:///org/gnome/Polari/js/application.js:12 @resource:///org/gnome/Polari/js/main.js:10 start@resource:///org/gnome/gjs/modules/package.js:176 @/home/bastian/jhbuild/install/bin/polari:5 JS_EvaluateScript() failed
Created attachment 313732 [details] [review] entryArea: Don't flash pasted text when using paste service Eeeks, sorry - did this on top of a local patch that already added the import. This one should be good.
Review of attachment 313732 [details] [review]: I had to remove the "set a paste title" commit to test pasting at all on master, but tested the patch now and it seems to work....so LGTM :)
Attachment 313732 [details] pushed as 362990f - entryArea: Don't flash pasted text when using paste service