added "close all open windows" command to Logout button signal handler

This commit is contained in:
fgerlits 2005-04-22 13:42:28 +00:00
parent 18f08574a3
commit a642c0d6df
2 changed files with 39 additions and 15 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ 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 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -39,8 +39,6 @@
#include <gtkmm/main.h> #include <gtkmm/main.h>
#include "LiveSupport/Core/TimeConversion.h" #include "LiveSupport/Core/TimeConversion.h"
#include "UploadFileWindow.h"
#include "ScratchpadWindow.h"
#include "MasterPanelWindow.h" #include "MasterPanelWindow.h"
@ -303,6 +301,7 @@ MasterPanelWindow :: onUpdateTime(int dummy) throw ()
void void
MasterPanelWindow :: onUploadFileButtonClicked(void) throw () MasterPanelWindow :: onUploadFileButtonClicked(void) throw ()
{ {
if (!scratchpadWindow.get()) {
Ptr<ResourceBundle>::Ref bundle; Ptr<ResourceBundle>::Ref bundle;
try { try {
bundle = getBundle("uploadFileWindow"); bundle = getBundle("uploadFileWindow");
@ -311,10 +310,12 @@ MasterPanelWindow :: onUploadFileButtonClicked(void) throw ()
return; return;
} }
Ptr<UploadFileWindow>::Ref uploadWindow(new UploadFileWindow(gLiveSupport, uploadFileWindow.reset(new UploadFileWindow(gLiveSupport, bundle));
bundle)); }
Gtk::Main::run(*uploadWindow); if (!uploadFileWindow->is_visible()) {
uploadFileWindow->show();
}
} }
@ -429,6 +430,23 @@ MasterPanelWindow :: showAnonymousUI(void) throw ()
scratchpadButton->hide(); scratchpadButton->hide();
simplePlaylistMgmtButton->hide(); simplePlaylistMgmtButton->hide();
schedulerButton->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();
}
} }

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ 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 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -50,6 +50,7 @@
#include "GLiveSupport.h" #include "GLiveSupport.h"
#include "MasterPanelUserInfoWidget.h" #include "MasterPanelUserInfoWidget.h"
#include "UploadFileWindow.h"
#include "ScratchpadWindow.h" #include "ScratchpadWindow.h"
#include "SimplePlaylistManagementWindow.h" #include "SimplePlaylistManagementWindow.h"
#include "SchedulerWindow.h" #include "SchedulerWindow.h"
@ -89,7 +90,7 @@ using namespace LiveSupport::Widgets;
* </code></pre> * </code></pre>
* *
* @author $Author: fgerlits $ * @author $Author: fgerlits $
* @version $Revision: 1.12 $ * @version $Revision: 1.13 $
*/ */
class MasterPanelWindow : public Gtk::Window, public LocalizedObject class MasterPanelWindow : public Gtk::Window, public LocalizedObject
{ {
@ -210,6 +211,11 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject
*/ */
Ptr<GLiveSupport>::Ref gLiveSupport; Ptr<GLiveSupport>::Ref gLiveSupport;
/**
* The one and only Upload File window.
*/
Ptr<UploadFileWindow>::Ref uploadFileWindow;
/** /**
* The one and only Scratchpad window. * The one and only Scratchpad window.
*/ */