Code review comment for lp://staging/~samuel-buffet/entertainer/ftx1

Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

There's no need to handle anything on timelines on those callbacks. The timeline can be usefull to get the frame number, the total number of frames etc... when the timeline is *playing* but those callbacks are called when the timeline is *completed*

the diff :
=== modified file 'entertainerlib/frontend/gui/screens/photoalbums_screen.py'
--- entertainerlib/frontend/gui/screens/photoalbums_screen.py 2008-12-14 22:46:36 +0000
+++ entertainerlib/frontend/gui/screens/photoalbums_screen.py 2009-01-06 11:01:42 +0000
@@ -236,10 +236,9 @@
     def _change_preview_timeline_ended(self, timeline, group):
         """
         This is a callback function for preview updates. This is called when
- transition effect is finished. This mehtod removes old preview group
+ transition effect is finished. This method removes old preview group
         from the stage.
         """
- # TODO: Figure out if/how timeline needs to be used
         self.remove(group)

     def _change_preview_image(self):

=== modified file 'entertainerlib/frontend/gui/transitions/fade_transition.py'
--- entertainerlib/frontend/gui/transitions/fade_transition.py 2008-10-07 22:59:41 +0000
+++ entertainerlib/frontend/gui/transitions/fade_transition.py 2009-01-06 11:01:42 +0000
@@ -70,11 +70,3 @@
         # Same effect. Direction doesn't make any difference
         self.forward_effect(from_screen, to_screen)

- def _remove_from_stage_callback(self, timeline, screen):
- """
- Callback for fadeout timeline. This method is called when transition
- direction is BACKWARDS. This method removes old screen from stage.
- """
- # TODO: Determine if timeline needs to be used somehow
- self.stage.remove(screen)
-

=== modified file 'entertainerlib/frontend/gui/transitions/slide_and_fade_transition.py'
--- entertainerlib/frontend/gui/transitions/slide_and_fade_transition.py 2008-10-07 22:59:41 +0000
+++ entertainerlib/frontend/gui/transitions/slide_and_fade_transition.py 2009-01-06 11:01:42 +0000
@@ -162,11 +162,3 @@
         slide_out.start()
         slide_in.start()

- def _remove_from_stage_callback(self, timeline, screen):
- """
- Callback for fadeout timeline. This method is called when transition
- direction is BACKWARDS. This method removes old screen from stage.
- """
- # TODO: Figure out if timeline needs to be used somehow
- self.stage.remove(screen)
-

=== modified file 'entertainerlib/frontend/gui/transitions/slide_transition.py'
--- entertainerlib/frontend/gui/transitions/slide_transition.py 2008-10-07 22:59:41 +0000
+++ entertainerlib/frontend/gui/transitions/slide_transition.py 2009-01-06 11:01:42 +0000
@@ -153,11 +153,3 @@
         slide_out.start()
         slide_in.start()

- def _remove_from_stage_callback(self, timeline, screen):
- """
- Callback for fadeout timeline. This method is called when transition
- direction is BACKWARDS. This method removes old screen from stage.
- """
- # TODO: Determine if timeline should be used.
- self.stage.remove(screen)
-

=== modified file 'entertainerlib/frontend/gui/transitions/transition.py'
--- entertainerlib/frontend/gui/transitions/transition.py 2008-08-02 21:33:38 +0000
+++ entertainerlib/frontend/gui/transitions/transition.py 2009-01-06 11:01:42 +0000
@@ -47,3 +47,10 @@
         """
         pass

+ def _remove_from_stage_callback(self, timeline, screen):
+ """
+ Callback for fadeout timeline. This method is called when transition
+ direction is BACKWARDS. This method removes old screen from stage.
+ """
+ self.stage.remove(screen)
+

=== modified file 'entertainerlib/frontend/gui/transitions/zoom_and_fade_transition.py'
--- entertainerlib/frontend/gui/transitions/zoom_and_fade_transition.py 2008-10-07 22:59:41 +0000
+++ entertainerlib/frontend/gui/transitions/zoom_and_fade_transition.py 2009-01-06 11:01:42 +0000
@@ -105,11 +105,3 @@
             fade_out.start()
         fade_in.start()

- def _remove_from_stage_callback(self, timeline, screen):
- """
- Callback for fadeout timeline. This method is called when transition
- direction is BACKWARDS. This method removes old screen from stage.
- """
- # TODO: Determine if timeline should be used
- self.stage.remove(screen)
-

Cheers,

Samuel

« Back to merge proposal