GNOME Bugzilla – Bug 725088
Fpaste when message is long and misclick prevention
Last modified: 2015-10-14 01:51:31 UTC
Usecases: (1) when you type a message longer then 100 (we can discuss the limit) characters it make sense to use paste-bin service automatically. (2) drag'n'drop can occasually cause the misclick and paste the unwanted URL. So, I suggest to paste the URL if only text is long and only by entry.
Created attachment 309432 [details] [review] Update and activate paste service integration Brings back paste service integration to Polari. When pasting more than 5 lines into the entry area, ask the user if the multiline text should be uploaded to a public paste service. 'Enter' confirms and 'Esc' cancels.
Review of attachment 309432 [details] [review]: As talked on hangouts, this approach doesn't really work with DND (and non-textual data as images in particular). However that requires some more thinking, and should be fixable post-freeze without a break, so let's go with this for 3.17.90 - couple of issues still, but overall looks good (nice work!) ::: src/entryArea.js @@ +103,3 @@ + multiLineBox.add(this._multiLinelabel); + + this._pasteButton = new Gtk.Button({ label: _("Paste"), has_focus: true, Probably a good idea to use mnemonics @@ +108,3 @@ + this._pasteButton.connect('clicked', Lang.bind(this, function() { + this._entry.text = ''; + this.stack.visible_child_name = 'default'; This is exactly the as the cancelButton's ::clicked handler - please split out into a named function to share the code between both buttons. @@ +110,3 @@ + this.stack.visible_child_name = 'default'; + })); + multiLineBox.add(this._pasteButton); [Paste][Cancel] is very un-gnomey when compared to [Cancel][Paste] ...
Created attachment 309728 [details] [review] entryArea: Update and activate paste service integration This is the patch with the comments from the review applied, plus a couple more things: - make the stack the toplevel EntryArea widget - no point in having a box with a single child in the hierarchy - fix 'linked' style of nick and main entry - use ngettext() for plural - not an issue for English and most (all?) Western language (as the paste code never triggers for "1 line"), but some languages have far more complicated plural rules (e.g. the word "line" varies between "20 lines", "21 lines" and "22 lines" - some style issues like space before opening parentheses
Attachment 309728 [details] pushed as ec24d29 - entryArea: Update and activate paste service integration (need to get 3.17.90 out, sorry)
*** Bug 722011 has been marked as a duplicate of this bug. ***