mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
reference: GuiLock updated to reflect new MT rules
git-svn-id: svn://ultimatepp.org/upp/trunk@6168 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f928e99866
commit
af76ef90d2
1 changed files with 9 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ struct App : TopWindow {
|
|||
Thread work;
|
||||
|
||||
void Work();
|
||||
void AskQuit(bool *quit);
|
||||
|
||||
ArrayCtrl list;
|
||||
|
||||
|
|
@ -15,6 +16,11 @@ struct App : TopWindow {
|
|||
~App();
|
||||
};
|
||||
|
||||
void App::AskQuit(bool *quit)
|
||||
{
|
||||
*quit = PromptYesNo("Quit?");
|
||||
}
|
||||
|
||||
void App::Work()
|
||||
{
|
||||
for(;;) {
|
||||
|
|
@ -23,7 +29,9 @@ void App::Work()
|
|||
if(IsShutdownThreads())
|
||||
break;
|
||||
if(list.GetCount() > 100) {
|
||||
if(PromptYesNo("Quit?")) {
|
||||
bool quit;
|
||||
Call(PTEBACK1(AskQuit, &quit));
|
||||
if(quit) {
|
||||
Break();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue