diff options
Diffstat (limited to 'linden/indra/newview/llviewermenufile.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenufile.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp index 97b11fd..13ff55c 100644 --- a/linden/indra/newview/llviewermenufile.cpp +++ b/linden/indra/newview/llviewermenufile.cpp | |||
@@ -52,7 +52,8 @@ | |||
52 | #include "llviewerregion.h" | 52 | #include "llviewerregion.h" |
53 | #include "llviewerstats.h" | 53 | #include "llviewerstats.h" |
54 | #include "llviewerwindow.h" | 54 | #include "llviewerwindow.h" |
55 | #include "viewer.h" // app_request_quit() | 55 | #include "llappviewer.h" |
56 | |||
56 | 57 | ||
57 | // linden libraries | 58 | // linden libraries |
58 | #include "llassetuploadresponders.h" | 59 | #include "llassetuploadresponders.h" |
@@ -347,6 +348,16 @@ class LLFileCloseWindow : public view_listener_t | |||
347 | } | 348 | } |
348 | }; | 349 | }; |
349 | 350 | ||
351 | class LLFileEnableCloseAllWindows : public view_listener_t | ||
352 | { | ||
353 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
354 | { | ||
355 | bool open_children = gFloaterView->allChildrenClosed(); | ||
356 | gMenuHolder->findControl(userdata["control"].asString())->setValue(!open_children); | ||
357 | return true; | ||
358 | } | ||
359 | }; | ||
360 | |||
350 | class LLFileCloseAllWindows : public view_listener_t | 361 | class LLFileCloseAllWindows : public view_listener_t |
351 | { | 362 | { |
352 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 363 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -439,7 +450,7 @@ class LLFileQuit : public view_listener_t | |||
439 | { | 450 | { |
440 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 451 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
441 | { | 452 | { |
442 | app_user_quit(); | 453 | LLAppViewer::instance()->userQuit(); |
443 | return true; | 454 | return true; |
444 | } | 455 | } |
445 | }; | 456 | }; |
@@ -1035,6 +1046,7 @@ void init_menu_file() | |||
1035 | (new LLFileCloseWindow())->registerListener(gMenuHolder, "File.CloseWindow"); | 1046 | (new LLFileCloseWindow())->registerListener(gMenuHolder, "File.CloseWindow"); |
1036 | (new LLFileCloseAllWindows())->registerListener(gMenuHolder, "File.CloseAllWindows"); | 1047 | (new LLFileCloseAllWindows())->registerListener(gMenuHolder, "File.CloseAllWindows"); |
1037 | (new LLFileEnableCloseWindow())->registerListener(gMenuHolder, "File.EnableCloseWindow"); | 1048 | (new LLFileEnableCloseWindow())->registerListener(gMenuHolder, "File.EnableCloseWindow"); |
1049 | (new LLFileEnableCloseAllWindows())->registerListener(gMenuHolder, "File.EnableCloseAllWindows"); | ||
1038 | (new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture"); | 1050 | (new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture"); |
1039 | (new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot"); | 1051 | (new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot"); |
1040 | (new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk"); | 1052 | (new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk"); |