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 728371 - Fix deprecation warnings
Fix deprecation warnings
Status: RESOLVED FIXED
Product: swell-foop
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: swell-foop-maint
swell-foop-maint
Depends on:
Blocks: 728620
 
 
Reported: 2014-04-16 20:00 UTC by Robert Roth
Modified: 2014-04-21 05:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix some deprecation warnings (6.95 KB, patch)
2014-04-16 20:12 UTC, Robert Roth
needs-work Details | Review
Further improvements (6.11 KB, patch)
2014-04-17 02:02 UTC, Robert Roth
reviewed Details | Review
Fixed deprecation warnings (11.46 KB, patch)
2014-04-17 11:04 UTC, Robert Roth
committed Details | Review
Fix anchor_point deprecation warning (4.11 KB, patch)
2014-04-17 11:07 UTC, Robert Roth
committed Details | Review

Description Robert Roth 2014-04-16 20:00:03 UTC
While building swell-foop I have seen several clutter deprecation warnings, these should go away. Warning, incoming patches ahead.
Comment 1 Robert Roth 2014-04-16 20:12:28 UTC
Created attachment 274518 [details] [review]
Fix some deprecation warnings

Fixed
* Actor.add_actor deprecation warnings - replaced by Actor.add_child
* Actor.animate deprecation warnings - replaced by setting easing properties
* Actor.depth deprecation warnings - replaced with z-position
* Stage.color deprecation warning - replaced with Actor.background_color
* Group.new deprecation warning - replaced with Actor.new
Comment 2 Robert Roth 2014-04-17 02:02:17 UTC
Created attachment 274551 [details] [review]
Further improvements

Fixed deprecation warning from Clutter.Texture.from_file by replacing the Clutter.Texture.from_file calls with setting the content of the actor to a Clutter.Image preloaded from a GdkPixbuf.
Comment 3 Michael Catanzaro 2014-04-17 03:21:36 UTC
Review of attachment 274518 [details] [review]:

Can you make sure to bump the Clutter dependency in configure.ac if that's necessary?  The Vala dependency is high enough that it should be fine.

I've never taken the time to learn Clutter, so my review is just a quick sanity check. These patches cause a spew of the following warning: (swell-foop:899): Cogl-CRITICAL **: cogl_pipeline_set_layer_filters: assertion 'mag_filter == COGL_PIPELINE_FILTER_NEAREST || mag_filter == COGL_PIPELINE_FILTER_LINEAR' failed

Also there's one warning left, don't know if you're already working on it or not: game-view.vala:426.9-426.22: warning: Clutter.Actor.anchor_gravity has been deprecated since 1.12
Comment 4 Robert Roth 2014-04-17 06:40:39 UTC
(In reply to comment #3)
Thanks for the quick review.
> Review of attachment 274518 [details] [review]:
> 
> Can you make sure to bump the Clutter dependency in configure.ac if that's
> necessary?  The Vala dependency is high enough that it should be fine.
> 
I will check the clutter dependency, I doubt that it will require bumping,
however during development (using both Fedora 20 +Gnome 3.12 and Ubuntu +most of Gnome 3.12) I have seen that the clutter-gtk dependency has been bumped to 1.5.0 recently, however it works fine on ubuntu with clutter-gtk 1.4.4 (builds and runs fine, although I don't have a touchscreen to test with, only regular mouse), so maybe 1.4.4 would be enough.

> I've never taken the time to learn Clutter, so my review is just a quick sanity
> check. These patches cause a spew of the following warning: (swell-foop:899):
> Cogl-CRITICAL **: cogl_pipeline_set_layer_filters: assertion 'mag_filter ==
> COGL_PIPELINE_FILTER_NEAREST || mag_filter == COGL_PIPELINE_FILTER_LINEAR'
> failed
Strangel, I don't see those warnings, but I will check and propose some changes, if you would be willing to test if those still spew these warnings

> 
> Also there's one warning left, don't know if you're already working on it or
> not: game-view.vala:426.9-426.22: warning: Clutter.Actor.anchor_gravity has
> been deprecated since 1.12
I know, it's bugging me, that is coming from the scores animation, and I have managed to migrate the game score addition animation, but somehow I can't get the Game Over text animation to stay centered as it does with anchor_gravity. I will experiment a bit more, we can leave this ticket open until I (or someone else) find(s) a solution.
Comment 5 Robert Roth 2014-04-17 11:04:24 UTC
Created attachment 274592 [details] [review]
Fixed deprecation warnings

Merged the two patches containing the deprecation fixes for all but one deprecations (all the trivial ones).

This patch also has some changes to avoid the warnings mentioned in comment:3.

Checked the requirements, the functions used in the patch are in clutter since 1.12, and the clutter requirement is already at 1.14, so it doesn't need bumping.
Comment 6 Robert Roth 2014-04-17 11:07:47 UTC
Created attachment 274593 [details] [review]
Fix anchor_point deprecation warning

Filing this as a separate patch, as this needed more changes.
Fixed the deprecation warning for anchor_point by replacing the score scaling animation at game over with a z_position animation, which looks similar.

Tested with all three board sizes, on the smallest size the game over text fills the screen, on the other two it's centered and occupies about half width and height, looks nicer with a padding, as on the mockups.
Comment 7 Michael Catanzaro 2014-04-17 14:40:56 UTC
Review of attachment 274592 [details] [review]:

I don't see anything wrong
Comment 8 Michael Catanzaro 2014-04-17 14:40:57 UTC
Review of attachment 274592 [details] [review]:

I don't see anything wrong
Comment 9 Robert Roth 2014-04-21 05:12:14 UTC
Comment on attachment 274592 [details] [review]
Fixed deprecation warnings

Pushed to master
Comment 10 Robert Roth 2014-04-21 05:12:24 UTC
Comment on attachment 274593 [details] [review]
Fix anchor_point deprecation warning

Pushed to master
Comment 11 Robert Roth 2014-04-21 05:13:08 UTC
Thanks for the review, pushed the patches to master, marking as fixed.