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 690735 - ClutterSwipeAction is broken
ClutterSwipeAction is broken
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-12-26 13:18 UTC by Tomeu Vizoso
Modified: 2013-01-16 22:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add default handler for ClutterSwipeAction::swipe (1.37 KB, patch)
2012-12-26 13:18 UTC, Tomeu Vizoso
rejected Details | Review
Add default handler for ClutterSwipeAction::swipe (1.43 KB, patch)
2013-01-03 15:24 UTC, Tomeu Vizoso
committed Details | Review

Description Tomeu Vizoso 2012-12-26 13:18:06 UTC
The swipe test in test-interactive is broken right now, because ::swept
is only emitted if ::swipe is implemented and returns TRUE.
Comment 1 Tomeu Vizoso 2012-12-26 13:18:08 UTC
Created attachment 232237 [details] [review]
Add default handler for ClutterSwipeAction::swipe

So code that still uses the deprecated ::swept keeps working
Comment 2 Emmanuele Bassi (:ebassi) 2012-12-26 14:24:15 UTC
Review of attachment 232237 [details] [review]:

The patch does not make any sense. ::swipe does not have return value, and ::swept was introduced for that reason.

If the callback has a void return type, why are you returning a Boolean value?
Comment 3 Tomeu Vizoso 2012-12-26 15:17:06 UTC
(In reply to comment #2)
> Review of attachment 232237 [details] [review]:
> 
> The patch does not make any sense. ::swipe does not have return value, and
> ::swept was introduced for that reason.
> 
> If the callback has a void return type, why are you returning a Boolean value?

::swipe Is the new signal, and it does have a return value. ::swept is the old one, which stopped working when ::swipe was introduced.

tests/interactive/test-swipe-action.c wasn't updated (nor ran, apparently) when ::swipe was added.
Comment 4 Emmanuele Bassi (:ebassi) 2012-12-28 17:12:54 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Review of attachment 232237 [details] [review] [details]:
> > 
> > The patch does not make any sense. ::swipe does not have return value, and
> > ::swept was introduced for that reason.
> > 
> > If the callback has a void return type, why are you returning a Boolean value?
> 
> ::swipe Is the new signal, and it does have a return value. ::swept is the old
> one, which stopped working when ::swipe was introduced.
> 
> tests/interactive/test-swipe-action.c wasn't updated (nor ran, apparently) when
> ::swipe was added.

I'm not contesting the validity of the claim that SwipeAction is broken: I'm contesting that the patch makes even remotely sense. sadly, I didn't have enough connectivity to do a proper review, so lemme do one properly.
Comment 5 Emmanuele Bassi (:ebassi) 2012-12-28 17:14:58 UTC
Review of attachment 232237 [details] [review]:

::: clutter/clutter-swipe-action.c
@@ +171,3 @@
 
+/* XXX:2.0 remove */
+static void

if the return type is 'void' then...

@@ +177,3 @@
+       gpointer               data_)
+{
+    return TRUE;

... this cannot return TRUE.

also, the coding style is wrong: it should be two spaces, not four.

@@ +193,3 @@
 
+  /* XXX:2.0 remove */
+  klass->swipe = swipe;

it's probably better to give a name like 'clutter_swipe_action_real_swipe', to avoid names collisions (I doubt we'll get one, but one-word functions tend to raise that kind of stuff).
Comment 6 Tomeu Vizoso 2013-01-03 15:24:00 UTC
Created attachment 232644 [details] [review]
Add default handler for ClutterSwipeAction::swipe

So code that still uses the deprecated ::swept keeps working
Comment 7 Tomeu Vizoso 2013-01-03 15:25:05 UTC
(In reply to comment #5)
> Review of attachment 232237 [details] [review]:
> 
> ::: clutter/clutter-swipe-action.c
> @@ +171,3 @@
> 
> +/* XXX:2.0 remove */
> +static void
> 
> if the return type is 'void' then...
> 
> @@ +177,3 @@
> +       gpointer               data_)
> +{
> +    return TRUE;
> 
> ... this cannot return TRUE.
> 
> also, the coding style is wrong: it should be two spaces, not four.

Now I got what you meant, sorry about that :)
Comment 8 Emmanuele Bassi (:ebassi) 2013-01-16 22:59:12 UTC
thanks; pushed to the master and clutter-1.14 branches.