* Fixed #4339 - I did not use stimut's patch (but thanks a lot, I wouldn't even

have started looking into it without it!), but solved it a bit differently by
  moving the state saving into the destructor, and removing the tab in question
  manually afterwards.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35727 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-03-02 18:44:28 +00:00
parent d40a935560
commit 9562c7f592
@@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2007, Haiku. * Copyright 2003-2010, Haiku.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -308,6 +308,7 @@ ModulesView::~ModulesView()
void void
ModulesView::DetachedFromWindow() ModulesView::DetachedFromWindow()
{ {
SaveState();
_CloseSaver(); _CloseSaver();
} }
@@ -639,6 +640,14 @@ ScreenSaverWindow::ScreenSaverWindow()
ScreenSaverWindow::~ScreenSaverWindow() ScreenSaverWindow::~ScreenSaverWindow()
{ {
Hide();
_UpdateStatus();
delete fTabView->RemoveTab(1);
// We delete this here in order to make sure the module view saves its
// state while the window is still intact.
fSettings.Save();
} }
@@ -917,10 +926,6 @@ ScreenSaverWindow::ScreenChanged(BRect frame, color_space colorSpace)
bool bool
ScreenSaverWindow::QuitRequested() ScreenSaverWindow::QuitRequested()
{ {
_UpdateStatus();
fModulesView->SaveState();
fSettings.Save();
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
return true; return true;
} }