drag-action: Allow using settings for the drag threshold
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 28 Feb 2011 17:47:50 +0000 (17:47 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 9 Mar 2011 14:21:01 +0000 (14:21 +0000)
commit82a30d8e0b4198918086622ecedcbf2ab11a2ab1
treeed393fd4af8355d53996ed44068016c2dfa9c95f
parentbca7422f3d53e9d719d385d52f501f9f89035105
drag-action: Allow using settings for the drag threshold

ClutterDragAction should be able to use the newly added ClutterSettings
property exposing the system's drag threshold.

Currently, the x-drag-threshold and the y-drag-threshold properties (and
relative accessors) use an unsigned integer for their values; we should
be able to safely expand the range to include -1 as the minimum value,
and use this new value to tell the ClutterDragAction that it should query
the ClutterSettings object for the drag threshold.

The storage of the properties has been changed, albeit in a compatible
way, as GObject installs a uint ↔ int transformation function for GValue
automatically.

The setter for the drag thresholds has been changes to use a signed
integer, but the getter has been updated to always Do The Right Thing™:
it never returns -1 but, instead, will return the valid drag threshold,
either from the value set or from the Settings singleton.

This change is ABI compatible.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2583
clutter/clutter-drag-action.c
clutter/clutter-drag-action.h