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 698668 - A few improvements to ClutterGestureAction
A few improvements to ClutterGestureAction
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterAction
1.14.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-23 15:44 UTC by Lionel Landwerlin
Modified: 2013-04-23 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix typo (1.05 KB, patch)
2013-04-23 15:45 UTC, Lionel Landwerlin
committed Details | Review
Expose n-touch-points property (4.37 KB, patch)
2013-04-23 15:45 UTC, Lionel Landwerlin
committed Details | Review
Avoid shadowing time() function (2.03 KB, patch)
2013-04-23 15:46 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2013-04-23 15:44:31 UTC
Here are a few tiny improvements to ClutterGestureAction, the biggest one being to expose a property.
Comment 1 Lionel Landwerlin 2013-04-23 15:45:36 UTC
Created attachment 242247 [details] [review]
Fix typo
Comment 2 Lionel Landwerlin 2013-04-23 15:45:57 UTC
Created attachment 242248 [details] [review]
Expose n-touch-points property
Comment 3 Lionel Landwerlin 2013-04-23 15:46:20 UTC
Created attachment 242249 [details] [review]
Avoid shadowing time() function
Comment 4 Emmanuele Bassi (:ebassi) 2013-04-23 15:51:38 UTC
Review of attachment 242247 [details] [review]:

LGTM
Comment 5 Emmanuele Bassi (:ebassi) 2013-04-23 15:52:57 UTC
Review of attachment 242248 [details] [review]:

::: clutter/clutter-gesture-action.c
@@ +606,3 @@
+   */
+  gesture_props[PROP_N_TOUCH_POINTS] =
+    g_param_spec_int ("n-touch-points",

should this be a uint instead?

@@ +973,3 @@
   priv->requested_nb_points = nb_points;
 
+  g_object_notify_by_pspec (G_OBJECT (action),

we usually notify after all the side effects of a property have been settled, so I'd move this at the end of the function.
Comment 6 Emmanuele Bassi (:ebassi) 2013-04-23 15:53:25 UTC
Review of attachment 242249 [details] [review]:

looks good.
Comment 7 Lionel Landwerlin 2013-04-23 16:40:02 UTC
Comment on attachment 242248 [details] [review]
Expose n-touch-points property

Since the functions exposing that property use gint, we stick to gint.

Otherwise the notify() has been moved to the end of the function.
Comment 8 Lionel Landwerlin 2013-04-23 16:40:21 UTC
Pushed to ALL THE BRANCHES.