From d5c62413babc598d80b88f5bafe682b3a89d2dea Mon Sep 17 00:00:00 2001 From: fgerlits Date: Fri, 26 Aug 2005 09:21:24 +0000 Subject: [PATCH] fixed bug #1346 --- .../src/SimplePlaylistManagementWindow.cxx | 12 +++++++----- .../src/SimplePlaylistManagementWindow.h | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx index 9657d470e..56b1cefe9 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.28 $ + Version : $Revision: 1.29 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -249,7 +249,7 @@ SimplePlaylistManagementWindow :: ~SimplePlaylistManagementWindow (void) * Save the edited playlist. *----------------------------------------------------------------------------*/ bool -SimplePlaylistManagementWindow :: savePlaylist (void) throw () +SimplePlaylistManagementWindow :: savePlaylist(bool reopen) throw () { try { Ptr::Ref playlist @@ -267,7 +267,9 @@ SimplePlaylistManagementWindow :: savePlaylist (void) throw () playlist->setTitle(title); gLiveSupport->savePlaylist(); - gLiveSupport->openPlaylistForEditing(playlist->getId()); + if (reopen) { + gLiveSupport->openPlaylistForEditing(playlist->getId()); + } isPlaylistModified = false; Ptr::Ref statusText = formatMessage( @@ -289,7 +291,7 @@ SimplePlaylistManagementWindow :: savePlaylist (void) throw () void SimplePlaylistManagementWindow :: onSaveButtonClicked(void) throw () { - savePlaylist(); + savePlaylist(true); } @@ -319,7 +321,7 @@ SimplePlaylistManagementWindow :: onCloseButtonClicked(void) throw () case DialogWindow::noButton: cancelPlaylist(); break; - case DialogWindow::yesButton: if (savePlaylist()) { + case DialogWindow::yesButton: if (savePlaylist(false)) { closeWindow(); } break; diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h index 86e506f05..d8bbb73f5 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.13 $ + Version : $Revision: 1.14 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -88,7 +88,7 @@ using namespace LiveSupport::Widgets; * * * @author $Author: fgerlits $ - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ */ class SimplePlaylistManagementWindow : public WhiteWindow, public LocalizedObject @@ -245,10 +245,12 @@ class SimplePlaylistManagementWindow : public WhiteWindow, /** * Save the edited playlist. * + * @param reopen true if the playlist needs to be opened for + * editing again after saving it. * @return true if the playlist was saved successully. */ virtual bool - savePlaylist(void) throw (); + savePlaylist(bool reopen) throw (); protected: @@ -258,7 +260,7 @@ class SimplePlaylistManagementWindow : public WhiteWindow, * Lists one playlist entry per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ */ class ModelColumns : public ZebraTreeModelColumnRecord {