diff options
| author | RunitaiLinden <davep@lindenlab.com> | 2023-12-14 14:12:01 -0600 |
|---|---|---|
| committer | RunitaiLinden <davep@lindenlab.com> | 2023-12-14 14:12:01 -0600 |
| commit | 3c858d7e2d6633df14df473a918d2fb848403972 (patch) | |
| tree | 62b36692a0c1df2f34a85bc7fd4111afb2737d81 /indra/newview/llfloaterpreference.cpp | |
| parent | 8b86e2ad1b1326cb3e98acd857dc93f4f1455b8c (diff) | |
| parent | 32de0cb67d824498d0fc9d489ce19731ebfddfdf (diff) | |
Merge branch 'DRTVWR-601' of github.com:secondlife/viewer into DRTVWR-601
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
| -rw-r--r-- | indra/newview/llfloaterpreference.cpp | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d4e40ff103..aa723eb3a8 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -250,11 +250,49 @@ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator) } } } -// static -std::string LLFloaterPreference::sSkin = ""; + +// handle secondlife:///app/worldmap/{NAME}/{COORDS} URLs +// Also see LLUrlEntryKeybinding, the value of this command type +// is ability to show up to date value in chat +class LLKeybindingHandler: public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLKeybindingHandler(): LLCommandHandler("keybinding", UNTRUSTED_CLICK_ONLY) + { + } + + bool handle(const LLSD& params, const LLSD& query_map, + const std::string& grid, LLMediaCtrl* web) + { + if (params.size() < 1) return false; + + LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*> + (LLFloaterReg::showInstance("preferences")); + + if (prefsfloater) + { + // find 'controls' panel and bring it the front + LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core"); + LLPanel* panel = prefsfloater->getChild<LLPanel>("controls"); + if (tabcontainer && panel) + { + tabcontainer->selectTabPanel(panel); + } + } + + return true; + } +}; +LLKeybindingHandler gKeybindHandler; + + ////////////////////////////////////////////// // LLFloaterPreference +// static +std::string LLFloaterPreference::sSkin = ""; + LLFloaterPreference::LLFloaterPreference(const LLSD& key) : LLFloater(key), mGotPersonalInfo(false), |
