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.cpp40
1 files changed, 13 insertions, 27 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 32ee9a073c..ab32c2f6bf 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -70,6 +70,7 @@
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llsliderctrl.h"
+#include "llsidetray.h"
#include "lltabcontainer.h"
#include "lltrans.h"
#include "llviewercontrol.h"
@@ -309,6 +310,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this));
+ mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this));
sSkin = gSavedSettings.getString("SkinCurrent");
}
@@ -465,8 +467,6 @@ void LLFloaterPreference::apply()
gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility);
}
}
-
- applyResolution();
}
void LLFloaterPreference::cancel()
@@ -1298,31 +1298,6 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
}
}
-void LLFloaterPreference::applyResolution()
-{
- gGL.flush();
-
- // Screen resolution
- S32 num_resolutions;
- LLWindow::LLWindowResolution* supported_resolutions =
- gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
- S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
- if (resIndex == -1)
- {
- // use highest resolution if nothing selected
- resIndex = num_resolutions - 1;
- }
- gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
- gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);
-
- gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("FullScreen"));
-
- send_agent_update(TRUE);
-
- // Update enable/disable
- refresh();
-}
-
void LLFloaterPreference::onChangeMaturity()
{
U8 sim_access = gSavedSettings.getU32("PreferredMaturity");
@@ -1337,6 +1312,17 @@ void LLFloaterPreference::onChangeMaturity()
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
}
+// FIXME: this will stop you from spawning the sidetray from preferences dialog on login screen
+// but the UI for this will still be enabled
+void LLFloaterPreference::onClickBlockList()
+{
+ // don't create side tray on demand
+ if (LLSideTray::instanceCreated())
+ {
+ LLSideTray::getInstance()->showPanel("panel_block_list_sidetray");
+ }
+}
+
void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
{