diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
commit | 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch) | |
tree | 4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloaterpreference.h | |
parent | 351ebe9fcb76f3b99c2957004bb8493a904869ee (diff) |
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloaterpreference.h')
-rw-r--r-- | indra/newview/llfloaterpreference.h | 127 |
1 files changed, 66 insertions, 61 deletions
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index f48696ffdb..000bff4dea 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -40,94 +40,99 @@ #define LL_LLFLOATERPREFERENCE_H #include "llfloater.h" -#include "lltabcontainervertical.h" -class LLPanelGeneral; -class LLPanelInput; +class LLPanelPreference; class LLPanelLCD; class LLPanelDisplay; -class LLPanelAudioPrefs; class LLPanelDebug; -class LLPanelNetwork; -class LLPanelWeb; class LLMessageSystem; -class LLPrefsChat; -class LLPrefsVoice; -class LLPrefsIM; -class LLPanelMsgs; -class LLPanelSkins; class LLScrollListCtrl; -class LLPreferenceCore -{ - -public: - LLPreferenceCore(LLTabContainer* tab_container, LLButton * default_btn); - ~LLPreferenceCore(); - - void apply(); - void cancel(); - - LLTabContainer* getTabContainer() { return mTabContainer; } - - void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); - - static void onTabChanged(void* user_data, bool from_click); - - // refresh all the graphics preferences menus - void refreshEnabledGraphics(); - -private: - LLTabContainer *mTabContainer; - LLPanelGeneral *mGeneralPanel; - LLPanelSkins *mSkinsPanel; - LLPanelInput *mInputPanel; - LLPanelNetwork *mNetworkPanel; - LLPanelDisplay *mDisplayPanel; - LLPanelAudioPrefs *mAudioPanel; -// LLPanelDebug *mDebugPanel; - LLPrefsChat *mPrefsChat; - LLPrefsVoice *mPrefsVoice; - LLPrefsIM *mPrefsIM; - LLPanelWeb *mWebPanel; - LLPanelMsgs *mMsgPanel; - LLPanelLCD *mLCDPanel; -}; +class LLSD; // Floater to control preferences (display, audio, bandwidth, general. class LLFloaterPreference : public LLFloater { public: - LLFloaterPreference(); + LLFloaterPreference(const LLSD& key); ~LLFloaterPreference(); void apply(); void cancel(); + /*virtual*/ void draw(); virtual BOOL postBuild(); - static void show(void*); + virtual void onOpen(const LLSD& key); + virtual void onClose(bool app_quitting); // static data update, called from message handler static void updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email); // refresh all the graphics preferences menus static void refreshEnabledGraphics(); - + protected: - LLPreferenceCore *mPreferenceCore; - - /*virtual*/ void onClose(bool app_quitting); + + void onBtnOK(); + void onBtnCancel(); + void onBtnApply(); + void onOpenHelp(); + + static void onClickClearCache(void*); + static void onClickBrowserClearCache(void*); + + // if the custom settings box is clicked + void onChangeCustom(); + void updateMeterText(LLUICtrl* ctrl); + void onOpenHardwareSettings(); + /// callback for defaults + void setHardwareDefaults(); + // callback for when client turns on shaders + void onVertexShaderEnable(); +public: - LLButton* mAboutBtn; - LLButton *mOKBtn; - LLButton *mCancelBtn; - LLButton *mApplyBtn; + void onClickSetCache(); + void onClickResetCache(); + void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); + void onSelectSkin(); + void onClickSetKey(); + void setKey(KEY key); + void onClickSetMiddleMouse(); + void onClickSkipDialogs(); + void onClickResetDialogs(); + void onClickEnablePopup(); + void resetAllIgnored(); + void setAllIgnored(); + void onClickLogPath(); + void enableHistory(); + void onCommitLogging(); + void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + + static void buildLists(void* data); + static void refreshSkin(void* data); + static void cleanupBadSetting(); + +private: + static std::string sSkin; + bool mGotPersonalInfo; + bool mOriginalIMViaEmail; + + bool mOriginalHideOnlineStatus; + std::string mDirectoryVisibility; - static void onClickAbout(void*); - static void onBtnOK(void*); - static void onBtnCancel(void*); - static void onBtnApply(void*); +}; - static LLFloaterPreference* sInstance; +class LLPanelPreference : public LLPanel +{ +public: + LLPanelPreference(); + /*virtual*/ BOOL postBuild(); + + virtual void apply(); + virtual void cancel(); + void setControlFalse(const LLSD& user_data); +private: + typedef std::map<LLControlVariable*, LLSD> control_values_map_t; + control_values_map_t mSavedValues; }; #endif // LL_LLPREFERENCEFLOATER_H |