After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665243 - settings: Add support for disabling middle click paste
settings: Add support for disabling middle click paste
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 665193
 
 
Reported: 2011-11-30 19:47 UTC by Bastien Nocera
Modified: 2013-08-04 09:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
settings: Add support for disabling middle click paste (2.60 KB, patch)
2011-11-30 19:47 UTC, Bastien Nocera
none Details | Review
text: Follow gtk-enable-primary-paste setting (3.04 KB, patch)
2011-11-30 19:47 UTC, Bastien Nocera
none Details | Review
text: Follow gtk-enable-primary-paste setting (3.11 KB, patch)
2012-02-19 13:41 UTC, Bastien Nocera
reviewed Details | Review
Add support for disabling middle click paste (5.54 KB, patch)
2012-05-04 01:59 UTC, Matthias Clasen
committed Details | Review

Description Bastien Nocera 2011-11-30 19:47:22 UTC
.
Comment 1 Bastien Nocera 2011-11-30 19:47:24 UTC
Created attachment 202479 [details] [review]
settings: Add support for disabling middle click paste
Comment 2 Bastien Nocera 2011-11-30 19:47:55 UTC
Created attachment 202480 [details] [review]
text: Follow gtk-enable-primary-paste setting
Comment 3 Bastien Nocera 2011-11-30 19:58:47 UTC
NB, untested.
Comment 4 Matthias Clasen 2011-12-06 03:02:09 UTC
Patch works fine in my testing.

Whats the plan here, add an xsetting behind this and set it from gsd ?
Comment 5 Bastien Nocera 2011-12-06 08:42:14 UTC
(In reply to comment #4)
> Patch works fine in my testing.
> 
> Whats the plan here, add an xsetting behind this and set it from gsd ?

Yes. Though we need to design the replacement functionality for it before pushing it. See bug 665193 comment 3.
Comment 6 Bastien Nocera 2012-02-19 13:41:12 UTC
Created attachment 207978 [details] [review]
text: Follow gtk-enable-primary-paste setting
Comment 7 Emmanuele Bassi (:ebassi) 2012-02-19 14:15:10 UTC
Review of attachment 207978 [details] [review]:

overall, it looks good to me.

::: gtk/gtkentry.c
@@ +3939,3 @@
       return TRUE;
     }
+  else if (event->button == GDK_BUTTON_MIDDLE && event->type == GDK_BUTTON_PRESS && get_middle_click_paste (entry))

I'd flip this check while we're at it: it makes more sense to check for the event type and then for the event button, then the reverse.
Comment 8 Matthias Clasen 2012-05-04 01:59:16 UTC
The following fix has been pushed:
c1f01eb Add support for disabling middle click paste
Comment 9 Matthias Clasen 2012-05-04 01:59:21 UTC
Created attachment 213430 [details] [review]
Add support for disabling middle click paste

Adds a gtk-enable-primary-paste setting that is backed by
and X setting, and make GtkEntry and GtkTextView respect it.