Ticket #4339: ScreenSaverWindew.cpp.diff
File ScreenSaverWindew.cpp.diff, 1.4 KB (added by , 15 years ago) |
---|
-
src/preferences/screensaver/ScreenSaverWindow.cpp
97 97 void PopulateScreenSaverList(); 98 98 void SaveState(); 99 99 100 inline void SetQuitting(bool quitting) {fIsQuitting = quitting;} 101 100 102 private: 101 103 static int _CompareScreenSaverItems(const void* left, const void* right); 102 104 BScreenSaver* _ScreenSaver(); 103 105 void _CloseSaver(); 104 106 void _OpenSaver(); 105 107 108 inline bool IsQuitting() {return fIsQuitting;} 109 106 110 BFilePanel* fFilePanel; 107 111 BListView* fListView; 108 112 BButton* fTestButton; … … 118 122 PreviewView* fPreviewView; 119 123 120 124 team_id fScreenSaverTestTeamId; 125 126 bool fIsQuitting; 121 127 }; 122 128 123 129 static const int32 kTimeInUnits[] = { … … 252 258 : BView(rect, name, B_FOLLOW_ALL, B_WILL_DRAW), 253 259 fSettings(settings), 254 260 fSaverRunner(NULL), 255 fSettingsView(NULL) 261 fSettingsView(NULL), 262 fIsQuitting(false) 256 263 { 257 264 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 258 265 … … 308 315 void 309 316 ModulesView::DetachedFromWindow() 310 317 { 318 if (!IsQuitting()) 319 SaveState(); 311 320 _CloseSaver(); 312 321 } 313 322 … … 920 929 _UpdateStatus(); 921 930 fModulesView->SaveState(); 922 931 fSettings.Save(); 932 fModulesView->SetQuitting(true); 923 933 924 934 be_app->PostMessage(B_QUIT_REQUESTED); 925 935 return true;