diff options
author | James Cook <james@lindenlab.com> | 2009-10-08 18:14:30 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-08 18:14:30 +0000 |
commit | 59b10ee3d9a4a22a13d2ad2bef9ce6bc99432e4d (patch) | |
tree | d7cc88b61b8bf74cdd005cf62a058a948620459b /indra/newview | |
parent | 6af02192731b80c558a89a25f3cbf6916c2cbb72 (diff) |
Add "Web Browser Test" to login menus. Add "Dump Timers" to debug menus. Not reviewed.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 48 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_login.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 17 |
3 files changed, 37 insertions, 35 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d9a74477f4..3e7e5f77bb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -277,7 +277,6 @@ void handle_compress_image(void*); // Edit menu void handle_dump_group_info(void *); void handle_dump_capabilities_info(void *); -void handle_dump_focus(void*); // Advanced->Consoles menu void handle_region_dump_settings(void*); @@ -324,7 +323,6 @@ BOOL check_show_xui_names(void *); // Debug UI -void handle_web_browser_test(void*); void handle_buy_currency_test(void*); void handle_save_to_xml(void*); void handle_load_from_xml(void*); @@ -1234,15 +1232,6 @@ class LLAdvancedDumpRegionObjectCache : public view_listener_t } }; -class LLAdvancedWebBrowserTest : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - handle_web_browser_test(NULL); - return true; - } -}; - class LLAdvancedBuyCurrencyTest : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -1285,22 +1274,6 @@ class LLAdvancedDumpInventory : public view_listener_t -/////////////////////// -// DUMP FOCUS HOLDER // -/////////////////////// - - -class LLAdvancedDumpFocusHolder : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - handle_dump_focus(NULL); - return true; - } -}; - - - //////////////////////////////// // PRINT SELECTED OBJECT INFO // //////////////////////////////// @@ -3464,7 +3437,7 @@ void handle_dump_region_object_cache(void*) } } -void handle_dump_focus(void *) +void handle_dump_focus() { LLUICtrl *ctrl = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); @@ -6835,6 +6808,11 @@ void handle_dump_avatar_local_textures(void*) gAgent.getAvatarObject()->dumpLocalTextures(); } +void handle_dump_timers() +{ + LLFastTimer::dumpCurTimes(); +} + void handle_debug_avatar_textures(void*) { LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -7100,9 +7078,14 @@ void handle_load_from_xml(void*) } } -void handle_web_browser_test(void*) +void handle_web_browser_test(const LLSD& param) { - LLWeb::loadURL("http://secondlife.com/app/search/slurls.html"); + std::string url = param.asString(); + if (url.empty()) + { + url = "about:blank"; + } + LLWeb::loadURL(url); } void handle_buy_currency_test(void*) @@ -7851,11 +7834,12 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache"); // Advanced > UI - view_listener_t::addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest"); + commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest"); view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); - view_listener_t::addMenu(new LLAdvancedDumpFocusHolder(), "Advanced.DumpFocusHolder"); + commit.add("Advanced.DumpTimers", boost::bind(&handle_dump_timers) ); + commit.add("Advanced.DumpFocusHolder", boost::bind(&handle_dump_focus) ); view_listener_t::addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo"); view_listener_t::addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo"); view_listener_t::addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats"); diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index d3a2b2c66b..8c78b0c82f 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -239,5 +239,12 @@ function="ShowFloater" parameter="message_critical" /> </menu_item_call> + <menu_item_call + label="Web Browser Test" + name="Web Browser Test"> + <menu_item_call.on_click + function="Advanced.WebBrowserTest" + parameter="http://join.secondlife.com/"/> + </menu_item_call> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index b0839ce255..04a7f76d29 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2748,7 +2748,8 @@ layout="topleft" name="Web Browser Test"> <menu_item_call.on_click - function="Advanced.WebBrowserTest" /> + function="Advanced.WebBrowserTest" + parameter="http://secondlife.com/app/search/slurls.html"/> </menu_item_call> <menu_item_call label="UI/Color Settings" @@ -2758,6 +2759,9 @@ function="Advanced.ShowDebugSettings" parameter="skin" /> </menu_item_call> + + <menu_item_separator /> + <menu_item_call label="Dump SelectMgr" layout="topleft" @@ -2773,6 +2777,12 @@ function="Advanced.DumpInventory" /> </menu_item_call> <menu_item_call + label="Dump Timers" + name="Dump Timers"> + <menu_item_call.on_click + function="Advanced.DumpTimers" /> + </menu_item_call> + <menu_item_call label="Dump Focus Holder" layout="topleft" name="Dump Focus Holder" @@ -2815,8 +2825,9 @@ function="ToggleControl" parameter="DoubleClickAutoPilot" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + + <menu_item_separator /> + <menu_item_check label="Debug SelectMgr" layout="topleft" |