[pyclutter] examples: Use the constructor normal form



commit 3795b02a9fbd3d6dd4d2a0072cd6bd52642b020d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Apr 13 12:33:52 2015 +0100

    examples: Use the constructor normal form
    
    Don't use legacy API.

 examples/rounded-rectangle.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/examples/rounded-rectangle.py b/examples/rounded-rectangle.py
index 3709ae8..18fb333 100644
--- a/examples/rounded-rectangle.py
+++ b/examples/rounded-rectangle.py
@@ -59,11 +59,11 @@ if __name__ == '__main__':
     stage.add_child(actor)
 
     # We use an explicit transition because we want to make it loop
-    transition = Clutter.PropertyTransition('rotation-angle-y')
+    transition = Clutter.PropertyTransition(property_name='rotation-angle-y',
+                                            duration=2000,
+                                            repeat_count=-1)
     transition.set_from(0)
     transition.set_to(360)
-    transition.set_duration(2000)
-    transition.set_repeat_count(-1)
     actor.add_transition('rotateActor', transition)
 
     # Connect to the 'draw' signal before invalidating, so that the canvas


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]