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 $
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 <gtkmm/main.h>
#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<ResourceBundle>::Ref bundle;
try {
bundle = getBundle("uploadFileWindow");
} catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl;
return;
if (!scratchpadWindow.get()) {
Ptr<ResourceBundle>::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<UploadFileWindow>::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();
}
}

View file

@ -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;
* </code></pre>
*
* @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<GLiveSupport>::Ref gLiveSupport;
/**
* The one and only Upload File window.
*/
Ptr<UploadFileWindow>::Ref uploadFileWindow;
/**
* The one and only Scratchpad window.
*/