minor ui tweaks from review

meow-7.2.2
Oz Linden 2012-06-12 06:50:22 -04:00
parent eb227e4dbc
commit 64a34c1370
6 changed files with 21 additions and 57 deletions

View File

@ -128,6 +128,8 @@ BOOL LLFloaterAutoReplaceSettings::postBuild(void)
mReplacementsList->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectEntry, this));
mReplacementsList->setCommitOnSelectionChange(true);
center();
mSelectedListName.clear();
updateListNames();
updateListNamesControls();

View File

@ -68,17 +68,10 @@ BOOL LLFloaterSpellCheckerSettings::postBuild(void)
getChild<LLUICtrl>("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false));
getChild<LLUICtrl>("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list"));
getChild<LLUICtrl>("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list"));
getChild<LLUICtrl>("spellcheck_ok")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnOK, this));
getChild<LLUICtrl>("spellcheck_cancel")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnCancel, this));
return true;
}
void LLFloaterSpellCheckerSettings::onBtnCancel()
{
closeFloater(false);
}
void LLFloaterSpellCheckerSettings::onBtnImport()
{
LLFloaterReg::showInstance("prefs_spellchecker_import");
@ -104,8 +97,14 @@ void LLFloaterSpellCheckerSettings::onBtnMove(const std::string& from, const std
from_ctrl->deleteSelectedItems();
}
void LLFloaterSpellCheckerSettings::onBtnOK()
void LLFloaterSpellCheckerSettings::onClose(bool app_quitting)
{
if (app_quitting)
{
// don't save anything
return;
}
std::list<std::string> list_dict;
LLComboBox* dict_combo = findChild<LLComboBox>("spellcheck_main_combo");
@ -126,8 +125,6 @@ void LLFloaterSpellCheckerSettings::onBtnOK()
}
}
gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ","));
closeFloater(false);
}
void LLFloaterSpellCheckerSettings::onOpen(const LLSD& key)
@ -254,7 +251,7 @@ BOOL LLFloaterSpellCheckerImport::postBuild(void)
getChild<LLUICtrl>("dictionary_path_browse")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnBrowse, this));
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnOK, this));
getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnCancel, this));
center();
return true;
}

View File

@ -37,12 +37,11 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
protected:
void onBtnCancel();
void onBtnImport();
void onBtnMove(const std::string& from, const std::string& to);
void onBtnOK();
void onBtnRemove();
void onSpellCheckSettingsChange();
void refreshDictionaries(bool from_settings);

View File

@ -3,20 +3,20 @@
border="true"
can_close="true"
can_minimize="true"
bottom="400"
left="300"
can_resize="false"
help_topic="autoreplace_settings"
save_rect="true"
height="455"
width="490"
name="autoreplace_floater"
title="Autoreplace Settings">
title="Auto-Replace Settings">
<check_box
bottom_delta="30"
left_delta="15"
height="16"
width="100"
follows="left|top"
label="Enable Autoreplace"
label="Enable Auto-Replace"
name="autoreplace_enable"
tool_tip="As you enter chat text, replace any of the keywords entered with the corresponding replacement"/>
<view_border

View File

@ -3,10 +3,10 @@
border="true"
can_close="true"
can_minimize="true"
bottom="300"
left="300"
save_rect="true"
help_topic="spelling_settings"
can_resize="false"
height="355"
height="315"
width="490"
name="spellcheck_floater"
title="Spell Checker Settings">
@ -157,38 +157,4 @@
name="spellcheck_import_btn"
top_delta="0"
width="80" />
<view_border
top_pad="10"
left="2"
height="0"
width="491"
follows="left|top"
bevel_style="none"
border_thickness="1"
mouse_opaque="false"
name="divisor4"/>
<button
top_pad="8"
right="380"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="spellcheck_ok"
label="OK" />
<button
top_delta="0"
right="480"
height="22"
width="90"
enabled="true"
follows="left|top"
mouse_opaque="true"
halign="center"
scale_image="true"
name="spellcheck_cancel"
label="Cancel" />
</floater>

View File

@ -207,7 +207,7 @@
<button
follows="left|top"
height="23"
label="Chat Translation Settings"
label="Translation..."
layout="topleft"
left="30"
name="ok_btn"
@ -224,7 +224,7 @@
left_pad="5"
name="autoreplace_showgui"
commit_callback.function="Pref.AutoReplace"
label="AutoReplace Settings"
label="Auto-Replace..."
width="150">
</button>
<button
@ -235,7 +235,7 @@
left_pad="5"
name="spellcheck_showgui"
commit_callback.function="Pref.SpellChecker"
label="Spell Checker Settings"
label="Spell Checking..."
width="150">
</button>