diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 104 |
1 files changed, 2 insertions, 102 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 26599f557e..0f983ed0d5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -523,7 +523,7 @@ class LLAdvancedToggleConsole : public view_listener_t } else if ("fast timers" == console_type) { - toggle_visibility( (void*)gDebugView->mFastTimerView ); + LLFloaterReg::toggleInstance("fast_timers"); } else if ("scene view" == console_type) { @@ -563,7 +563,7 @@ class LLAdvancedCheckConsole : public view_listener_t } else if ("fast timers" == console_type) { - new_value = get_visibility( (void*)gDebugView->mFastTimerView ); + new_value = LLFloaterReg::instanceVisible("fast_timers"); } else if ("scene view" == console_type) { @@ -863,51 +863,6 @@ class LLAdvancedCheckFeature : public view_listener_t } }; -void toggle_destination_and_avatar_picker(const LLSD& show) -{ - S32 panel_idx = show.isDefined() ? show.asInteger() : -1; - LLView* container = gViewerWindow->getRootView()->findChildView("avatar_picker_and_destination_guide_container"); - if (!container) return; - - LLMediaCtrl* destinations = container->findChild<LLMediaCtrl>("destination_guide_contents"); - LLMediaCtrl* avatar_picker = container->findChild<LLMediaCtrl>("avatar_picker_contents"); - if (!destinations || !avatar_picker) return; - - LLButton* avatar_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("avatar_btn"); - LLButton* destination_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("destination_btn"); - - if (panel_idx == 0 - && !destinations->getVisible()) - { // opening destinations guide - container->setVisible(true); - destinations->setVisible(true); - avatar_picker->setVisible(false); - LLFirstUse::notUsingDestinationGuide(false); - avatar_btn->setToggleState(false); - destination_btn->setToggleState(true); - gSavedSettings.setS32("DestinationsAndAvatarsVisibility", 0); - } - else if (panel_idx == 1 - && !avatar_picker->getVisible()) - { // opening avatar picker - container->setVisible(true); - destinations->setVisible(false); - avatar_picker->setVisible(true); - avatar_btn->setToggleState(true); - destination_btn->setToggleState(false); - gSavedSettings.setS32("DestinationsAndAvatarsVisibility", 1); - } - else - { // toggling off dest guide or avatar picker - container->setVisible(false); - destinations->setVisible(false); - avatar_picker->setVisible(false); - avatar_btn->setToggleState(false); - destination_btn->setToggleState(false); - gSavedSettings.setS32("DestinationsAndAvatarsVisibility", -1); - } -}; - ////////////////// // INFO DISPLAY // @@ -7823,55 +7778,6 @@ class LLToggleUIHints : public view_listener_t } }; -class LLCheckSessionsSettings : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - std::string expected = userdata.asString(); - return gSavedSettings.getString("SessionSettingsFile") == expected; - } -}; - -class LLChangeMode : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - std::string mode = userdata.asString(); - if (mode == "basic") - { - if (gSavedSettings.getString("SessionSettingsFile") != "settings_minimal.xml") - { - LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(onModeChangeConfirm, "settings_minimal.xml", _1, _2)); - } - return true; - } - else if (mode == "advanced") - { - if (gSavedSettings.getString("SessionSettingsFile") != "") - { - LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(onModeChangeConfirm, "", _1, _2)); - } - return true; - } - return false; - } - - static void onModeChangeConfirm(const std::string& new_session_settings_file, const LLSD& notification, const LLSD& response) - { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - switch (option) - { - case 0: - gSavedSettings.getControl("SessionSettingsFile")->set(new_session_settings_file); - LLAppViewer::instance()->requestQuit(); - break; - case 1: - default: - break; - } - } -}; - void LLUploadCostCalculator::calculateCost() { S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); @@ -8359,11 +8265,5 @@ void initialize_menus() view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected"); view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono"); - view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints"); - view_listener_t::addMenu(new LLCheckSessionsSettings(), "CheckSessionSettings"); - view_listener_t::addMenu(new LLChangeMode(), "ChangeMode"); - - commit.add("Destination.show", boost::bind(&toggle_destination_and_avatar_picker, 0)); - commit.add("Avatar.show", boost::bind(&toggle_destination_and_avatar_picker, 1)); } |