diff options
author | Mark Palange <palange@lindenlab.com> | 2008-12-23 19:39:58 +0000 |
---|---|---|
committer | Mark Palange <palange@lindenlab.com> | 2008-12-23 19:39:58 +0000 |
commit | fb793870fe95f1951d7c30ea6068e187b9dededd (patch) | |
tree | 6d11632353ff4fb07133625ec5031b135b1e2882 /indra/newview/llviewermenu.cpp | |
parent | d182b9fb82b9c63f41d81bc80dbbfe627475facf (diff) |
QAR-1142 merging 1.22 RC0-RC4 changes.
svn merge -c 106471 svn+ssh://svn.lindenlab.com/svn/linden/qa/viewer_1-22-106055_merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 91 |
1 files changed, 50 insertions, 41 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6e37e6253f..c8ad7fad97 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1023,7 +1023,6 @@ void init_debug_ui_menu(LLMenuGL* menu) menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test)); menu->append(new LLMenuItemCallGL("Buy Currency Test", &handle_buy_currency_test)); menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); - menu->append(new LLMenuItemToggleGL("Async Keystrokes", &gHandleKeysAsync)); menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr)); menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory)); menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); @@ -1154,10 +1153,6 @@ void init_debug_rendering_menu(LLMenuGL* menu) &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_ALT|MASK_CONTROL)); - sub_menu->append(new LLMenuItemCheckGL("Palletized Textures", - &LLPipeline::toggleRenderDebugFeature, NULL, - &LLPipeline::toggleRenderDebugFeatureControl, - (void*)LLPipeline::RENDER_DEBUG_FEATURE_PALETTE, KEY_F7, MASK_ALT|MASK_CONTROL)); sub_menu->append(new LLMenuItemCheckGL("Test FRInfo", &LLPipeline::toggleRenderDebugFeature, NULL, &LLPipeline::toggleRenderDebugFeatureControl, @@ -1748,7 +1743,7 @@ class LLViewCommunicate : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) + if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) { LLFloaterMyFriends::toggleInstance(); } @@ -1756,7 +1751,6 @@ class LLViewCommunicate : public view_listener_t { LLFloaterChatterBox::toggleInstance(); } - return true; } }; @@ -5228,6 +5222,10 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterMyFriends::instanceVisible(0); } + else if (floater_name == "communicate") + { + new_value = LLFloaterChatterBox::instanceVisible(); + } else if (floater_name == "toolbar") { new_value = LLToolBar::visible(NULL); @@ -5264,6 +5262,11 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterBeacons::instanceVisible(LLSD()); } + else if (floater_name == "inventory") + { + LLInventoryView* iv = LLInventoryView::getActiveInventory(); + new_value = (NULL != iv && TRUE == iv->getVisible()); + } gMenuHolder->findControl(control_name)->setValue(new_value); return true; } @@ -5929,10 +5932,10 @@ namespace void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, const std::string& nomodmsg) { - // Apply until an object fails QueueObjects func(q); - const bool firstonly = true; - bool fail = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func, firstonly); + LLSelectMgr *mgr = LLSelectMgr::getInstance(); + LLObjectSelectionHandle selectHandle = mgr->getSelection(); + bool fail = selectHandle->applyToObjects(&func); if(fail) { if ( !func.scripted ) @@ -5957,61 +5960,67 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons } } +void handle_compile_queue(std::string to_lang) +{ + LLFloaterCompileQueue* queue; + if (to_lang == "mono") + { + queue = LLFloaterCompileQueue::create(TRUE); + } + else + { + queue = LLFloaterCompileQueue::create(FALSE); + } + queue_actions(queue, "CannotRecompileSelectObjectsNoScripts", "CannotRecompileSelectObjectsNoPermission"); +} + +void handle_reset_selection(void) +{ + LLFloaterResetQueue* queue = LLFloaterResetQueue::create(); + queue_actions(queue, "CannotResetSelectObjectsNoScripts", "CannotResetSelectObjectsNoPermission"); +} + +void handle_set_run_selection(void) +{ + LLFloaterRunQueue* queue = LLFloaterRunQueue::create(); + queue_actions(queue, "CannotSetRunningSelectObjectsNoScripts", "CannotSerRunningSelectObjectsNoPermission"); +} + +void handle_set_not_run_selection(void) +{ + LLFloaterNotRunQueue* queue = LLFloaterNotRunQueue::create(); + queue_actions(queue, "CannotSetRunningNotSelectObjectsNoScripts", "CannotSerRunningNotSelectObjectsNoPermission"); +} + class LLToolsSelectedScriptAction : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { std::string action = userdata.asString(); - LLFloaterScriptQueue* queue = NULL; if (action == "compile mono") { - queue = LLFloaterCompileQueue::create(TRUE); + handle_compile_queue("mono"); } if (action == "compile lsl") { - queue = LLFloaterCompileQueue::create(FALSE); + handle_compile_queue("lsl"); } else if (action == "reset") { - queue = LLFloaterResetQueue::create(); + handle_reset_selection(); } else if (action == "start") { - queue = LLFloaterRunQueue::create(); + handle_set_run_selection(); } else if (action == "stop") { - queue = LLFloaterNotRunQueue::create(); + handle_set_not_run_selection(); } - if (!queue) - { - return true; - } - - queue_actions(queue, "CannotRecompileSelectObjectsNoScripts", "CannotRecompileSelectObjectsNoPermission"); - return true; } }; -void handle_reset_selection(void*) -{ - LLFloaterResetQueue* queue = LLFloaterResetQueue::create(); - queue_actions(queue, "CannotResetSelectObjectsNoScripts", "CannotResetSelectObjectsNoPermission"); -} - -void handle_set_run_selection(void*) -{ - LLFloaterRunQueue* queue = LLFloaterRunQueue::create(); - queue_actions(queue, "CannotSetRunningSelectObjectsNoScripts", "CannotSerRunningSelectObjectsNoPermission"); -} - -void handle_set_not_run_selection(void*) -{ - LLFloaterNotRunQueue* queue = LLFloaterNotRunQueue::create(); - queue_actions(queue, "CannotSetRunningNotSelectObjectsNoScripts", "CannotSerRunningNotSelectObjectsNoPermission"); -} - void handle_selected_texture_info(void*) { for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); |