summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2019-11-08 16:38:13 +0200
committermaxim_productengine <mnikolenko@productengine.com>2019-11-08 16:38:13 +0200
commit1c2ab8938bd61097e85ea0ef90ef28c89edbee33 (patch)
tree9e19c91225858124d7b6961310339e66b9d41dcc /indra/newview
parentc75d443c8359f0bceee2df2adc0a67b2890922ea (diff)
SL-12186 WIP Revert Preferences changes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpreference.cpp92
-rw-r--r--indra/newview/llfloaterpreference.h12
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_move.xml99
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_view.xml185
5 files changed, 89 insertions, 310 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 28e77deec2..63d3b75c00 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -839,17 +839,6 @@ void LLFloaterPreference::onOpen(const LLSD& key)
exceptions_btn->setEnabled(started);
}
- LLButton* load_camera_btn = findChild<LLButton>("PrefCameraLoadButton");
- LLButton* save_camera_btn = findChild<LLButton>("PrefCameraSaveButton");
- LLButton* delete_camera_btn = findChild<LLButton>("PrefCameraDeleteButton");
-
- if (load_camera_btn && save_camera_btn && delete_camera_btn)
- {
- load_camera_btn->setEnabled(started);
- save_camera_btn->setEnabled(started);
- delete_camera_btn->setEnabled(started);
- }
-
collectSearchableItems();
if (!mFilterEdit->getText().empty())
{
@@ -2308,11 +2297,6 @@ void LLFloaterPreference::changed()
}
-void LLFloaterPreference::saveCameraPreset(std::string& preset)
-{
- mSavedCameraPreset = preset;
-}
-
void LLFloaterPreference::saveGraphicsPreset(std::string& preset)
{
mSavedGraphicsPreset = preset;
@@ -2694,82 +2678,6 @@ private:
static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");
-static LLPanelInjector<LLPanelPreferenceView> t_pref_view("panel_preference_view");
-
-BOOL LLPanelPreferenceView::postBuild()
-{
- setPresetText();
-
- LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
- if (presetsMgr)
- {
- presetsMgr->setPresetListChangeCameraCallback(boost::bind(&LLPanelPreferenceView::onPresetsListChangeCamera, this));
- presetsMgr->createMissingDefault(PRESETS_CAMERA); // a no-op after the first time, but that's ok
- }
-
- return LLPanelPreference::postBuild();
-}
-
-void LLPanelPreferenceView::onPresetsListChangeCamera()
-{
- LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
- if (presetsMgr)
- {
- presetsMgr->setCameraDirty(false);
- }
-
- setPresetText();
-
- LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
- if (instance && !gSavedSettings.getString("PresetCameraActive").empty())
- {
- instance->saveSettings(); //make cancel work correctly after changing the preset
- }
-}
-
-void LLPanelPreferenceView::draw()
-{
- setPresetText();
- LLPanelPreference::draw();
-}
-
-void LLPanelPreferenceView::setPresetText()
-{
- LLTextBox* preset_text = getChild<LLTextBox>("preset_camera_text");
-
- std::string preset_camera_active = gSavedSettings.getString("PresetCameraActive");
-
- if (!preset_camera_active.empty() && preset_camera_active != preset_text->getText())
- {
- LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
- if (instance)
- {
- instance->saveCameraPreset(preset_camera_active);
- }
- }
-
- LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
- if (presetsMgr)
- {
- if (presetsMgr->isCameraDirty() && !preset_camera_active.empty())
- {
- preset_camera_active.clear();
- }
- }
-
- if (!preset_camera_active.empty())
- {
- if (preset_camera_active == PRESETS_DEFAULT)
- {
- preset_camera_active = LLTrans::getString(PRESETS_DEFAULT);
- }
- preset_text->setText(preset_camera_active);
- }
- else
- {
- preset_text->setText(LLTrans::getString("none_paren_cap"));
- }
-}
BOOL LLPanelPreferenceGraphics::postBuild()
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 204916de86..4516c2635d 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -272,18 +272,6 @@ private:
LOG_CLASS(LLPanelPreference);
};
-class LLPanelPreferenceView : public LLPanelPreference
-{
-public:
- BOOL postBuild();
- void draw();
- void setPresetText();
-
-private:
- void onPresetsListChangeCamera();
- LOG_CLASS(LLPanelPreferenceView);
-};
-
class LLPanelPreferenceGraphics : public LLPanelPreference
{
public:
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index d501fe9e36..0e62d50072 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -121,20 +121,13 @@ https://accounts.secondlife.com/change_email/
help_topic="preferences_chat_tab"
name="chat" />
<panel
- class="panel_preference_view"
+ class="panel_preference"
filename="panel_preferences_move.xml"
- label="Move"
+ label="Move &amp; View"
layout="topleft"
help_topic="preferences_move_tab"
name="move" />
<panel
- class="panel_preference_view"
- filename="panel_preferences_view.xml"
- label="View"
- layout="topleft"
- help_topic="preferences_view_tab"
- name="view" />
- <panel
class="panel_preference"
filename="panel_preferences_alerts.xml"
label="Notifications"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
index 79fbf66139..8794e3bf95 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
@@ -2,24 +2,100 @@
<panel
border="true"
follows="left|top|right|bottom"
- height="418"
+ height="408"
label="Move"
layout="topleft"
left="102"
name="move_panel"
top="1"
width="517">
-
<icon
+ follows="left|top"
+ height="18"
+ image_name="Cam_FreeCam_Off"
+ layout="topleft"
+ name="camera_icon"
+ mouse_opaque="false"
+ visible="true"
+ width="18"
+ left="30"
+ top="10"/>
+ <slider
+ can_edit_text="true"
+ control_name="CameraAngle"
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.025"
+ initial_value="1.57"
+ layout="topleft"
+ label_width="100"
+ label="View angle"
+ left_pad="30"
+ max_val="2.97"
+ min_val="0.17"
+ name="camera_fov"
+ show_text="false"
+ width="240" />
+ <slider
+ can_edit_text="true"
+ control_name="CameraOffsetScale"
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.025"
+ initial_value="1"
+ layout="topleft"
+ label="Distance"
+ left_delta="0"
+ label_width="100"
+ max_val="3"
+ min_val="0.5"
+ name="camera_offset_scale"
+ show_text="false"
+ width="240"
+ top_pad="5"/>
+ <text
+ follows="left|top"
+ type="string"
+ length="1"
+ height="10"
+ left="80"
+ name="heading2"
+ width="270"
+ top_pad="5">
+ Automatic position for:
+ </text>
+ <check_box
+ control_name="EditCameraMovement"
+ height="20"
+ follows="left|top"
+ label="Build/Edit"
+ layout="topleft"
+ left_delta="30"
+ name="edit_camera_movement"
+ tool_tip="Use automatic camera positioning when entering and exiting edit mode"
+ width="280"
+ top_pad="5" />
+ <check_box
+ control_name="AppearanceCameraMovement"
follows="left|top"
- height="18"
- image_name="Move_Walk_Off"
- layout="topleft"
- name="avatar_icon"
- mouse_opaque="false"
- visible="true"
- width="18"
- top_pad="4"
+ height="16"
+ label="Appearance"
+ layout="topleft"
+ name="appearance_camera_movement"
+ tool_tip="Use automatic camera positioning while in edit mode"
+ width="242" />
+ <icon
+ follows="left|top"
+ height="18"
+ image_name="Move_Walk_Off"
+ layout="topleft"
+ name="avatar_icon"
+ mouse_opaque="false"
+ visible="true"
+ width="18"
+ top_pad="10"
left="30" />
<text
follows="left|top"
@@ -188,11 +264,10 @@
label="Other Devices"
left="30"
name="joystick_setup_button"
- top_pad="5"
+ top="30"
width="155">
<button.commit_callback
function="Floater.Show"
parameter="pref_joystick" />
</button>
-
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_view.xml b/indra/newview/skins/default/xui/en/panel_preferences_view.xml
deleted file mode 100644
index a7a69eb829..0000000000
--- a/indra/newview/skins/default/xui/en/panel_preferences_view.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="true"
- follows="left|top|right|bottom"
- height="418"
- label="View"
- layout="topleft"
- left="102"
- name="view_panel"
- top="1"
- width="517">
-
- <icon
- follows="left|top"
- height="18"
- image_name="Cam_FreeCam_Off"
- layout="topleft"
- name="camera_icon"
- mouse_opaque="false"
- visible="true"
- width="18"
- left="30"
- top="4"/>
-
- <text
- follows="top|left|right"
- height="16"
- layout="topleft"
- left="80"
- top_delta="0"
- width="100">
- Preset in use:
- </text>
-
- <text
- follows="top|left|right"
- height="16"
- layout="topleft"
- left_delta="100"
- name="preset_camera_text"
- width="120">
- (None)
- </text>
-
- <slider
- can_edit_text="true"
- control_name="CameraAngle"
- decimal_digits="2"
- follows="left|top"
- height="16"
- top_pad="5"
- increment="0.025"
- initial_value="1.57"
- layout="topleft"
- label_width="100"
- label="View angle"
- left="80"
- max_val="2.97"
- min_val="0.17"
- name="camera_fov"
- show_text="false"
- width="240" />
- <slider
- can_edit_text="true"
- control_name="CameraOffsetScale"
- decimal_digits="2"
- follows="left|top"
- height="16"
- increment="0.025"
- initial_value="1"
- layout="topleft"
- label="Distance"
- left_delta="0"
- label_width="100"
- max_val="3"
- min_val="0.5"
- name="camera_offset_scale"
- show_text="false"
- width="240"
- top_pad="5"/>
- <text
- follows="left|top"
- type="string"
- length="1"
- height="10"
- left="80"
- name="heading2"
- width="200"
- top_pad="5">
- Automatic position for:
- </text>
-
- <spinner
- control_name="CameraOpacity"
- decimal_digits="1"
- follows="top|left|right"
- height="24"
- max_val="1.0"
- min_val="0.0"
- increment="0.1"
- initial_value="1.0"
- label="Camera controls opacity:"
- label_width="180"
- layout="topleft"
- top_pad="-10"
- left_pad="10"
- width="220" />
-
- <check_box
- control_name="EditCameraMovement"
- height="20"
- follows="left|top"
- label="Build/Edit"
- layout="topleft"
- left="100"
- name="edit_camera_movement"
- tool_tip="Use automatic camera positioning when entering and exiting edit mode"
- width="280"
- top_pad="-10" />
- <check_box
- control_name="AppearanceCameraMovement"
- follows="left|top"
- height="16"
- label="Appearance"
- layout="topleft"
- name="appearance_camera_movement"
- tool_tip="Use automatic camera positioning while in edit mode"
- width="242" />
-
- <button
- follows="top|left"
- height="23"
- label="Advanced..."
- layout="topleft"
- left_pad="-102"
- name="PreferencesViewAdvanced"
- tool_tip="Adjust camera positioning"
- width="115">
- <button.commit_callback
- function="Floater.Show"
- parameter="prefs_view_advanced" />
- </button>
-
- <button
- follows="top|left"
- height="23"
- label="Save settings as a preset..."
- layout="topleft"
- left="30"
- name="PrefCameraSaveButton"
- top_pad="10"
- width="200">
- <button.commit_callback
- function="Pref.PrefSave"
- parameter="camera" />
- </button>
-
- <button
- follows="top|left"
- height="23"
- label="Load preset..."
- layout="topleft"
- left_pad="10"
- name="PrefCameraLoadButton"
- top_delta="0"
- width="115">
- <button.commit_callback
- function="Pref.PrefLoad"
- parameter="camera"/>
- </button>
-
- <button
- follows="top|left"
- height="23"
- label="Delete preset..."
- layout="topleft"
- left_pad="10"
- name="PrefCameraDeleteButton"
- top_delta="0"
- width="115">
- <button.commit_callback
- function="Pref.PrefDelete"
- parameter="camera"/>
- </button>
-</panel>