diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llprefsim.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llprefsim.cpp')
-rw-r--r-- | linden/indra/newview/llprefsim.cpp | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index fff10c7..5333df8 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp | |||
@@ -76,8 +76,8 @@ protected: | |||
76 | BOOL mLogIMChat; | 76 | BOOL mLogIMChat; |
77 | BOOL mLogTimestampDate; | 77 | BOOL mLogTimestampDate; |
78 | 78 | ||
79 | LLString mIMBusyResponse; | 79 | std::string mIMBusyResponse; |
80 | LLString mLogPath; | 80 | std::string mLogPath; |
81 | 81 | ||
82 | bool mGotPersonalInfo; | 82 | bool mGotPersonalInfo; |
83 | bool mOriginalIMViaEmail; | 83 | bool mOriginalIMViaEmail; |
@@ -89,7 +89,7 @@ protected: | |||
89 | 89 | ||
90 | 90 | ||
91 | LLPrefsIMImpl::LLPrefsIMImpl() | 91 | LLPrefsIMImpl::LLPrefsIMImpl() |
92 | : LLPanel("IM Prefs Panel") | 92 | : LLPanel(std::string("IM Prefs Panel")) |
93 | { | 93 | { |
94 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_im.xml"); | 94 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_im.xml"); |
95 | } | 95 | } |
@@ -190,16 +190,16 @@ void LLPrefsIMImpl::apply() | |||
190 | LLTextEditor* busy = getChild<LLTextEditor>("busy_response"); | 190 | LLTextEditor* busy = getChild<LLTextEditor>("busy_response"); |
191 | LLWString busy_response; | 191 | LLWString busy_response; |
192 | if (busy) busy_response = busy->getWText(); | 192 | if (busy) busy_response = busy->getWText(); |
193 | LLWString::replaceTabsWithSpaces(busy_response, 4); | 193 | LLWStringUtil::replaceTabsWithSpaces(busy_response, 4); |
194 | LLWString::replaceChar(busy_response, '\n', '^'); | 194 | LLWStringUtil::replaceChar(busy_response, '\n', '^'); |
195 | LLWString::replaceChar(busy_response, ' ', '%'); | 195 | LLWStringUtil::replaceChar(busy_response, ' ', '%'); |
196 | 196 | ||
197 | if(mGotPersonalInfo) | 197 | if(mGotPersonalInfo) |
198 | { | 198 | { |
199 | 199 | ||
200 | gSavedPerAccountSettings.setString("BusyModeResponse", LLString(wstring_to_utf8str(busy_response))); | 200 | gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response))); |
201 | 201 | ||
202 | gSavedPerAccountSettings.setString("InstantMessageLogPath", childGetText("log_path_string").c_str()); | 202 | gSavedPerAccountSettings.setString("InstantMessageLogPath", childGetText("log_path_string")); |
203 | gSavedPerAccountSettings.setBOOL("LogInstantMessages",childGetValue("log_instant_messages").asBoolean()); | 203 | gSavedPerAccountSettings.setBOOL("LogInstantMessages",childGetValue("log_instant_messages").asBoolean()); |
204 | gSavedPerAccountSettings.setBOOL("LogChat",childGetValue("log_chat").asBoolean()); | 204 | gSavedPerAccountSettings.setBOOL("LogChat",childGetValue("log_chat").asBoolean()); |
205 | gSavedPerAccountSettings.setBOOL("LogShowHistory",childGetValue("log_show_history").asBoolean()); | 205 | gSavedPerAccountSettings.setBOOL("LogShowHistory",childGetValue("log_show_history").asBoolean()); |
@@ -210,9 +210,9 @@ void LLPrefsIMImpl::apply() | |||
210 | 210 | ||
211 | gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); | 211 | gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); |
212 | 212 | ||
213 | gDirUtilp->setPerAccountChatLogsDir(gSavedSettings.getString("FirstName").c_str(), | 213 | gDirUtilp->setPerAccountChatLogsDir(gSavedSettings.getString("FirstName"), |
214 | gSavedSettings.getString("LastName").c_str() ); | 214 | gSavedSettings.getString("LastName") ); |
215 | LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir().c_str()); | 215 | LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); |
216 | 216 | ||
217 | bool new_im_via_email = childGetValue("send_im_to_email").asBoolean(); | 217 | bool new_im_via_email = childGetValue("send_im_to_email").asBoolean(); |
218 | bool new_hide_online = childGetValue("online_visibility").asBoolean(); | 218 | bool new_hide_online = childGetValue("online_visibility").asBoolean(); |
@@ -281,8 +281,8 @@ void LLPrefsIMImpl::setPersonalInfo( | |||
281 | 281 | ||
282 | //RN: get wide string so replace char can work (requires fixed-width encoding) | 282 | //RN: get wide string so replace char can work (requires fixed-width encoding) |
283 | LLWString busy_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("BusyModeResponse") ); | 283 | LLWString busy_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("BusyModeResponse") ); |
284 | LLWString::replaceChar(busy_response, '^', '\n'); | 284 | LLWStringUtil::replaceChar(busy_response, '^', '\n'); |
285 | LLWString::replaceChar(busy_response, '%', ' '); | 285 | LLWStringUtil::replaceChar(busy_response, '%', ' '); |
286 | childSetText("busy_response", wstring_to_utf8str(busy_response)); | 286 | childSetText("busy_response", wstring_to_utf8str(busy_response)); |
287 | 287 | ||
288 | enableHistory(); | 288 | enableHistory(); |
@@ -305,7 +305,7 @@ void LLPrefsIMImpl::onClickLogPath(void* user_data) | |||
305 | { | 305 | { |
306 | LLPrefsIMImpl* self=(LLPrefsIMImpl*)user_data; | 306 | LLPrefsIMImpl* self=(LLPrefsIMImpl*)user_data; |
307 | 307 | ||
308 | LLString proposed_name(self->childGetText("log_path_string")); | 308 | std::string proposed_name(self->childGetText("log_path_string")); |
309 | 309 | ||
310 | LLDirPicker& picker = LLDirPicker::instance(); | 310 | LLDirPicker& picker = LLDirPicker::instance(); |
311 | if (! picker.getDir(&proposed_name ) ) | 311 | if (! picker.getDir(&proposed_name ) ) |
@@ -346,15 +346,9 @@ void LLPrefsIM::cancel() | |||
346 | impl.cancel(); | 346 | impl.cancel(); |
347 | } | 347 | } |
348 | 348 | ||
349 | void LLPrefsIM::setPersonalInfo( | 349 | void LLPrefsIM::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) |
350 | const char* visibility, | ||
351 | bool im_via_email, | ||
352 | const char* email) | ||
353 | { | 350 | { |
354 | impl.setPersonalInfo( | 351 | impl.setPersonalInfo(visibility, im_via_email, email); |
355 | ll_safe_string(visibility), | ||
356 | im_via_email, | ||
357 | ll_safe_string(email)); | ||
358 | } | 352 | } |
359 | 353 | ||
360 | LLPanel* LLPrefsIM::getPanel() | 354 | LLPanel* LLPrefsIM::getPanel() |