Author: dmeyer
Date: Mon Jan 22 17:27:44 2007
New Revision: 9046
Modified:
trunk/ui/src/audio/player.py
Log:
use YieldCallback constructor
Modified: trunk/ui/src/audio/player.py
==============================================================================
--- trunk/ui/src/audio/player.py (original)
+++ trunk/ui/src/audio/player.py Mon Jan 22 17:27:44 2007
@@ -167,11 +167,7 @@
# FIXME: what happens if we send pause() the same time the file
# is finished? This would create a race condition.
self.player.pause()
- # TODO: lines like the next trhree lines happen very often,
- # maybe there is a way to make it shorter, e.g. yield a signal
- wait = kaa.notifier.YieldCallback()
- self.player.signals['pause'].connect_once(wait)
- yield wait
+ yield kaa.notifier.YieldCallback(self.player.signals['pause'])
self.free_resources()
@@ -190,9 +186,7 @@
log.error('unable to get AUDIO ressource')
yield False
self.player.resume()
- wait = kaa.notifier.YieldCallback()
- self.player.signals['play'].connect_once(wait)
- yield wait
+ yield kaa.notifier.YieldCallback(self.player.signals['play'])
def elapsed(self):
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog