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/llfloateravatarpicker.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/llfloateravatarpicker.cpp')
-rw-r--r-- | linden/indra/newview/llfloateravatarpicker.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp index f31626e..da1b9b7 100644 --- a/linden/indra/newview/llfloateravatarpicker.cpp +++ b/linden/indra/newview/llfloateravatarpicker.cpp | |||
@@ -47,7 +47,7 @@ | |||
47 | const S32 MIN_WIDTH = 200; | 47 | const S32 MIN_WIDTH = 200; |
48 | const S32 MIN_HEIGHT = 340; | 48 | const S32 MIN_HEIGHT = 340; |
49 | const LLRect FLOATER_RECT(0, 380, 240, 0); | 49 | const LLRect FLOATER_RECT(0, 380, 240, 0); |
50 | const char FLOATER_TITLE[] = "Choose Resident"; | 50 | const std::string FLOATER_TITLE = "Choose Resident"; |
51 | 51 | ||
52 | // static | 52 | // static |
53 | LLFloaterAvatarPicker* LLFloaterAvatarPicker::sInstance = NULL; | 53 | LLFloaterAvatarPicker* LLFloaterAvatarPicker::sInstance = NULL; |
@@ -83,7 +83,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(callback_t callback, | |||
83 | 83 | ||
84 | // Default constructor | 84 | // Default constructor |
85 | LLFloaterAvatarPicker::LLFloaterAvatarPicker() : | 85 | LLFloaterAvatarPicker::LLFloaterAvatarPicker() : |
86 | LLFloater("avatarpicker", FLOATER_RECT, FLOATER_TITLE, TRUE, MIN_WIDTH, MIN_HEIGHT), | 86 | LLFloater(std::string("avatarpicker"), FLOATER_RECT, FLOATER_TITLE, TRUE, MIN_WIDTH, MIN_HEIGHT), |
87 | mResultsReturned(FALSE), | 87 | mResultsReturned(FALSE), |
88 | mCallback(NULL), | 88 | mCallback(NULL), |
89 | mCallbackUserdata(NULL) | 89 | mCallbackUserdata(NULL) |
@@ -112,7 +112,7 @@ BOOL LLFloaterAvatarPicker::postBuild() | |||
112 | 112 | ||
113 | if (mListNames) | 113 | if (mListNames) |
114 | { | 114 | { |
115 | mListNames->addCommentText("No results"); | 115 | mListNames->addCommentText(std::string("No results")); // *TODO: Translate |
116 | } | 116 | } |
117 | 117 | ||
118 | mInventoryPanel = getChild<LLInventoryPanel>("Inventory Panel"); | 118 | mInventoryPanel = getChild<LLInventoryPanel>("Inventory Panel"); |
@@ -260,7 +260,7 @@ void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem* | |||
260 | 260 | ||
261 | void LLFloaterAvatarPicker::find() | 261 | void LLFloaterAvatarPicker::find() |
262 | { | 262 | { |
263 | const LLString& text = childGetValue("Edit").asString(); | 263 | const std::string& text = childGetValue("Edit").asString(); |
264 | 264 | ||
265 | mQueryID.generate(); | 265 | mQueryID.generate(); |
266 | 266 | ||
@@ -279,7 +279,7 @@ void LLFloaterAvatarPicker::find() | |||
279 | if (mListNames) | 279 | if (mListNames) |
280 | { | 280 | { |
281 | mListNames->deleteAllItems(); | 281 | mListNames->deleteAllItems(); |
282 | mListNames->addCommentText("Searching..."); | 282 | mListNames->addCommentText(std::string("Searching...")); // *TODO: Translate |
283 | } | 283 | } |
284 | 284 | ||
285 | childSetEnabled("Select", FALSE); | 285 | childSetEnabled("Select", FALSE); |
@@ -305,8 +305,8 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* | |||
305 | LLUUID agent_id; | 305 | LLUUID agent_id; |
306 | LLUUID query_id; | 306 | LLUUID query_id; |
307 | LLUUID avatar_id; | 307 | LLUUID avatar_id; |
308 | char first_name[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ | 308 | std::string first_name; |
309 | char last_name[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ | 309 | std::string last_name; |
310 | 310 | ||
311 | msg->getUUID("AgentData", "AgentID", agent_id); | 311 | msg->getUUID("AgentData", "AgentID", agent_id); |
312 | msg->getUUID("AgentData", "QueryID", query_id); | 312 | msg->getUUID("AgentData", "QueryID", query_id); |
@@ -341,20 +341,20 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* | |||
341 | for (S32 i = 0; i < num_new_rows; i++) | 341 | for (S32 i = 0; i < num_new_rows; i++) |
342 | { | 342 | { |
343 | msg->getUUIDFast( _PREHASH_Data,_PREHASH_AvatarID, avatar_id, i); | 343 | msg->getUUIDFast( _PREHASH_Data,_PREHASH_AvatarID, avatar_id, i); |
344 | msg->getStringFast(_PREHASH_Data,_PREHASH_FirstName, DB_FIRST_NAME_BUF_SIZE, first_name, i); | 344 | msg->getStringFast(_PREHASH_Data,_PREHASH_FirstName, first_name, i); |
345 | msg->getStringFast(_PREHASH_Data,_PREHASH_LastName, DB_LAST_NAME_BUF_SIZE, last_name, i); | 345 | msg->getStringFast(_PREHASH_Data,_PREHASH_LastName, last_name, i); |
346 | 346 | ||
347 | LLString avatar_name; | 347 | std::string avatar_name; |
348 | if (avatar_id.isNull()) | 348 | if (avatar_id.isNull()) |
349 | { | 349 | { |
350 | LLString::format_map_t map; | 350 | LLStringUtil::format_map_t map; |
351 | map["[TEXT]"] = self->childGetText("Edit"); | 351 | map["[TEXT]"] = self->childGetText("Edit"); |
352 | avatar_name = self->getString("NotFound", map); | 352 | avatar_name = self->getString("NotFound", map); |
353 | self->mListNames->setEnabled(FALSE); | 353 | self->mListNames->setEnabled(FALSE); |
354 | } | 354 | } |
355 | else | 355 | else |
356 | { | 356 | { |
357 | avatar_name = LLString(first_name) + " " + last_name; | 357 | avatar_name = first_name + " " + last_name; |
358 | self->mListNames->setEnabled(TRUE); | 358 | self->mListNames->setEnabled(TRUE); |
359 | found_one = TRUE; | 359 | found_one = TRUE; |
360 | } | 360 | } |