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 668692 - Add symbolic names for left, right and middle buttons
Add symbolic names for left, right and middle buttons
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on: 668688
Blocks:
 
 
Reported: 2012-01-25 20:50 UTC by Emmanuele Bassi (:ebassi)
Modified: 2012-01-27 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
event: Add symbolic names for left, middle, and right buttons (2.64 KB, patch)
2012-01-27 11:23 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
drag-action: Use the symbolic constants for the button (971 bytes, patch)
2012-01-27 11:23 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
docs: Update to show the symbolic button names (2.75 KB, patch)
2012-01-27 11:23 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
tests: Update to use the symbolic button names (2.33 KB, patch)
2012-01-27 11:24 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2012-01-25 20:50:06 UTC
+++ This bug was initially created as a clone of Bug #668688 +++

Created an attachment (id=206125)
Add symbolic names for left, right and middle buttons

Add GDK_BUTTON_LEFT, GDK_BUTTON_MIDDLE and GDK_BUTTON_RIGHT macros and use them everywhere in gtk source code. I've split the patch into several commits (once per file) as suggested by Company. Attached here as a single file to make it easier.
Comment 1 Emmanuele Bassi (:ebassi) 2012-01-27 11:23:54 UTC
Created attachment 206249 [details] [review]
event: Add symbolic names for left, middle, and right buttons

Symbolic names are better than magic numbers, even if they are
well-established and won't likely change.

This maps to a commit in GTK+ that introduced the same names; it
was decided to go for PRIMARY, MIDDLE, and SECONDARY because of
the confusion that may arise when the button order gets flipped
in left-handed configurations - the "left" button (i.e. 1) becomes
the right-most button, and the "right" button (i.e. 3) becomes
the left-most button.
Comment 2 Emmanuele Bassi (:ebassi) 2012-01-27 11:23:56 UTC
Created attachment 206250 [details] [review]
drag-action: Use the symbolic constants for the button
Comment 3 Emmanuele Bassi (:ebassi) 2012-01-27 11:23:59 UTC
Created attachment 206251 [details] [review]
docs: Update to show the symbolic button names
Comment 4 Emmanuele Bassi (:ebassi) 2012-01-27 11:24:01 UTC
Created attachment 206252 [details] [review]
tests: Update to use the symbolic button names
Comment 5 Emmanuele Bassi (:ebassi) 2012-01-27 11:56:24 UTC
Attachment 206249 [details] pushed as 60cddbd - event: Add symbolic names for left, middle, and right buttons
Attachment 206250 [details] pushed as 12a79a6 - drag-action: Use the symbolic constants for the button
Attachment 206251 [details] pushed as 54c9257 - docs: Update to show the symbolic button names
Attachment 206252 [details] pushed as ccc70a9 - tests: Update to use the symbolic button names