From 6075badea0dbfe0eab451913a54bb729a498c39b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 25 May 2012 19:24:38 -0400 Subject: fix problems due to LLSD-30, and implement persistent settings --- indra/newview/llautoreplace.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/newview/llautoreplace.h') diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h index 944676fedd..c097e96b9e 100644 --- a/indra/newview/llautoreplace.h +++ b/indra/newview/llautoreplace.h @@ -42,7 +42,7 @@ class LLAutoReplaceSettings /// Constructor for creating a tempory copy of the current settings LLAutoReplaceSettings(const LLAutoReplaceSettings& settings); - /// Replace the current settings with new ones + /// Replace the current settings with new ones and save them to the user settings file void set(const LLAutoReplaceSettings& newSettings); /// Load the current settings read from an LLSD file @@ -127,6 +127,10 @@ class LLAutoReplaceSettings /// Provides a hard-coded example of settings LLSD getExampleLLSD(); + + /// Get the actual settings as LLSD + const LLSD& getAsLLSD(); + ///< @note for use only in AutoReplace::saveToUserSettings private: /// Efficiently and safely compare list names @@ -193,9 +197,8 @@ class LLAutoReplace : public LLSingleton /// Callback that provides the hook for use in text entry methods void autoreplaceCallback(LLUIString& inputText, S32& cursorPos); - /// Get a copy of the current settings to be manipulated in the preferences dialog + /// Get a copy of the current settings LLAutoReplaceSettings getSettings(); - ///< @note: the caller is respon /// Commit new settings after making changes void setSettings(const LLAutoReplaceSettings& settings); @@ -206,12 +209,12 @@ class LLAutoReplace : public LLSingleton LLAutoReplaceSettings mSettings; ///< configuration information - /// Write the current lists out to the settings storage - void saveToUserSettings(const LLSD& newSettings); - /// Read settings from persistent storage void loadFromSettings(); + /// Make the newSettings active and write them to user storage + void saveToUserSettings(); + /// Compute the user settings file name std::string getUserSettingsFileName(); -- cgit v1.2.3