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 679451 - Add ::drag-progress signal
Add ::drag-progress signal
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-05 14:28 UTC by Emmanuele Bassi (:ebassi)
Modified: 2012-07-11 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
drag-action: Add ::drag-progress signal (9.20 KB, patch)
2012-07-05 14:28 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2012-07-05 14:28:28 UTC
Preventing ClutterDragAction::drag-motion from calling clutter_actor_move_by() is currently a pain: you need to either subclass ClutterDragAction, or stop the ::drag-motion signal emission.
Comment 1 Emmanuele Bassi (:ebassi) 2012-07-05 14:28:30 UTC
Created attachment 218095 [details] [review]
drag-action: Add ::drag-progress signal

Overriding the default behaviour of ClutterDragAction::drag-motion is
currently a pain; you either need to subclass the ClutterDragAction and
override the class closure for the signal, or you need to connect to the
signal and call g_signal_stop_emission_by_name() - neither option being
particularly nice or clean. The established pattern for these cases
would be to have a boolean return value on the ::drag-motion signal, but
we cannot do that without breaking ABI.

To solve the issue in a backward compatible way, we should introduce a
new signal, ::drag-progress, with a boolean return value. If the signal
emission chain returns TRUE, the ::drag-motion signal will be emitted,
and the default behaviour will be honoured; if the signal emission chain
returns FALSE, instead, the ::drag-motion signal will not be emitted.
Comment 2 Emmanuele Bassi (:ebassi) 2012-07-11 20:15:31 UTC
pushed to master.