summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2024-01-24 14:37:33 -0800
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2024-01-24 14:37:33 -0800
commit373b06398c274eee476e4aa9c35b9c6327f9d45f (patch)
tree4a324b36ab896d9507374e71e15f9ec064b41add /indra/newview/llfloaterpreference.cpp
parentbd9c0a2e658e183bb8a321cdce546f10b6d76afe (diff)
parentc22aefafb3d05be37965361913c02568fa10adf6 (diff)
Merge remote-tracking branch 'origin/release/materials_featurette' into DRTVWR-583
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp42
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),