diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-03 11:12:13 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-03 11:12:13 +0000 |
| commit | 8a951b87cc4f6d4db0f1c3c9113a4c0943971ef2 (patch) | |
| tree | 4a43967a332bc4162a32efcbb0ad6454078798c3 | |
| parent | c54ee36de25775299773381e9f15667659b3b6db (diff) | |
| download | enigma2-8a951b87cc4f6d4db0f1c3c9113a4c0943971ef2.tar.gz enigma2-8a951b87cc4f6d4db0f1c3c9113a4c0943971ef2.zip | |
remove ugly HACK
send evEnd in correct order (this assumes that no one need the
currentService after evEnd is dispatched or in the evEnd callback
| -rw-r--r-- | Navigation.py | 10 | ||||
| -rw-r--r-- | lib/nav/core.cpp | 5 |
2 files changed, 6 insertions, 9 deletions
diff --git a/Navigation.py b/Navigation.py index ece89227..06d47ac4 100644 --- a/Navigation.py +++ b/Navigation.py @@ -28,12 +28,10 @@ class Navigation: self.record_event = [ ] self.currentlyPlayingServiceReference = None self.currentlyPlayingService = None - self.state = 0 self.RecordTimer = RecordTimer.RecordTimer() self.SleepTimer = SleepTimer.SleepTimer() def dispatchEvent(self, i): - self.state = i != 1 for x in self.event: x(i) @@ -91,11 +89,9 @@ class Navigation: return self.pnav and self.pnav.getRecordings() def getCurrentService(self): - if self.state: - if not self.currentlyPlayingService: - self.currentlyPlayingService = self.pnav and self.pnav.getCurrentService() - return self.currentlyPlayingService - return None + if not self.currentlyPlayingService: + self.currentlyPlayingService = self.pnav and self.pnav.getCurrentService() + return self.currentlyPlayingService def stopService(self): print "stopService" diff --git a/lib/nav/core.cpp b/lib/nav/core.cpp index 45b4aa6f..0b690b81 100644 --- a/lib/nav/core.cpp +++ b/lib/nav/core.cpp @@ -59,13 +59,14 @@ RESULT eNavigation::stopService(void) /* check if there is a running service... */ if (!m_runningService) return 1; - /* send stop event */ - m_event(iPlayableService::evEnd); ePtr<iPlayableService> tmp = m_runningService; m_runningService=0; tmp->stop(); + /* send stop event */ + m_event(iPlayableService::evEnd); + /* kill service. */ m_service_event_conn = 0; return 0; |
