GNOME Bugzilla – Bug 668692
Add symbolic names for left, right and middle buttons
Last modified: 2012-01-27 11:56:35 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.
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.
Created attachment 206250 [details] [review] drag-action: Use the symbolic constants for the button
Created attachment 206251 [details] [review] docs: Update to show the symbolic button names
Created attachment 206252 [details] [review] tests: Update to use the symbolic button names
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