diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.h | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 41 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_camera.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_voice_controls.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_general.xml | 27 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_teleport_history.xml | 2 |
9 files changed, 111 insertions, 4 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ecb6254f8a..abf60a29b4 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -354,6 +354,8 @@ void LLFloaterCamera::updateState() childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode); childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); + updateCameraPresetButtons(); + //hiding or showing the panel with controls by reshaping the floater bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; if (showControls == childIsVisible(CONTROLS)) return; @@ -384,6 +386,16 @@ void LLFloaterCamera::updateState() } } +void LLFloaterCamera::updateCameraPresetButtons() +{ + ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); + + childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW); + childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW); + childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW); + childSetValue("mouselook_view", gAgent.cameraMouselook()); +} + void LLFloaterCamera::onClickCameraPresets(const LLSD& param) { std::string name = param.asString(); @@ -405,4 +417,7 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) gAgent.changeCameraToMouselook(); } + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + camera_floater->updateCameraPresetButtons(); } diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index 45d5e9a845..f908ad08be 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -103,6 +103,9 @@ private: /* updates the state (UI) according to the current mode */ void updateState(); + /* update camera preset buttons toggle state according to the currently selected preset */ + void updateCameraPresetButtons(); + void onClickBtn(ECameraControlMode mode); void assignButton2Mode(ECameraControlMode mode, const std::string& button_name); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index fb7e757c43..780393a9c0 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -323,7 +323,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2)); - + mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this)); + sSkin = gSavedSettings.getString("SkinCurrent"); gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); @@ -536,6 +537,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) { childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel()); childSetVisible("maturity_desired_combobox", false); + + // Display selected maturity icons. + onChangeMaturity(); } // Enabled/disabled popups, might have been changed by user actions @@ -1212,7 +1216,19 @@ void LLFloaterPreference::applyResolution() refresh(); } +void LLFloaterPreference::onChangeMaturity() +{ + U8 sim_access = gSavedSettings.getU32("PreferredMaturity"); + getChild<LLIconCtrl>("rating_icon_general")->setVisible(sim_access == SIM_ACCESS_PG + || sim_access == SIM_ACCESS_MATURE + || sim_access == SIM_ACCESS_ADULT); + + getChild<LLIconCtrl>("rating_icon_moderate")->setVisible(sim_access == SIM_ACCESS_MATURE + || sim_access == SIM_ACCESS_ADULT); + + getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); +} void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 93b39d72bc..71aa5d3189 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -134,8 +134,9 @@ public: void onCommitMediaEnabled(); void onCommitMusicEnabled(); void applyResolution(); + void onChangeMaturity(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); - void getUIColor(LLUICtrl* ctrl, const LLSD& param); + void getUIColor(LLUICtrl* ctrl, const LLSD& param); void buildPopupLists(); static void refreshSkin(void* data); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 77d2d493bd..ce627494c8 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -49,6 +49,7 @@ #include "llagent.h" #include "llcallingcard.h" #include "llcaphttpsender.h" +#include "llcommandhandler.h" #include "lldir.h" #include "lleventpoll.h" #include "llfloatergodtools.h" @@ -58,6 +59,7 @@ #include "llsdutil.h" #include "llstartup.h" #include "lltrans.h" +#include "llurldispatcher.h" #include "llviewerobjectlist.h" #include "llviewerparceloverlay.h" #include "llvlmanager.h" @@ -82,6 +84,45 @@ extern BOOL gNoRender; const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region const S16 MAX_MAP_DIST = 10; +// support for secondlife:///app/region/{REGION} SLapps +// N.B. this is defined to work exactly like the classic secondlife://{REGION} +// However, the later syntax cannot support spaces in the region name because +// spaces (and %20 chars) are illegal in the hostname of an http URL. Some +// browsers let you get away with this, but some do not (such as Qt's Webkit). +// Hence we introduced the newer secondlife:///app/region alternative. +class LLRegionHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLRegionHandler() : LLCommandHandler("region", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + // make sure that we at least have a region name + int num_params = params.size(); + if (num_params < 1) + { + return false; + } + + // build a secondlife://{PLACE} SLurl from this SLapp + std::string url = "secondlife://"; + for (int i = 0; i < num_params; i++) + { + if (i > 0) + { + url += "/"; + } + url += params[i].asString(); + } + + // Process the SLapp as if it was a secondlife://{PLACE} SLurl + LLURLDispatcher::dispatch(url, web, true); + return true; + } +}; +LLRegionHandler gRegionHandler; + class BaseCapabilitiesComplete : public LLHTTPClient::Responder { LOG_CLASS(BaseCapabilitiesComplete); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 1b8bbe42d2..f69c763f78 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -132,6 +132,7 @@ height="40" image_selected="Cam_Preset_Back_On" image_unselected="Cam_Preset_Back_Off" + is_toggle="true" layout="topleft" left="0" name="rear_view" @@ -146,6 +147,7 @@ height="40" image_selected="Cam_Preset_Side_On" image_unselected="Cam_Preset_Side_Off" + is_toggle="true" layout="topleft" left_pad="5" name="group_view" @@ -160,6 +162,7 @@ height="40" image_selected="Cam_Preset_Front_On" image_unselected="Cam_Preset_Front_Off" + is_toggle="true" layout="topleft" left="0" name="front_view" @@ -174,6 +177,7 @@ height="40" image_selected="Cam_Preset_Eye_Off" image_unselected="Cam_Preset_Eye_Off" + is_toggle="true" layout="topleft" left_pad="5" name="mouselook_view" diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index c4411db8c5..114b9a84e3 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -70,7 +70,7 @@ text_color="white" top="4" use_ellipses="true" - value="Mya Avatar:" + value="My Avatar:" width="210" /> <output_monitor auto_update="true" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 099c789e4b..d11aebe943 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -141,7 +141,34 @@ label="General" name="Desired_PG" value="13" /> + <combo_box.commit_callback + function="Pref.MaturitySettings"/> </combo_box> + <icon + follows="left|top" + height="16" + image_name="Parcel_PG_Dark" + layout="topleft" + left_pad="5" + name="rating_icon_general" + top_delta="3" + width="18"/> + <icon + follows="left|top" + height="16" + image_name="Parcel_M_Dark" + layout="topleft" + left_pad="2" + name="rating_icon_moderate" + width="18"/> + <icon + follows="left|top" + height="16" + image_name="Parcel_R_Dark" + layout="topleft" + left_pad="2" + name="rating_icon_adult" + width="18"/> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index ecf7252a11..a628e76bc0 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -154,7 +154,7 @@ width="380"> <button follows="bottom|left" - tool_tip="Show additional optioins" + tool_tip="Show additional options" height="18" image_disabled="OptionsMenu_Disabled" image_selected="OptionsMenu_Press" |