STORM-2082 Rearrange Reset, load, save, delete buttons.
Make load, save, and delete floaters close when preferences floater closes.master
parent
986ddaf9e8
commit
1b7c00b558
|
|
@ -30,9 +30,11 @@
|
|||
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpresetsmanager.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
||||
LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key)
|
||||
: LLFloater(key)
|
||||
|
|
@ -42,6 +44,11 @@ LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key)
|
|||
// virtual
|
||||
BOOL LLFloaterDeletePrefPreset::postBuild()
|
||||
{
|
||||
LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
|
||||
if (preferences)
|
||||
{
|
||||
preferences->addDependentFloater(this);
|
||||
}
|
||||
getChild<LLButton>("delete")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnDelete, this));
|
||||
getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this));
|
||||
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this));
|
||||
|
|
|
|||
|
|
@ -42,7 +42,11 @@ LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key)
|
|||
|
||||
// virtual
|
||||
BOOL LLFloaterLoadPrefPreset::postBuild()
|
||||
{
|
||||
{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
|
||||
if (preferences)
|
||||
{
|
||||
preferences->addDependentFloater(this);
|
||||
}
|
||||
getChild<LLButton>("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this));
|
||||
getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this));
|
||||
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this));
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpresetsmanager.h"
|
||||
|
||||
|
|
@ -40,7 +42,11 @@ LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key)
|
|||
|
||||
// virtual
|
||||
BOOL LLFloaterSavePrefPreset::postBuild()
|
||||
{
|
||||
{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
|
||||
if (preferences)
|
||||
{
|
||||
preferences->addDependentFloater(this);
|
||||
}
|
||||
getChild<LLComboBox>("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this));
|
||||
getChild<LLComboBox>("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this));
|
||||
getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this));
|
||||
|
|
|
|||
|
|
@ -31,34 +31,6 @@
|
|||
(None)
|
||||
</text>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Load preset..."
|
||||
layout="topleft"
|
||||
left_pad="5"
|
||||
name="PrefLoadButton"
|
||||
top_delta="0"
|
||||
width="115">
|
||||
<button.commit_callback
|
||||
function="Pref.PrefLoad"
|
||||
parameter="graphic"/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Delete preset..."
|
||||
layout="topleft"
|
||||
left_pad="5"
|
||||
name="PrefDeleteButton"
|
||||
top_delta="0"
|
||||
width="115">
|
||||
<button.commit_callback
|
||||
function="Pref.PrefDelete"
|
||||
parameter="graphic"/>
|
||||
</button>
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
|
|
@ -230,19 +202,6 @@
|
|||
|
||||
<!-- This block shows Basic Settings -->
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Reset to recommended settings"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
name="Defaults"
|
||||
top_delta="30"
|
||||
width="210">
|
||||
<button.commit_callback
|
||||
function="Pref.HardwareDefaults" />
|
||||
</button>
|
||||
|
||||
<slider
|
||||
control_name="RenderFarClip"
|
||||
decimal_digits="0"
|
||||
|
|
@ -303,30 +262,72 @@
|
|||
<!-- End of Basic Settings block -->
|
||||
|
||||
<button
|
||||
follows="left|bottom"
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Save settings as a preset..."
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="PrefSaveButton"
|
||||
top="310"
|
||||
width="200">
|
||||
<button.commit_callback
|
||||
function="Pref.PrefSave"
|
||||
parameter="graphic" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Load preset..."
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
name="PrefLoadButton"
|
||||
top_delta="0"
|
||||
width="115">
|
||||
<button.commit_callback
|
||||
function="Pref.PrefLoad"
|
||||
parameter="graphic"/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Delete preset..."
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
name="PrefDeleteButton"
|
||||
top_delta="0"
|
||||
width="115">
|
||||
<button.commit_callback
|
||||
function="Pref.PrefDelete"
|
||||
parameter="graphic"/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Reset to recommended settings"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="Defaults"
|
||||
top_delta="65"
|
||||
width="210">
|
||||
<button.commit_callback
|
||||
function="Pref.HardwareDefaults" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Advanced Settings..."
|
||||
layout="topleft"
|
||||
left="10"
|
||||
left_pad="10"
|
||||
name="AdvancedSettings"
|
||||
top_delta="60"
|
||||
top_delta="0"
|
||||
width="200">
|
||||
<button.commit_callback
|
||||
function="Pref.Advanced"
|
||||
parameter="advanced" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="23"
|
||||
label="Save settings as a preset..."
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="PrefSaveButton"
|
||||
top="295"
|
||||
width="200">
|
||||
<button.commit_callback
|
||||
function="Pref.PrefSave"
|
||||
parameter="graphic" />
|
||||
</button>
|
||||
</panel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue