aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewermessage.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 8f3cd96..bd959b9 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -2,6 +2,8 @@
2 * @file llviewermessage.cpp 2 * @file llviewermessage.cpp
3 * @brief Dumping ground for viewer-side message system callbacks. 3 * @brief Dumping ground for viewer-side message system callbacks.
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 7 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -31,8 +34,6 @@
31#include "llviewermessage.h" 34#include "llviewermessage.h"
32 35
33#include <deque> 36#include <deque>
34#include <stdio.h>
35#include <string.h>
36 37
37#include "audioengine.h" 38#include "audioengine.h"
38#include "audiosettings.h" 39#include "audiosettings.h"
@@ -988,7 +989,7 @@ void inventory_offer_callback(S32 button, void* user_data)
988 itemp = (LLViewerInventoryItem*)gInventory.getItem(info->mObjectID); 989 itemp = (LLViewerInventoryItem*)gInventory.getItem(info->mObjectID);
989 } 990 }
990 991
991 // XUI:translate 992 // *TODO:translate
992 LLString from_string; // Used in the pop-up. 993 LLString from_string; // Used in the pop-up.
993 LLString chatHistory_string; // Used in chat history. 994 LLString chatHistory_string; // Used in chat history.
994 if (info->mFromObject == TRUE) 995 if (info->mFromObject == TRUE)
@@ -1104,7 +1105,7 @@ void inventory_offer_callback(S32 button, void* user_data)
1104 // Generates IM_INVENTORY_DECLINED, IM_TASK_INVENTORY_DECLINED, 1105 // Generates IM_INVENTORY_DECLINED, IM_TASK_INVENTORY_DECLINED,
1105 // or IM_GROUP_NOTICE_INVENTORY_DECLINED 1106 // or IM_GROUP_NOTICE_INVENTORY_DECLINED
1106 default: 1107 default:
1107 // close button probably 1108 // close button probably (or any of the fall-throughs from above)
1108 msg->addU8Fast(_PREHASH_Dialog, (U8)(info->mIM + 2)); 1109 msg->addU8Fast(_PREHASH_Dialog, (U8)(info->mIM + 2));
1109 msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE); 1110 msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE);
1110 // send the message 1111 // send the message
@@ -1139,7 +1140,7 @@ void inventory_offer_callback(S32 button, void* user_data)
1139 } 1140 }
1140 1141
1141 } 1142 }
1142 if (busy || (!info->mFromGroup && !info->mFromObject)) 1143 if (busy && (!info->mFromGroup && !info->mFromObject))
1143 { 1144 {
1144 busy_message(msg,info->mFromID); 1145 busy_message(msg,info->mFromID);
1145 } 1146 }
@@ -1224,7 +1225,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1224 } 1225 }
1225 else 1226 else
1226 { 1227 {
1227 // XUI:translate -> [FIRST] [LAST] 1228 // *TODO:translate -> [FIRST] [LAST]
1228 args["[NAME]"] = info->mFromName; 1229 args["[NAME]"] = info->mFromName;
1229 LLNotifyBox::showXml("UserGiveItem", args, 1230 LLNotifyBox::showXml("UserGiveItem", args,
1230 &inventory_offer_callback, (void*)info); 1231 &inventory_offer_callback, (void*)info);
@@ -1328,7 +1329,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1328 S32 binary_bucket_size; 1329 S32 binary_bucket_size;
1329 LLChat chat; 1330 LLChat chat;
1330 1331
1331 //XUI:translate - need to fix the full name to first/last 1332 //*TODO:translate - need to fix the full name to first/last (maybe)
1332 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id); 1333 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id);
1333 msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group); 1334 msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group);
1334 msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ToAgentID, to_id); 1335 msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ToAgentID, to_id);
@@ -1378,7 +1379,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1378 case IM_CONSOLE_AND_CHAT_HISTORY: 1379 case IM_CONSOLE_AND_CHAT_HISTORY:
1379 // These are used for system messages, hence don't need the name, 1380 // These are used for system messages, hence don't need the name,
1380 // as it is always "Second Life". 1381 // as it is always "Second Life".
1381 // XUI:translate 1382 // *TODO:translate
1382 args["[MESSAGE]"] = message; 1383 args["[MESSAGE]"] = message;
1383 1384
1384 // Note: don't put the message in the IM history, even though was sent 1385 // Note: don't put the message in the IM history, even though was sent
@@ -1527,7 +1528,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1527 case IM_MESSAGEBOX: 1528 case IM_MESSAGEBOX:
1528 { 1529 {
1529 // This is a block, modeless dialog. 1530 // This is a block, modeless dialog.
1530 //XUI:translate 1531 //*TODO:translate
1531 args["[MESSAGE]"] = message; 1532 args["[MESSAGE]"] = message;
1532 LLNotifyBox::showXml("SystemMessage", args); 1533 LLNotifyBox::showXml("SystemMessage", args);
1533 } 1534 }
@@ -1844,7 +1845,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1844 } 1845 }
1845 else 1846 else
1846 { 1847 {
1847 // XUI:translate -> [FIRST] [LAST] 1848 // *TODO:translate -> [FIRST] [LAST] (maybe)
1848 LLLureInfo* info = new LLLureInfo(from_id, session_id, FALSE); 1849 LLLureInfo* info = new LLLureInfo(from_id, session_id, FALSE);
1849 args["[NAME]"] = name; 1850 args["[NAME]"] = name;
1850 args["[MESSAGE]"] = message; 1851 args["[MESSAGE]"] = message;
@@ -2171,7 +2172,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2171 if (gMuteListp) 2172 if (gMuteListp)
2172 { 2173 {
2173 is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat) 2174 is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat)
2174 || gMuteListp->isMuted(owner_id); 2175 || gMuteListp->isMuted(owner_id, LLMute::flagTextChat);
2175 is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name); 2176 is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name);
2176 } 2177 }
2177 2178
@@ -4025,7 +4026,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
4025 { 4026 {
4026 // Make the user confirm the transaction, since they might 4027 // Make the user confirm the transaction, since they might
4027 // have missed something during an event. 4028 // have missed something during an event.
4028 // XUI:translate 4029 // *TODO:translate
4029 LLString::format_map_t args; 4030 LLString::format_map_t args;
4030 args["[MESSAGE]"] = desc; 4031 args["[MESSAGE]"] = desc;
4031 LLNotifyBox::showXml("SystemMessage", args); 4032 LLNotifyBox::showXml("SystemMessage", args);
@@ -4081,7 +4082,6 @@ void process_alert_core(const char* buffer, BOOL modal)
4081 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE); 4082 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
4082 } 4083 }
4083 4084
4084 // Translate system messages here.
4085 const char ALERT_PREFIX[] = "ALERT: "; 4085 const char ALERT_PREFIX[] = "ALERT: ";
4086 const size_t ALERT_PREFIX_LEN = sizeof(ALERT_PREFIX) - 1; 4086 const size_t ALERT_PREFIX_LEN = sizeof(ALERT_PREFIX) - 1;
4087 if (!strncmp(buffer, ALERT_PREFIX, ALERT_PREFIX_LEN)) 4087 if (!strncmp(buffer, ALERT_PREFIX, ALERT_PREFIX_LEN))
@@ -4112,21 +4112,21 @@ void process_alert_core(const char* buffer, BOOL modal)
4112 } 4112 }
4113 else 4113 else
4114 { 4114 {
4115 //XUI:translate 4115 // *TODO:translate
4116 args["[MESSAGE]"] = text; 4116 args["[MESSAGE]"] = text;
4117 LLNotifyBox::showXml("SystemMessage", args); 4117 LLNotifyBox::showXml("SystemMessage", args);
4118 } 4118 }
4119 } 4119 }
4120 else if (modal) 4120 else if (modal)
4121 { 4121 {
4122 //XUI:translate 4122 // *TODO:translate
4123 LLString::format_map_t args; 4123 LLString::format_map_t args;
4124 args["[ERROR_MESSAGE]"] = buffer; 4124 args["[ERROR_MESSAGE]"] = buffer;
4125 gViewerWindow->alertXml("ErrorMessage", args); 4125 gViewerWindow->alertXml("ErrorMessage", args);
4126 } 4126 }
4127 else 4127 else
4128 { 4128 {
4129 //XUI:translate 4129 // *TODO:translate
4130 LLString::format_map_t args; 4130 LLString::format_map_t args;
4131 args["[MESSAGE]"] = buffer; 4131 args["[MESSAGE]"] = buffer;
4132 LLNotifyBox::showXml("SystemMessageTip", args); 4132 LLNotifyBox::showXml("SystemMessageTip", args);
@@ -4427,7 +4427,7 @@ void script_question_cb(S32 option, void* user_data)
4427 4427
4428void process_script_question(LLMessageSystem *msg, void **user_data) 4428void process_script_question(LLMessageSystem *msg, void **user_data)
4429{ 4429{
4430 // XUI:translate owner name -> [FIRST] [LAST] 4430 // *TODO:translate owner name -> [FIRST] [LAST]
4431 4431
4432 LLHost sender = msg->getSender(); 4432 LLHost sender = msg->getSender();
4433 4433