summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-03-19 11:41:42 -0700
committersimon <none@none>2014-03-19 11:41:42 -0700
commit00a325ccb90b1c6800ec78e1211b5097d9c27a58 (patch)
tree8b58fbd99d5bce117cf8dad5181b5690af4bd34f /indra/newview/llviewermenu.cpp
parent09d1c27d4f78c78d949b6a3d896d6f58df2dfc06 (diff)
parent1ab9f19f82a84a109cf429998f423986268801f6 (diff)
Pull in viewer-lion to lock down next release
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-xindra/newview/llviewermenu.cpp42
1 files changed, 41 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c7c8da27f3..ab9551ad17 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7825,7 +7825,7 @@ void handle_report_bug(const LLSD& param)
replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString());
LLSLURL location_url;
LLAgentUI::buildSLURL(location_url);
- replace["[LOCATION]"] = location_url.getSLURLString();
+ replace["[LOCATION]"] = LLURI::escape(location_url.getSLURLString());
LLUIString file_bug_url = gSavedSettings.getString("ReportBugURL");
file_bug_url.setArgs(replace);
@@ -8235,6 +8235,45 @@ class LLWorldEnvSettings : public view_listener_t
}
};
+class LLWorldEnableEnvSettings : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ bool result = false;
+ std::string tod = userdata.asString();
+
+ if (tod == "region")
+ {
+ return LLEnvManagerNew::instance().getUseRegionSettings();
+ }
+
+ if (LLEnvManagerNew::instance().getUseFixedSky())
+ {
+ if (tod == "sunrise")
+ {
+ result = (LLEnvManagerNew::instance().getSkyPresetName() == "Sunrise");
+ }
+ else if (tod == "noon")
+ {
+ result = (LLEnvManagerNew::instance().getSkyPresetName() == "Midday");
+ }
+ else if (tod == "sunset")
+ {
+ result = (LLEnvManagerNew::instance().getSkyPresetName() == "Sunset");
+ }
+ else if (tod == "midnight")
+ {
+ result = (LLEnvManagerNew::instance().getSkyPresetName() == "Midnight");
+ }
+ else
+ {
+ llwarns << "Unknown item" << llendl;
+ }
+ }
+ return result;
+ }
+};
+
class LLWorldEnvPreset : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -8573,6 +8612,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings");
+ view_listener_t::addMenu(new LLWorldEnableEnvSettings(), "World.EnableEnvSettings");
view_listener_t::addMenu(new LLWorldEnvPreset(), "World.EnvPreset");
view_listener_t::addMenu(new LLWorldEnableEnvPreset(), "World.EnableEnvPreset");
view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");