GNOME Bugzilla – Bug 728371
Fix deprecation warnings
Last modified: 2014-04-21 05:13:08 UTC
While building swell-foop I have seen several clutter deprecation warnings, these should go away. Warning, incoming patches ahead.
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
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.
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
(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.
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.
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.
Review of attachment 274592 [details] [review]: I don't see anything wrong
Comment on attachment 274592 [details] [review] Fixed deprecation warnings Pushed to master
Comment on attachment 274593 [details] [review] Fix anchor_point deprecation warning Pushed to master
Thanks for the review, pushed the patches to master, marking as fixed.