From 8275ec1bc47c0d54308914c717ab1021ee8a12c0 Mon Sep 17 00:00:00 2001 From: Jens Persson Date: Tue, 29 Mar 2011 16:14:41 +0200 Subject: [PATCH] using quit from playlist instead --- src/panucci/gtkui/gtkmain.py | 2 +- src/panucci/player.py | 5 ----- src/panucci/playlist.py | 1 + src/panucci/qtui/qtmain.py | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/panucci/gtkui/gtkmain.py b/src/panucci/gtkui/gtkmain.py index c4eb962..e0da0c4 100644 --- a/src/panucci/gtkui/gtkmain.py +++ b/src/panucci/gtkui/gtkmain.py @@ -422,7 +422,7 @@ class PanucciGUI(object): def destroy(self, widget): self.main_window.hide() - self.playlist.player.quit() + self.playlist.quit() util.write_config(self.config) gtk.main_quit() diff --git a/src/panucci/player.py b/src/panucci/player.py index 6d2a751..7c819b3 100644 --- a/src/panucci/player.py +++ b/src/panucci/player.py @@ -196,8 +196,3 @@ class PanucciPlayer(ForwardingObservableService): def on_player_error(self, msg): self.__log.error("Error: %s", msg) - - def quit(self): - """ Called when the application exits """ - self.on_stop_requested() - self.playlist.quit() diff --git a/src/panucci/playlist.py b/src/panucci/playlist.py index a7406e4..e24db82 100644 --- a/src/panucci/playlist.py +++ b/src/panucci/playlist.py @@ -146,6 +146,7 @@ class Playlist(ObservableService): def quit(self): self.__log.debug('quit() called.') + self.notify('stop-requested', caller=self.quit) if self.__queue.modified: self.__log.info('Queue modified, saving temporary playlist') self.save_temp_playlist() diff --git a/src/panucci/qtui/qtmain.py b/src/panucci/qtui/qtmain.py index 1d45975..5ebecf2 100644 --- a/src/panucci/qtui/qtmain.py +++ b/src/panucci/qtui/qtmain.py @@ -189,7 +189,7 @@ class PanucciGUI(object): def quit_panucci(self): self.main_window.hide() - self.playlist.player.quit() + self.playlist.quit() util.write_config(self.config) self.app.exit() -- 2.11.4.GIT