From ffe475e96e9cdd2bb3c66fd3ffeef2b4d64bc33b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 26 Oct 2010 16:08:11 -0700 Subject: STORM-418 : Suppress menu items Save to XML and Load from XML from the Develop > XUI menu --- indra/newview/llviewermenu.cpp | 73 ---------------------- indra/newview/skins/default/xui/en/menu_viewer.xml | 12 ---- 2 files changed, 85 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 68935d536b..1778eaed68 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -221,8 +221,6 @@ BOOL check_show_xui_names(void *); // Debug UI void handle_buy_currency_test(void*); -void handle_save_to_xml(void*); -void handle_load_from_xml(void*); void handle_god_mode(void*); @@ -1384,37 +1382,6 @@ class LLAdvancedCheckDebugWindowProc : public view_listener_t // ------------------------------XUI MENU --------------------------- -////////////////////// -// LOAD UI FROM XML // -////////////////////// - - -class LLAdvancedLoadUIFromXML : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - handle_load_from_xml(NULL); - return true; -} -}; - - - -//////////////////// -// SAVE UI TO XML // -//////////////////// - - -class LLAdvancedSaveUIToXML : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - handle_save_to_xml(NULL); - return true; -} -}; - - class LLAdvancedSendTestIms : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7188,44 +7155,6 @@ const LLRect LLViewerMenuHolderGL::getMenuRect() const return LLRect(0, getRect().getHeight() - MENU_BAR_HEIGHT, getRect().getWidth(), STATUS_BAR_HEIGHT); } -void handle_save_to_xml(void*) -{ - LLFloater* frontmost = gFloaterView->getFrontmost(); - if (!frontmost) - { - LLNotificationsUtil::add("NoFrontmostFloater"); - return; - } - - std::string default_name = "floater_"; - default_name += frontmost->getTitle(); - default_name += ".xml"; - - LLStringUtil::toLower(default_name); - LLStringUtil::replaceChar(default_name, ' ', '_'); - LLStringUtil::replaceChar(default_name, '/', '_'); - LLStringUtil::replaceChar(default_name, ':', '_'); - LLStringUtil::replaceChar(default_name, '"', '_'); - - LLFilePicker& picker = LLFilePicker::instance(); - if (picker.getSaveFile(LLFilePicker::FFSAVE_XML, default_name)) - { - std::string filename = picker.getFirstFile(); - LLUICtrlFactory::getInstance()->saveToXML(frontmost, filename); - } -} - -void handle_load_from_xml(void*) -{ - LLFilePicker& picker = LLFilePicker::instance(); - if (picker.getOpenFile(LLFilePicker::FFLOAD_XML)) - { - std::string filename = picker.getFirstFile(); - LLFloater* floater = new LLFloater(LLSD()); - floater->buildFromFile(filename); - } -} - void handle_web_browser_test(const LLSD& param) { std::string url = param.asString(); @@ -8011,8 +7940,6 @@ void initialize_menus() // Advanced > XUI commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance())); - view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML"); - view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML"); view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames"); view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames"); view_listener_t::addMenu(new LLAdvancedSendTestIms(), "Advanced.SendTestIMs"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ce628d93b5..43058a5ee3 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2761,18 +2761,6 @@ function="Floater.Show" parameter="font_test" /> - - - - - - -- cgit v1.2.3