From 8b979c9f763a9f6e21c9ab45db8a8694a8260674 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Tue, 14 Nov 2006 18:52:17 +0000 Subject: [PATCH] not destroying the Live Mode window on logout (part of #1940) --- .../src/products/gLiveSupport/src/LiveModeWindow.h | 12 ++++++++++++ .../products/gLiveSupport/src/MasterPanelWindow.cxx | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h b/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h index 984a6e4ac..1fed4b240 100644 --- a/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h +++ b/campcaster/src/products/gLiveSupport/src/LiveModeWindow.h @@ -361,6 +361,18 @@ class LiveModeWindow : public GuiWindow */ void refreshPlaylist(Ptr::Ref playlist) throw (); + + /** + * Report whether the window is non-empty. + * + * @return true if there is at least one Playable item in the window. + */ + bool + isNotEmpty(void) throw () + { + return (treeModel->children().size() != 0); + } + }; /* ================================================= external data structures */ diff --git a/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx b/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx index e3c22e2c6..92a39c363 100644 --- a/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/campcaster/src/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -678,7 +678,7 @@ MasterPanelWindow :: showAnonymousUI(void) throw () if (liveModeWindow->is_visible()) { liveModeWindow->hide(); } - liveModeWindow.reset(); + // the Live Mode window is not destroyed at logout, unlike the others } if (uploadFileWindow.get()) { if (uploadFileWindow->is_visible()) { @@ -755,6 +755,10 @@ MasterPanelWindow :: showLoggedInUI(void) throw () } setSchedulerAvailable(gLiveSupport->isSchedulerAvailable()); + + if (liveModeWindow && liveModeWindow->isNotEmpty()) { + liveModeWindow->present(); + } }