diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx index cd50bbf1b..3b63ee917 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.20 $ + Version : $Revision: 1.21 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -39,8 +39,6 @@ #include #include "LiveSupport/Core/TimeConversion.h" -#include "UploadFileWindow.h" -#include "ScratchpadWindow.h" #include "MasterPanelWindow.h" @@ -303,18 +301,21 @@ MasterPanelWindow :: onUpdateTime(int dummy) throw () void MasterPanelWindow :: onUploadFileButtonClicked(void) throw () { - Ptr::Ref bundle; - try { - bundle = getBundle("uploadFileWindow"); - } catch (std::invalid_argument &e) { - std::cerr << e.what() << std::endl; - return; + if (!scratchpadWindow.get()) { + Ptr::Ref bundle; + try { + bundle = getBundle("uploadFileWindow"); + } catch (std::invalid_argument &e) { + std::cerr << e.what() << std::endl; + return; + } + + uploadFileWindow.reset(new UploadFileWindow(gLiveSupport, bundle)); } - Ptr::Ref uploadWindow(new UploadFileWindow(gLiveSupport, - bundle)); - - Gtk::Main::run(*uploadWindow); + if (!uploadFileWindow->is_visible()) { + uploadFileWindow->show(); + } } @@ -429,6 +430,23 @@ MasterPanelWindow :: showAnonymousUI(void) throw () scratchpadButton->hide(); simplePlaylistMgmtButton->hide(); schedulerButton->hide(); + searchButton->hide(); + + if (uploadFileWindow) { + uploadFileWindow->hide(); + } + if (scratchpadWindow) { + scratchpadWindow->hide(); + } + if (simplePlaylistMgmtWindow) { + simplePlaylistMgmtWindow->hide(); + } + if (schedulerWindow) { + schedulerWindow->hide(); + } + if (searchWindow) { + searchWindow->hide(); + } } diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.h b/livesupport/products/gLiveSupport/src/MasterPanelWindow.h index 551ea60fc..ac8ac75e3 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.h +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.12 $ + Version : $Revision: 1.13 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -50,6 +50,7 @@ #include "GLiveSupport.h" #include "MasterPanelUserInfoWidget.h" +#include "UploadFileWindow.h" #include "ScratchpadWindow.h" #include "SimplePlaylistManagementWindow.h" #include "SchedulerWindow.h" @@ -89,7 +90,7 @@ using namespace LiveSupport::Widgets; * * * @author $Author: fgerlits $ - * @version $Revision: 1.12 $ + * @version $Revision: 1.13 $ */ class MasterPanelWindow : public Gtk::Window, public LocalizedObject { @@ -210,6 +211,11 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject */ Ptr::Ref gLiveSupport; + /** + * The one and only Upload File window. + */ + Ptr::Ref uploadFileWindow; + /** * The one and only Scratchpad window. */