summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ab32c2f6bf..7791c037d3 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -144,7 +144,7 @@ LLVoiceSetKeyDialog::LLVoiceSetKeyDialog(const LLSD& key)
BOOL LLVoiceSetKeyDialog::postBuild()
{
childSetAction("Cancel", onCancel, this);
- childSetFocus("Cancel");
+ getChild<LLUICtrl>("Cancel")->setFocus(TRUE);
gFocusMgr.setKeystrokesOnly(TRUE);
@@ -330,7 +330,7 @@ BOOL LLFloaterPreference::postBuild()
tabcontainer->selectFirstTab();
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
- childSetText("cache_location", cache_location);
+ getChild<LLUICtrl>("cache_location")->setValue(cache_location);
// if floater is opened before login set default localized busy message
if (LLStartUp::getStartupState() < STATE_STARTED)
@@ -426,28 +426,28 @@ void LLFloaterPreference::apply()
fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView());
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
- childSetText("cache_location", cache_location);
+ getChild<LLUICtrl>("cache_location")->setValue(cache_location);
- LLViewerMedia::setCookiesEnabled(childGetValue("cookies_enabled"));
+ LLViewerMedia::setCookiesEnabled(getChild<LLUICtrl>("cookies_enabled")->getValue());
if(hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port"))
{
- bool proxy_enable = childGetValue("web_proxy_enabled");
- std::string proxy_address = childGetValue("web_proxy_editor");
- int proxy_port = childGetValue("web_proxy_port");
+ bool proxy_enable = getChild<LLUICtrl>("web_proxy_enabled")->getValue();
+ std::string proxy_address = getChild<LLUICtrl>("web_proxy_editor")->getValue();
+ int proxy_port = getChild<LLUICtrl>("web_proxy_port")->getValue();
LLViewerMedia::setProxyConfig(proxy_enable, proxy_address, proxy_port);
}
// LLWString busy_response = utf8str_to_wstring(getChild<LLUICtrl>("busy_response")->getValue().asString());
// LLWStringUtil::replaceTabsWithSpaces(busy_response, 4);
- gSavedSettings.setBOOL("PlainTextChatHistory", childGetValue("plain_text_chat_history").asBoolean());
+ gSavedSettings.setBOOL("PlainTextChatHistory", getChild<LLUICtrl>("plain_text_chat_history")->getValue().asBoolean());
if(mGotPersonalInfo)
{
// gSavedSettings.setString("BusyModeResponse2", std::string(wstring_to_utf8str(busy_response)));
- bool new_im_via_email = childGetValue("send_im_to_email").asBoolean();
- bool new_hide_online = childGetValue("online_visibility").asBoolean();
+ bool new_im_via_email = getChild<LLUICtrl>("send_im_to_email")->getValue().asBoolean();
+ bool new_hide_online = getChild<LLUICtrl>("online_visibility")->getValue().asBoolean();
if((new_im_via_email != mOriginalIMViaEmail)
||(new_hide_online != mOriginalHideOnlineStatus))
@@ -545,13 +545,13 @@ void LLFloaterPreference::onOpen(const LLSD& key)
maturity_list->deleteItems(LLSD(SIM_ACCESS_ADULT));
}
}
- childSetVisible("maturity_desired_combobox", true);
- childSetVisible("maturity_desired_textbox", false);
+ getChildView("maturity_desired_combobox")->setVisible( true);
+ getChildView("maturity_desired_textbox")->setVisible( false);
}
else
{
- childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel());
- childSetVisible("maturity_desired_combobox", false);
+ getChild<LLUICtrl>("maturity_desired_textbox")->setValue(maturity_combo->getSelectedItemLabel());
+ getChildView("maturity_desired_combobox")->setVisible( false);
}
// Display selected maturity icons.
@@ -930,7 +930,7 @@ void LLFloaterPreference::refreshEnabledState()
// now turn off any features that are unavailable
disableUnavailableSettings();
- childSetEnabled ("block_list", LLLoginInstance::getInstance()->authSuccess());
+ getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess());
}
void LLFloaterPreference::disableUnavailableSettings()
@@ -1101,7 +1101,7 @@ void LLFloaterPreference::onClickSetKey()
void LLFloaterPreference::setKey(KEY key)
{
- childSetValue("modifier_combo", LLKeyboard::stringFromKey(key));
+ getChild<LLUICtrl>("modifier_combo")->setValue(LLKeyboard::stringFromKey(key));
// update the control right away since we no longer wait for apply
getChild<LLUICtrl>("modifier_combo")->onCommit();
}
@@ -1214,46 +1214,46 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
if(visibility == VISIBILITY_DEFAULT)
{
mOriginalHideOnlineStatus = false;
- childEnable("online_visibility");
+ getChildView("online_visibility")->setEnabled(TRUE);
}
else if(visibility == VISIBILITY_HIDDEN)
{
mOriginalHideOnlineStatus = true;
- childEnable("online_visibility");
+ getChildView("online_visibility")->setEnabled(TRUE);
}
else
{
mOriginalHideOnlineStatus = true;
}
- childEnable("include_im_in_chat_history");
- childEnable("show_timestamps_check_im");
- childEnable("friends_online_notify_checkbox");
-
- childSetValue("online_visibility", mOriginalHideOnlineStatus);
- childSetLabelArg("online_visibility", "[DIR_VIS]", mDirectoryVisibility);
- childEnable("send_im_to_email");
- childSetValue("send_im_to_email", im_via_email);
- childEnable("plain_text_chat_history");
- childSetValue("plain_text_chat_history", gSavedSettings.getBOOL("PlainTextChatHistory"));
- childEnable("log_instant_messages");
-// childEnable("log_chat");
-// childEnable("busy_response");
-// childEnable("log_instant_messages_timestamp");
-// childEnable("log_chat_timestamp");
- childEnable("log_chat_IM");
- childEnable("log_date_timestamp");
-
-// childSetText("busy_response", gSavedSettings.getString("BusyModeResponse2"));
-
- childEnable("log_nearby_chat");
- childEnable("log_instant_messages");
- childEnable("show_timestamps_check_im");
- childDisable("log_path_string");// LineEditor becomes readonly in this case.
- childEnable("log_path_button");
+ getChildView("include_im_in_chat_history")->setEnabled(TRUE);
+ getChildView("show_timestamps_check_im")->setEnabled(TRUE);
+ getChildView("friends_online_notify_checkbox")->setEnabled(TRUE);
+
+ getChild<LLUICtrl>("online_visibility")->setValue(mOriginalHideOnlineStatus);
+ getChild<LLUICtrl>("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility);
+ getChildView("send_im_to_email")->setEnabled(TRUE);
+ getChild<LLUICtrl>("send_im_to_email")->setValue(im_via_email);
+ getChildView("plain_text_chat_history")->setEnabled(TRUE);
+ getChild<LLUICtrl>("plain_text_chat_history")->setValue(gSavedSettings.getBOOL("PlainTextChatHistory"));
+ getChildView("log_instant_messages")->setEnabled(TRUE);
+// getChildView("log_chat")->setEnabled(TRUE);
+// getChildView("busy_response")->setEnabled(TRUE);
+// getChildView("log_instant_messages_timestamp")->setEnabled(TRUE);
+// getChildView("log_chat_timestamp")->setEnabled(TRUE);
+ getChildView("log_chat_IM")->setEnabled(TRUE);
+ getChildView("log_date_timestamp")->setEnabled(TRUE);
+
+// getChild<LLUICtrl>("busy_response")->setValue(gSavedSettings.getString("BusyModeResponse2"));
+
+ getChildView("log_nearby_chat")->setEnabled(TRUE);
+ getChildView("log_instant_messages")->setEnabled(TRUE);
+ getChildView("show_timestamps_check_im")->setEnabled(TRUE);
+ getChildView("log_path_string")->setEnabled(FALSE);// LineEditor becomes readonly in this case.
+ getChildView("log_path_button")->setEnabled(TRUE);
std::string display_email(email);
- childSetText("email_address",display_email);
+ getChild<LLUICtrl>("email_address")->setValue(display_email);
}
@@ -1352,8 +1352,8 @@ BOOL LLPanelPreference::postBuild()
if(hasChild("voice_unavailable"))
{
BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice");
- childSetVisible("voice_unavailable", voice_disabled);
- childSetVisible("enable_voice_check", !voice_disabled);
+ getChildView("voice_unavailable")->setVisible( voice_disabled);
+ getChildView("enable_voice_check")->setVisible( !voice_disabled);
}
//////////////////////PanelSkins ///////////////////
@@ -1373,8 +1373,8 @@ BOOL LLPanelPreference::postBuild()
if(hasChild("online_visibility") && hasChild("send_im_to_email"))
{
- childSetText("email_address",getString("log_in_to_change") );
-// childSetText("busy_response", getString("log_in_to_change"));
+ getChild<LLUICtrl>("email_address")->setValue(getString("log_in_to_change") );
+// getChild<LLUICtrl>("busy_response")->setValue(getString("log_in_to_change"));
}
//////////////////////PanelPrivacy ///////////////////
@@ -1398,9 +1398,9 @@ BOOL LLPanelPreference::postBuild()
if (hasChild("modifier_combo"))
{
//localizing if push2talk button is set to middle mouse
- if (MIDDLE_MOUSE_CV == childGetValue("modifier_combo").asString())
+ if (MIDDLE_MOUSE_CV == getChild<LLUICtrl>("modifier_combo")->getValue().asString())
{
- childSetValue("modifier_combo", getString("middle_mouse"));
+ getChild<LLUICtrl>("modifier_combo")->setValue(getString("middle_mouse"));
}
}