diff options
author | callum <none@none> | 2010-12-22 15:22:43 -0800 |
---|---|---|
committer | callum <none@none> | 2010-12-22 15:22:43 -0800 |
commit | fa776d805437a89bcd322513ce43e702853f5f1b (patch) | |
tree | d20fbea8008160e03cc1cfc0970a8d314098d5e2 /indra/newview/llfloaterpreference.cpp | |
parent | 064bdb00908f7b36e5ce65db28c7bd0ee9c9c0eb (diff) | |
parent | c86d6a7bbb7c0db7665b76cf52b12b90c6e98c6d (diff) |
Merge with tip of viewer-development
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 282 |
1 files changed, 147 insertions, 135 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index bcf5bf98e6..2d2e66f6d4 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -124,14 +124,14 @@ public: BOOL handleKeyHere(KEY key, MASK mask); static void onCancel(void* user_data); - + private: LLFloaterPreference* mParent; }; LLVoiceSetKeyDialog::LLVoiceSetKeyDialog(const LLSD& key) -: LLModalDialog(key), -mParent(NULL) + : LLModalDialog(key), + mParent(NULL) { } @@ -204,12 +204,12 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response // flag client texture cache for clearing next time the client runs gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); LLNotificationsUtil::add("CacheWillClear"); - + LLSearchHistory::getInstance()->clearHistory(); LLSearchHistory::getInstance()->save(); LLSearchComboBox* search_ctrl = LLNavigationBar::getInstance()->getChild<LLSearchComboBox>("search_combo_box"); search_ctrl->clearHistory(); - + LLTeleportHistoryStorage::getInstance()->purgeItems(); LLTeleportHistoryStorage::getInstance()->save(); } @@ -230,35 +230,35 @@ void handleDisplayNamesOptionChanged(const LLSD& newvalue) /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) - { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (0 == option && floater ) - { - if ( floater ) - { - floater->setAllIgnored(); - // LLFirstUse::disableFirstUse(); - floater->buildPopupLists(); - } - } - return false; - } - - bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) - { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if ( 0 == option && floater ) - { - if ( floater ) - { - floater->resetAllIgnored(); - //LLFirstUse::resetFirstUse(); - floater->buildPopupLists(); - } - } - return false; - } - */ +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option && floater ) + { + if ( floater ) + { + floater->setAllIgnored(); + // LLFirstUse::disableFirstUse(); + floater->buildPopupLists(); + } + } + return false; +} + +bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( 0 == option && floater ) + { + if ( floater ) + { + floater->resetAllIgnored(); + //LLFirstUse::resetFirstUse(); + floater->buildPopupLists(); + } + } + return false; +} +*/ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator) { @@ -300,7 +300,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this)); mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this)); - // mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this)); +// mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this)); mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, this)); mCommitCallbackRegistrar.add("Pref.SetCache", boost::bind(&LLFloaterPreference::onClickSetCache, this)); mCommitCallbackRegistrar.add("Pref.ResetCache", boost::bind(&LLFloaterPreference::onClickResetCache, this)); @@ -308,8 +308,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.SelectSkin", boost::bind(&LLFloaterPreference::onSelectSkin, this)); mCommitCallbackRegistrar.add("Pref.VoiceSetKey", boost::bind(&LLFloaterPreference::onClickSetKey, this)); mCommitCallbackRegistrar.add("Pref.VoiceSetMiddleMouse", boost::bind(&LLFloaterPreference::onClickSetMiddleMouse, this)); - // mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this)); - // mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this)); +// mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this)); +// mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this)); mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this)); mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this)); mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); @@ -328,7 +328,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.CommitDoubleClickChekbox", boost::bind(&LLFloaterPreference::onDoubleClickCheckBox, this, _1)); mCommitCallbackRegistrar.add("Pref.CommitRadioDoubleClick", boost::bind(&LLFloaterPreference::onDoubleClickRadio, this)); - + gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); @@ -381,13 +381,15 @@ void LLFloaterPreference::saveAvatarProperties( void ) BOOL LLFloaterPreference::postBuild() { gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); - + gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); - + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); - + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); - + + gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2)); + LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); @@ -405,7 +407,7 @@ BOOL LLFloaterPreference::postBuild() { gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); } - + return TRUE; } @@ -484,7 +486,7 @@ void LLFloaterPreference::apply() } gViewerWindow->requestResolutionUpdate(); // for UIScaleFactor - + LLSliderCtrl* fov_slider = getChild<LLSliderCtrl>("camera_fov"); fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView()); fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView()); @@ -502,19 +504,19 @@ void LLFloaterPreference::apply() 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); - +// LLWString busy_response = utf8str_to_wstring(getChild<LLUICtrl>("busy_response")->getValue().asString()); +// LLWStringUtil::replaceTabsWithSpaces(busy_response, 4); + gSavedSettings.setBOOL("PlainTextChatHistory", getChild<LLUICtrl>("plain_text_chat_history")->getValue().asBoolean()); if(mGotPersonalInfo) { - // gSavedSettings.setString("BusyModeResponse2", std::string(wstring_to_utf8str(busy_response))); +// gSavedSettings.setString("BusyModeResponse2", std::string(wstring_to_utf8str(busy_response))); 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)) + ||(new_hide_online != mOriginalHideOnlineStatus)) { // This hack is because we are representing several different // possible strings with a single checkbox. Since most users @@ -525,13 +527,13 @@ void LLFloaterPreference::apply() { if(new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN; else mDirectoryVisibility = VISIBILITY_DEFAULT; - //Update showonline value, otherwise multiple applys won't work + //Update showonline value, otherwise multiple applys won't work mOriginalHideOnlineStatus = new_hide_online; } gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility); } } - + saveAvatarProperties(); if (mDoubleClickActionDirty) @@ -546,7 +548,7 @@ void LLFloaterPreference::cancel() LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core"); // Call cancel() on all panels that derive from LLPanelPreference for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin(); - iter != tabcontainer->getChildList()->end(); ++iter) + iter != tabcontainer->getChildList()->end(); ++iter) { LLView* view = *iter; LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view); @@ -574,7 +576,7 @@ void LLFloaterPreference::cancel() } void LLFloaterPreference::onOpen(const LLSD& key) -{ +{ // this variable and if that follows it are used to properly handle busy mode response message static bool initialized = FALSE; @@ -585,7 +587,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) // in non-localizable xml, and also because it may be changed by user and in this case it shouldn't be localized. // To keep track of whether busy response is default or changed by user additional setting BusyResponseChanged // was added into per account settings. - + // initialization should happen once,so setting variable to TRUE initialized = TRUE; // this connection is needed to properly set "BusyResponseChanged" setting when user makes changes in @@ -593,13 +595,13 @@ void LLFloaterPreference::onOpen(const LLSD& key) gSavedPerAccountSettings.getControl("BusyModeResponse")->getSignal()->connect(boost::bind(&LLFloaterPreference::onBusyResponseChanged, this)); } gAgent.sendAgentUserInfoRequest(); - + /////////////////////////// From LLPanelGeneral ////////////////////////// // if we have no agent, we can't let them choose anything // if we have an agent, then we only let them choose if they have a choice bool can_choose_maturity = - gAgent.getID().notNull() && - (gAgent.isMature() || gAgent.isGodlike()); + gAgent.getID().notNull() && + (gAgent.isMature() || gAgent.isGodlike()); LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox"); LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest( gAgent.getID() ); @@ -633,7 +635,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Enabled/disabled popups, might have been changed by user actions // while preferences floater was closed. buildPopupLists(); - + LLPanelLogin::setAlwaysRefresh(true); refresh(); @@ -650,13 +652,13 @@ void LLFloaterPreference::onVertexShaderEnable() //static void LLFloaterPreference::initBusyResponse() -{ - if (!gSavedPerAccountSettings.getBOOL("BusyResponseChanged")) { - //LLTrans::getString("BusyModeResponseDefault") is used here for localization (EXT-5885) - gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); + if (!gSavedPerAccountSettings.getBOOL("BusyResponseChanged")) + { + //LLTrans::getString("BusyModeResponseDefault") is used here for localization (EXT-5885) + gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault")); + } } -} void LLFloaterPreference::setHardwareDefaults() { @@ -698,13 +700,13 @@ void LLFloaterPreference::onBtnOK() cur_focus->onCommit(); } } - + if (canClose()) { saveSettings(); apply(); closeFloater(false); - + LLUIColorTable::instance().saveUserSettings(); gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); @@ -716,7 +718,7 @@ void LLFloaterPreference::onBtnOK() // Show beep, pop up dialog, etc. llinfos << "Can't close preferences!" << llendl; } - + LLPanelLogin::updateLocationCombo( false ); } @@ -733,7 +735,7 @@ void LLFloaterPreference::onBtnApply( ) } apply(); saveSettings(); - + LLPanelLogin::updateLocationCombo( false ); } @@ -796,19 +798,29 @@ void LLFloaterPreference::onLanguageChange() } } +void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue) +{ + LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("background"); + if (color_swatch) + { + LLColor4 new_color = color_swatch->get(); + color_swatch->set( new_color.setAlpha(newvalue.asReal()) ); + } +} + void LLFloaterPreference::onClickSetCache() { std::string cur_name(gSavedSettings.getString("CacheLocation")); - // std::string cur_top_folder(gDirUtilp->getBaseFileName(cur_name)); +// std::string cur_top_folder(gDirUtilp->getBaseFileName(cur_name)); std::string proposed_name(cur_name); - + LLDirPicker& picker = LLDirPicker::instance(); if (! picker.getDir(&proposed_name ) ) { return; //Canceled! } - + std::string dir_name = picker.getDirName(); if (!dir_name.empty() && dir_name != cur_name) { @@ -864,9 +876,9 @@ void LLFloaterPreference::refreshSkin(void* data) void LLFloaterPreference::buildPopupLists() { LLScrollListCtrl& disabled_popups = - getChildRef<LLScrollListCtrl>("disabled_popups"); + getChildRef<LLScrollListCtrl>("disabled_popups"); LLScrollListCtrl& enabled_popups = - getChildRef<LLScrollListCtrl>("enabled_popups"); + getChildRef<LLScrollListCtrl>("enabled_popups"); disabled_popups.deleteAllItems(); enabled_popups.deleteAllItems(); @@ -932,8 +944,8 @@ void LLFloaterPreference::refreshEnabledState() // Reflections BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable") - && gGLManager.mHasCubeMap - && LLCubeMap::sUseCubeMaps; + && gGLManager.mHasCubeMap + && LLCubeMap::sUseCubeMaps; ctrl_reflections->setEnabled(reflections); // Bump & Shiny @@ -947,7 +959,7 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram"); // Avatar Render Mode LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth"); - + S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE); @@ -966,7 +978,7 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders"); // radio set for terrain detail mode LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var - + ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")); BOOL shaders = ctrl_shader_enable->get(); @@ -986,7 +998,7 @@ void LLFloaterPreference::refreshEnabledState() // *HACK just checks to see if we can use shaders... // maybe some cards that use shaders, but don't support windlight ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders); - + //Deferred/SSAO/Shadows LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseFBO") && @@ -994,25 +1006,25 @@ void LLFloaterPreference::refreshEnabledState() shaders) { BOOL enabled = (ctrl_wind_light->get()) ? TRUE : FALSE; - + ctrl_deferred->setEnabled(enabled); - + LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); - + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE); ctrl_ssao->setEnabled(enabled); - + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); - + ctrl_shadow->setEnabled(enabled); } - - + + // now turn off any features that are unavailable disableUnavailableSettings(); - + getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess()); } @@ -1027,7 +1039,7 @@ void LLFloaterPreference::disableUnavailableSettings() LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail"); LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); - + // if vertex shaders off, disable all shader related products if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")) { @@ -1045,13 +1057,13 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_avatar_cloth->setEnabled(FALSE); ctrl_avatar_cloth->setValue(FALSE); - + ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); - + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } @@ -1061,18 +1073,18 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_wind_light->setEnabled(FALSE); ctrl_wind_light->setValue(FALSE); - + //deferred needs windlight, disable deferred ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); - + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } - + // disabled deferred if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred")) { @@ -1081,7 +1093,7 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); - + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } @@ -1099,7 +1111,7 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); } - + // disabled reflections if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail")) { @@ -1115,25 +1127,25 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_avatar_cloth->setEnabled(FALSE); ctrl_avatar_cloth->setValue(FALSE); - + //deferred needs AvatarVP, disable deferred ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); - + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } - + // disabled cloth if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth")) { ctrl_avatar_cloth->setEnabled(FALSE); ctrl_avatar_cloth->setValue(FALSE); } - + // disabled impostors if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors")) { @@ -1145,7 +1157,7 @@ void LLFloaterPreference::disableUnavailableSettings() void LLFloaterPreference::refresh() { LLPanel::refresh(); - + // sliders and their text boxes // mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow"); // slider text boxes @@ -1192,10 +1204,10 @@ void LLFloaterPreference::setKey(KEY key) void LLFloaterPreference::onClickSetMiddleMouse() { LLUICtrl* p2t_line_editor = getChild<LLUICtrl>("modifier_combo"); - + // update the control right away since we no longer wait for apply p2t_line_editor->setControlValue(MIDDLE_MOUSE_CV); - + //push2talk button "middle mouse" control value is in English, need to localize it for presentation LLPanel* advanced_preferences = dynamic_cast<LLPanel*>(p2t_line_editor->getParent()); if (advanced_preferences) @@ -1204,15 +1216,15 @@ void LLFloaterPreference::onClickSetMiddleMouse() } } /* - void LLFloaterPreference::onClickSkipDialogs() - { - LLNotificationsUtil::add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, this)); - } - - void LLFloaterPreference::onClickResetDialogs() - { - LLNotificationsUtil::add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, this)); - } +void LLFloaterPreference::onClickSkipDialogs() +{ + LLNotificationsUtil::add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, this)); +} + +void LLFloaterPreference::onClickResetDialogs() +{ + LLNotificationsUtil::add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, this)); +} */ void LLFloaterPreference::onClickEnablePopup() @@ -1282,7 +1294,7 @@ void LLFloaterPreference::onClickLogPath() { return; //Canceled! } - + gSavedPerAccountSettings.setString("InstantMessageLogPath", picker.getDirName()); } @@ -1318,14 +1330,14 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im 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")->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")); +// getChild<LLUICtrl>("busy_response")->setValue(gSavedSettings.getString("BusyModeResponse2")); getChildView("log_nearby_chat")->setEnabled(TRUE); getChildView("log_instant_messages")->setEnabled(TRUE); @@ -1335,7 +1347,7 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im childEnable("logfile_name_datestamp"); std::string display_email(email); getChild<LLUICtrl>("email_address")->setValue(display_email); - + } void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name) @@ -1382,14 +1394,14 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b void LLFloaterPreference::onChangeMaturity() { U8 sim_access = gSavedSettings.getU32("PreferredMaturity"); - + getChild<LLIconCtrl>("rating_icon_general")->setVisible(sim_access == SIM_ACCESS_PG || sim_access == SIM_ACCESS_MATURE || sim_access == SIM_ACCESS_ADULT); - + getChild<LLIconCtrl>("rating_icon_moderate")->setVisible(sim_access == SIM_ACCESS_MATURE - || sim_access == SIM_ACCESS_ADULT); - + || sim_access == SIM_ACCESS_ADULT); + getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); } @@ -1496,7 +1508,7 @@ LLPanelPreference::LLPanelPreference() //virtual BOOL LLPanelPreference::postBuild() { - + ////////////////////// PanelVoice /////////////////// if(hasChild("voice_unavailable")) { @@ -1510,20 +1522,20 @@ BOOL LLPanelPreference::postBuild() if (hasChild("skin_selection")) { LLFloaterPreference::refreshSkin(this); - + // if skin is set to a skin that no longer exists (silver) set back to default if (getChild<LLRadioGroup>("skin_selection")->getSelectedIndex() < 0) { gSavedSettings.setString("SkinCurrent", "default"); LLFloaterPreference::refreshSkin(this); } - + } - + if(hasChild("online_visibility") && hasChild("send_im_to_email")) { getChild<LLUICtrl>("email_address")->setValue(getString("log_in_to_change") ); - // getChild<LLUICtrl>("busy_response")->setValue(getString("log_in_to_change")); +// getChild<LLUICtrl>("busy_response")->setValue(getString("log_in_to_change")); } //////////////////////PanelPrivacy /////////////////// @@ -1542,7 +1554,7 @@ BOOL LLPanelPreference::postBuild() { getChild<LLCheckBoxCtrl>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); } - + // Panel Advanced if (hasChild("modifier_combo")) { @@ -1552,7 +1564,7 @@ BOOL LLPanelPreference::postBuild() getChild<LLUICtrl>("modifier_combo")->setValue(getString("middle_mouse")); } } - + apply(); return true; } @@ -1573,7 +1585,7 @@ void LLPanelPreference::saveSettings() // Process view on top of the stack LLView* curview = view_stack.front(); view_stack.pop_front(); - + LLColorSwatchCtrl* color_swatch = dynamic_cast<LLColorSwatchCtrl *>(curview); if (color_swatch) { @@ -1591,7 +1603,7 @@ void LLPanelPreference::saveSettings() } } } - + // Push children onto the end of the work stack for (child_list_t::const_iterator iter = curview->getChildList()->begin(); iter != curview->getChildList()->end(); ++iter) @@ -1618,7 +1630,7 @@ void LLPanelPreference::cancel() LLSD ctrl_value = iter->second; control->set(ctrl_value); } - + for (string_color_map_t::iterator iter = mSavedColors.begin(); iter != mSavedColors.end(); ++iter) { @@ -1655,9 +1667,9 @@ void LLPanelPreferenceGraphics::draw() if(button_apply && button_apply->getVisible()) { bool enable = hasDirtyChilds(); - + button_apply->setEnabled(enable); - + } } bool LLPanelPreferenceGraphics::hasDirtyChilds() @@ -1669,7 +1681,7 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds() // Process view on top of the stack LLView* curview = view_stack.front(); view_stack.pop_front(); - + LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview); if (ctrl) { @@ -1695,7 +1707,7 @@ void LLPanelPreferenceGraphics::resetDirtyChilds() // Process view on top of the stack LLView* curview = view_stack.front(); view_stack.pop_front(); - + LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview); if (ctrl) { |