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.cpp58
1 files changed, 24 insertions, 34 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 1b62f94a13..ce1072a968 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -432,6 +432,13 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo
bool LLFloaterPreference::postBuild()
{
+ mDeleteTranscriptsBtn = getChild<LLButton>("delete_transcripts");
+
+ mEnabledPopups = getChild<LLScrollListCtrl>("enabled_popups");
+ mDisabledPopups = getChild<LLScrollListCtrl>("disabled_popups");
+ mEnablePopupBtn = getChild<LLButton>("enable_this_popup");
+ mDisablePopupBtn = getChild<LLButton>("disable_this_popup");
+
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false));
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged));
@@ -521,7 +528,7 @@ bool LLFloaterPreference::postBuild()
void LLFloaterPreference::updateDeleteTranscriptsButton()
{
- getChild<LLButton>("delete_transcripts")->setEnabled(LLLogChat::transcriptFilesExist());
+ mDeleteTranscriptsBtn->setEnabled(LLLogChat::transcriptFilesExist());
}
void LLFloaterPreference::onDoNotDisturbResponseChanged()
@@ -543,11 +550,11 @@ LLFloaterPreference::~LLFloaterPreference()
void LLFloaterPreference::draw()
{
- bool has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
- gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
+ bool has_first_selected = (mDisabledPopups->getFirstSelected()!=NULL);
+ mEnablePopupBtn->setEnabled(has_first_selected);
- has_first_selected = (getChildRef<LLScrollListCtrl>("enabled_popups").getFirstSelected()!=NULL);
- gSavedSettings.setBOOL("FirstSelectedEnabledPopups", has_first_selected);
+ has_first_selected = (mEnabledPopups->getFirstSelected()!=NULL);
+ mDisablePopupBtn->setEnabled(has_first_selected);
LLFloater::draw();
}
@@ -1104,7 +1111,7 @@ void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue)
if (color_swatch)
{
LLColor4 new_color = color_swatch->get();
- color_swatch->set( new_color.setAlpha(newvalue.asReal()) );
+ color_swatch->set(new_color.setAlpha((F32)newvalue.asReal()));
}
}
@@ -1174,13 +1181,8 @@ void LLFloaterPreference::refreshSkin(void* data)
void LLFloaterPreference::buildPopupLists()
{
- LLScrollListCtrl& disabled_popups =
- getChildRef<LLScrollListCtrl>("disabled_popups");
- LLScrollListCtrl& enabled_popups =
- getChildRef<LLScrollListCtrl>("enabled_popups");
-
- disabled_popups.deleteAllItems();
- enabled_popups.deleteAllItems();
+ mDisabledPopups->deleteAllItems();
+ mEnabledPopups->deleteAllItems();
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
iter != LLNotifications::instance().templatesEnd();
@@ -1222,11 +1224,11 @@ void LLFloaterPreference::buildPopupLists()
}
}
}
- item = disabled_popups.addElement(row);
+ item = mDisabledPopups->addElement(row);
}
else
{
- item = enabled_popups.addElement(row);
+ item = mEnabledPopups->addElement(row);
}
if (item)
@@ -1238,11 +1240,6 @@ void LLFloaterPreference::buildPopupLists()
void LLFloaterPreference::refreshEnabledState()
{
- LLCheckBoxCtrl* ctrl_pbr = getChild<LLCheckBoxCtrl>("UsePBRShaders");
-
- //PBR
- ctrl_pbr->setEnabled(true);
-
// Cannot have floater active until caps have been received
getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() >= STATE_STARTED);
@@ -1330,9 +1327,7 @@ void LLFloaterPreference::onClickSetSounds()
void LLFloaterPreference::onClickEnablePopup()
{
- LLScrollListCtrl& disabled_popups = getChildRef<LLScrollListCtrl>("disabled_popups");
-
- std::vector<LLScrollListItem*> items = disabled_popups.getAllSelected();
+ std::vector<LLScrollListItem*> items = mDisabledPopups->getAllSelected();
std::vector<LLScrollListItem*>::iterator itor;
for (itor = items.begin(); itor != items.end(); ++itor)
{
@@ -1351,9 +1346,7 @@ void LLFloaterPreference::onClickEnablePopup()
void LLFloaterPreference::onClickDisablePopup()
{
- LLScrollListCtrl& enabled_popups = getChildRef<LLScrollListCtrl>("enabled_popups");
-
- std::vector<LLScrollListItem*> items = enabled_popups.getAllSelected();
+ std::vector<LLScrollListItem*> items = mEnabledPopups->getAllSelected();
std::vector<LLScrollListItem*>::iterator itor;
for (itor = items.begin(); itor != items.end(); ++itor)
{
@@ -1840,11 +1833,9 @@ void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification,
void LLFloaterPreference::onLogChatHistorySaved()
{
- LLButton * delete_transcripts_buttonp = getChild<LLButton>("delete_transcripts");
-
- if (!delete_transcripts_buttonp->getEnabled())
+ if (!mDeleteTranscriptsBtn->getEnabled())
{
- delete_transcripts_buttonp->setEnabled(true);
+ mDeleteTranscriptsBtn->setEnabled(true);
}
}
@@ -1954,7 +1945,7 @@ void LLFloaterPreference::setCacheLocation(const LLStringExplicit& location)
void LLFloaterPreference::selectPanel(const LLSD& name)
{
LLTabContainer * tab_containerp = getChild<LLTabContainer>("pref core");
- LLPanel * panel = tab_containerp->getPanelByName(name);
+ LLPanel * panel = tab_containerp->getPanelByName(name.asStringRef());
if (NULL != panel)
{
tab_containerp->selectTabPanel(panel);
@@ -2378,7 +2369,6 @@ bool LLPanelPreferenceGraphics::postBuild()
void LLPanelPreferenceGraphics::draw()
{
- setPresetText();
LLPanelPreference::draw();
}
@@ -3359,8 +3349,8 @@ void LLFloaterPreference::onUpdateFilterTerm(bool force)
void LLFloaterPreference::filterIgnorableNotifications()
{
- bool visible = getChildRef<LLScrollListCtrl>("enabled_popups").highlightMatchingItems(mFilterEdit->getValue());
- visible |= getChildRef<LLScrollListCtrl>("disabled_popups").highlightMatchingItems(mFilterEdit->getValue());
+ bool visible = mEnabledPopups->highlightMatchingItems(mFilterEdit->getValue());
+ visible |= mDisabledPopups->highlightMatchingItems(mFilterEdit->getValue());
if (visible)
{