aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-20 22:10:26 +1000
committerDavid Walter Seikel2012-02-20 22:10:26 +1000
commitca7fd07f6600f73bd2050c1499e379f7d5038fa9 (patch)
tree310d5ab5e3f9d4164b9220a152618bb2ed2162ba
parentSupport the new WindlightReset message from OpenSim for resetting Windlight p... (diff)
parentAdding my linux build scripts. Makes it easy to build under 32 and 64 bit li... (diff)
downloadmeta-impy-ca7fd07f6600f73bd2050c1499e379f7d5038fa9.zip
meta-impy-ca7fd07f6600f73bd2050c1499e379f7d5038fa9.tar.gz
meta-impy-ca7fd07f6600f73bd2050c1499e379f7d5038fa9.tar.bz2
meta-impy-ca7fd07f6600f73bd2050c1499e379f7d5038fa9.tar.xz
Merge branch 'next' of git://github.com/imprudence/imprudence into next
Conflicts: linden/indra/newview/installers/windows/meta-impy_installer_template.iss Branding conflict, fixed. linden/indra/newview/llviewerwindow.cpp Already had this change, but merged the minor difference.
-rw-r--r--linden/indra/llcommon/llsdserialize_xml.cpp39
-rw-r--r--linden/indra/newview/CMakeLists.txt2
-rw-r--r--linden/indra/newview/app_settings/logcontrol.xml2
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/installers/windows/meta-impy_installer_template.iss2
-rw-r--r--linden/indra/newview/llfloaterchat.cpp22
-rw-r--r--linden/indra/newview/llfloaterchat.h2
-rw-r--r--linden/indra/newview/llfloateropenobject.cpp81
-rw-r--r--linden/indra/newview/llfloateropenobject.h15
-rw-r--r--linden/indra/newview/llinventorybridge.cpp18
-rw-r--r--linden/indra/newview/llinventorymodel.cpp125
-rw-r--r--linden/indra/newview/llinventorymodel.h8
-rw-r--r--linden/indra/newview/llprefschat.cpp4
-rw-r--r--linden/indra/newview/llviewercontrol.cpp14
-rwxr-xr-xlinden/indra/newview/llviewermessage.cpp71
-rw-r--r--linden/indra/newview/llviewermessage.h1
-rw-r--r--linden/indra/newview/llviewerregion.cpp1
-rw-r--r--linden/indra/newview/llviewerwindow.cpp6
-rw-r--r--linden/indra/newview/llvoiceclient.cpp12
-rw-r--r--linden/indra/newview/llwldaycycle.cpp6
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml88
-rwxr-xr-xlinden/scripts/install.py3
23 files changed, 276 insertions, 262 deletions
diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp
index dab6c1d..3545309 100644
--- a/linden/indra/llcommon/llsdserialize_xml.cpp
+++ b/linden/indra/llcommon/llsdserialize_xml.cpp
@@ -358,7 +358,9 @@ static unsigned get_till_eol(std::istream& input, char *buf, unsigned bufsize)
358 char c = input.get(); 358 char c = input.get();
359 buf[count++] = c; 359 buf[count++] = c;
360 if (is_eol(c)) 360 if (is_eol(c))
361 {
361 break; 362 break;
363 }
362 } 364 }
363 return count; 365 return count;
364} 366}
@@ -391,14 +393,36 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
391 393
392 if (status == XML_STATUS_ERROR) 394 if (status == XML_STATUS_ERROR)
393 { 395 {
394 std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser ))); 396 std::string error_string(XML_ErrorString(XML_GetErrorCode( mParser )));
395 if ("parsing aborted" != error_string )//end of input 397 if (input.gcount() == 0)
398 {
399 // nothing to do -- MC
400 data = LLSD();
401 return LLSDParser::PARSE_FAILURE;
402 }
403 else if (error_string != "parsing aborted") // end of input
396 { 404 {
397 S32 line_number = XML_GetCurrentLineNumber( mParser ); 405 S32 line_number = XML_GetCurrentLineNumber( mParser );
398 llwarns << "LLXmlTree parse failed. Line " << line_number << ": " 406 // This parses LLCurl::Responder::completedRaw always, even
399 << error_string << llendl; 407 // when not using XML. We have to do this little ugliness
408 // in order to make this error message meaningful.
409 // See Expat's xmlparse.c for the full list of errors -- MC
410 if (error_string == "not well-formed (invalid token)")
411 {
412 std::string text((char*)buffer);
413 if ((text.find('>') != std::string::npos) ||
414 (text.find('<') != std::string::npos))
415 {
416 llwarns << "LLSDXMLParser::Impl::parse error. Line " << line_number << ": "
417 << error_string << llendl;
418 }
419 break;
420 }
421
422 llinfos << "Possible LLSDXMLParser::Impl::parse error. Line " << line_number << ": "
423 << error_string << llendl;
400 } 424 }
401 425 // Always break here -- MC
402 break; 426 break;
403 } 427 }
404 } 428 }
@@ -417,14 +441,13 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
417 ((char*) buffer)[count ? count - 1 : 0] = '\0'; 441 ((char*) buffer)[count ? count - 1 : 0] = '\0';
418 } 442 }
419 443
420
421 data = LLSD(); 444 data = LLSD();
422 return LLSDParser::PARSE_FAILURE; 445 return LLSDParser::PARSE_FAILURE;
423 } 446 }
424 447
425 clear_eol(input); 448 clear_eol(input);
426 data = mResult; 449 data = mResult;
427 return mParseCount; 450 return mParseCount; // why return mParseCount?! -- MC
428} 451}
429 452
430 453
@@ -499,7 +522,7 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data)
499 if ("parsing aborted" != error_string )//end of input 522 if ("parsing aborted" != error_string )//end of input
500 { 523 {
501 S32 line_number = XML_GetCurrentLineNumber( mParser ); 524 S32 line_number = XML_GetCurrentLineNumber( mParser );
502 llwarns << "LLXmlTree parse failed. Line " << line_number << ": " 525 llwarns << "LLSDXMLParser::Impl::parseLines failed. Line " << line_number << ": "
503 << error_string << llendl; 526 << error_string << llendl;
504 } 527 }
505 return LLSDParser::PARSE_FAILURE; 528 return LLSDParser::PARSE_FAILURE;
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 9ccaac8..ecbeb9b 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -1292,7 +1292,7 @@ set_source_files_properties(${viewer_CHARACTER_FILES}
1292list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) 1292list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
1293 1293
1294if (WINDOWS) 1294if (WINDOWS)
1295 file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) 1295 file(GLOB viewer_INSTALLER_FILES installers/windows/*.iss)
1296 1296
1297 source_group("Installer Files" FILES ${viewer_INSTALLER_FILES}) 1297 source_group("Installer Files" FILES ${viewer_INSTALLER_FILES})
1298 1298
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml
index 74a8189..c979d73 100644
--- a/linden/indra/newview/app_settings/logcontrol.xml
+++ b/linden/indra/newview/app_settings/logcontrol.xml
@@ -53,7 +53,7 @@
53 <!--<string>AudioEngine</string>--> 53 <!--<string>AudioEngine</string>-->
54 <!--<string>BodyPhysics</string>--> 54 <!--<string>BodyPhysics</string>-->
55 <!--<string>InitInfo</string>--> 55 <!--<string>InitInfo</string>-->
56 <string>Inventory</string> 56 <!--<string>Inventory</string>-->
57 <!--<string>isOwnedSelf</string>--> 57 <!--<string>isOwnedSelf</string>-->
58 <!--<string>HUDEffect</string>--> 58 <!--<string>HUDEffect</string>-->
59 <!--<string>MarkerFile</string>--> 59 <!--<string>MarkerFile</string>-->
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 0ac7841..e701c3e 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -7926,17 +7926,6 @@
7926 <key>Value</key> 7926 <key>Value</key>
7927 <string>default</string> 7927 <string>default</string>
7928 </map> 7928 </map>
7929 <key>TranslateChat</key>
7930 <map>
7931 <key>Comment</key>
7932 <string>Translate incoming chat messages</string>
7933 <key>Persist</key>
7934 <integer>1</integer>
7935 <key>Type</key>
7936 <string>Boolean</string>
7937 <key>Value</key>
7938 <integer>0</integer>
7939 </map>
7940 <key>LastFeatureVersion</key> 7929 <key>LastFeatureVersion</key>
7941 <map> 7930 <map>
7942 <key>Comment</key> 7931 <key>Comment</key>
diff --git a/linden/indra/newview/installers/windows/meta-impy_installer_template.iss b/linden/indra/newview/installers/windows/meta-impy_installer_template.iss
index 833c2f1..6731402 100644
--- a/linden/indra/newview/installers/windows/meta-impy_installer_template.iss
+++ b/linden/indra/newview/installers/windows/meta-impy_installer_template.iss
@@ -46,7 +46,7 @@ Name: english; MessagesFile: compiler:Default.isl
46 46
47[Tasks] 47[Tasks]
48Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkedonce 48Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkedonce
49Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkedonce 49Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkedonce; OnlyBelowVersion: 0,6.1
50Name: slurlassociate; Description: Associate meta-impy with SLURLs; GroupDescription: Associations:; Languages: ; Flags: checkedonce 50Name: slurlassociate; Description: Associate meta-impy with SLURLs; GroupDescription: Associations:; Languages: ; Flags: checkedonce
51; TODO: use scripting for something like this on uninstall: 51; TODO: use scripting for something like this on uninstall:
52; Name: uninstallsettings; Description: Remove user settings; Flags: checkablealone; Languages: ; GroupDescription: Uninstall: 52; Name: uninstallsettings; Description: Remove user settings; Flags: checkablealone; Languages: ; GroupDescription: Uninstall:
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp
index 681cbb2..f1749ac 100644
--- a/linden/indra/newview/llfloaterchat.cpp
+++ b/linden/indra/newview/llfloaterchat.cpp
@@ -115,8 +115,6 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed)
115 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open); 115 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open);
116 116
117 childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes 117 childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
118 childSetCommitCallback("translate chat",onClickToggleTranslateChat,this);
119 childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat"));
120 childSetVisible("Chat History Editor with mute",FALSE); 118 childSetVisible("Chat History Editor with mute",FALSE);
121 childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); 119 childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
122 setDefaultBtn("Chat"); 120 setDefaultBtn("Chat");
@@ -446,26 +444,6 @@ void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
446 } 444 }
447} 445}
448 446
449// Update the "TranslateChat" pref after "translate chat" checkbox is toggled in
450// the "Local Chat" floater.
451//static
452void LLFloaterChat::onClickToggleTranslateChat(LLUICtrl* caller, void *data)
453{
454 LLFloaterChat* floater = (LLFloaterChat*)data;
455
456 BOOL translate_chat = floater->getChild<LLCheckBoxCtrl>("translate chat")->get();
457 gSavedSettings.setBOOL("TranslateChat", translate_chat);
458}
459
460// Update the "translate chat" checkbox after the "TranslateChat" pref is set in
461// some other place (e.g. prefs dialog).
462//static
463void LLFloaterChat::updateSettings()
464{
465 BOOL translate_chat = gSavedSettings.getBOOL("TranslateChat");
466 LLFloaterChat::getInstance(LLSD())->getChild<LLCheckBoxCtrl>("translate chat")->set(translate_chat);
467}
468
469BOOL checkStringInText(const std::string &text_line, std::string textToMatch) 447BOOL checkStringInText(const std::string &text_line, std::string textToMatch)
470{ 448{
471 boost::smatch what; 449 boost::smatch what;
diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h
index f8683b9..14c2242 100644
--- a/linden/indra/newview/llfloaterchat.h
+++ b/linden/indra/newview/llfloaterchat.h
@@ -66,7 +66,6 @@ public:
66 virtual void onVisibilityChange(BOOL cur_visibility); 66 virtual void onVisibilityChange(BOOL cur_visibility);
67 virtual void setMinimized(BOOL); 67 virtual void setMinimized(BOOL);
68 void updateConsoleVisibility(); 68 void updateConsoleVisibility();
69 void updateSettings();
70 69
71 static void setHistoryCursorAndScrollToEnd(); 70 static void setHistoryCursorAndScrollToEnd();
72 71
@@ -82,7 +81,6 @@ public:
82 81
83 static void onClickMute(void *data); 82 static void onClickMute(void *data);
84 static void onClickToggleShowMute(LLUICtrl* caller, void *data); 83 static void onClickToggleShowMute(LLUICtrl* caller, void *data);
85 static void onClickToggleTranslateChat(LLUICtrl* caller, void *data);
86 static void onClickToggleActiveSpeakers(void* userdata); 84 static void onClickToggleActiveSpeakers(void* userdata);
87 static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata); 85 static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata);
88 static void loadHistory(); 86 static void loadHistory();
diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp
index fc483dd..5f62e87 100644
--- a/linden/indra/newview/llfloateropenobject.cpp
+++ b/linden/indra/newview/llfloateropenobject.cpp
@@ -155,29 +155,76 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
155 { 155 {
156 parent_category_id = gAgent.getInventoryRootID(); 156 parent_category_id = gAgent.getInventoryRootID();
157 } 157 }
158
159 LLCategoryCreate* cat_data = new LLCategoryCreate(object_id, wear);
158 LLUUID category_id = gInventory.createNewCategory(parent_category_id, 160 LLUUID category_id = gInventory.createNewCategory(parent_category_id,
159 LLAssetType::AT_NONE, 161 LLAssetType::AT_NONE,
160 name); 162 name,
161 163 callbackCreateInventoryCategory,
162 LLCatAndWear* data = new LLCatAndWear; 164 (void*)cat_data);
163 data->mCatID = category_id; 165
164 data->mWear = wear;
165
166 // Copy and/or move the items into the newly created folder.
167 // Ignore any "you're going to break this item" messages.
168 BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE,
169 callbackMoveInventory,
170 (void*)data);
171 if (!success)
172 {
173 delete data;
174 data = NULL;
175 166
176 LLNotifications::instance().add("OpenObjectCannotCopy"); 167 // If we get a null category ID, we are using a capability in
168 // createNewCategory and we will handle the following in the
169 // callbackCreateInventoryCategory routine.
170 if (category_id.notNull())
171 {
172 delete cat_data;
173
174 LLCatAndWear* data = new LLCatAndWear;
175 data->mCatID = category_id;
176 data->mWear = wear;
177 data->mFolderResponded = false;
178
179 // Copy and/or move the items into the newly created folder.
180 // Ignore any "you're going to break this item" messages.
181 BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE,
182 callbackMoveInventory,
183 (void*)data);
184 if (!success)
185 {
186 delete data;
187 data = NULL;
188
189 LLNotifications::instance().add("OpenObjectCannotCopy");
190 }
177 } 191 }
178} 192}
179 193
180// static 194// static
195void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data)
196{
197 LLCategoryCreate* cat_data = (LLCategoryCreate*)data;
198 if (result.has("failure") && result["failure"])
199 {
200 delete cat_data;
201 return;
202 }
203
204 LLUUID category_id = result["folder_id"].asUUID();
205 LLCatAndWear* wear_data = new LLCatAndWear;
206
207 wear_data->mCatID = category_id;
208 wear_data->mWear = cat_data->mWear;
209 wear_data->mFolderResponded = true;
210
211 // Copy and/or move the items into the newly created folder.
212 // Ignore any "you're going to break this item" messages.
213
214 BOOL success = move_inv_category_world_to_agent(cat_data->mObjectID, category_id, TRUE,
215 callbackMoveInventory,
216 (void*)wear_data);
217 if (!success)
218 {
219 delete wear_data;
220 wear_data = NULL;
221
222 LLNotifications::instance().add("OpenObjectCannotCopy");
223 }
224 delete cat_data;
225 }
226
227// static
181void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data) 228void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data)
182{ 229{
183 LLCatAndWear* cat = (LLCatAndWear*)data; 230 LLCatAndWear* cat = (LLCatAndWear*)data;
diff --git a/linden/indra/newview/llfloateropenobject.h b/linden/indra/newview/llfloateropenobject.h
index 27653a5..4b89158 100644
--- a/linden/indra/newview/llfloateropenobject.h
+++ b/linden/indra/newview/llfloateropenobject.h
@@ -50,10 +50,24 @@ public:
50 static void show(); 50 static void show();
51 static void dirty(); 51 static void dirty();
52 52
53 class LLCategoryCreate
54 {
55 public:
56 LLCategoryCreate(LLUUID object_id, bool wear)
57 : mObjectID(object_id),
58 mWear(wear)
59 {}
60
61 public:
62 LLUUID mObjectID;
63 bool mWear;
64 };
65
53 struct LLCatAndWear 66 struct LLCatAndWear
54 { 67 {
55 LLUUID mCatID; 68 LLUUID mCatID;
56 bool mWear; 69 bool mWear;
70 bool mFolderResponded;
57 }; 71 };
58 72
59protected: 73protected:
@@ -67,6 +81,7 @@ protected:
67 81
68 static void onClickMoveToInventory(void* data); 82 static void onClickMoveToInventory(void* data);
69 static void onClickMoveAndWear(void* data); 83 static void onClickMoveAndWear(void* data);
84 static void callbackCreateInventoryCategory(const LLSD& result, void* data);
70 static void callbackMoveInventory(S32 result, void* data); 85 static void callbackMoveInventory(S32 result, void* data);
71 static void* createPanelInventory(void* data); 86 static void* createPanelInventory(void* data);
72 87
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index f71df2d..eb2170a 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -1610,18 +1610,21 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
1610class LLInventoryCopyAndWearObserver : public LLInventoryObserver 1610class LLInventoryCopyAndWearObserver : public LLInventoryObserver
1611{ 1611{
1612public: 1612public:
1613 LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count) :mCatID(cat_id), mContentsCount(count), mFolderAdded(FALSE) {} 1613 LLInventoryCopyAndWearObserver(const LLUUID& cat_id,
1614 int count,
1615 bool folder_added = false)
1616 : mCatID(cat_id),
1617 mContentsCount(count),
1618 mFolderAdded(folder_added) {}
1614 virtual ~LLInventoryCopyAndWearObserver() {} 1619 virtual ~LLInventoryCopyAndWearObserver() {}
1615 virtual void changed(U32 mask); 1620 virtual void changed(U32 mask);
1616 1621
1617protected: 1622protected:
1618 LLUUID mCatID; 1623 LLUUID mCatID;
1619 int mContentsCount; 1624 int mContentsCount;
1620 BOOL mFolderAdded; 1625 bool mFolderAdded;
1621}; 1626};
1622 1627
1623
1624
1625void LLInventoryCopyAndWearObserver::changed(U32 mask) 1628void LLInventoryCopyAndWearObserver::changed(U32 mask)
1626{ 1629{
1627 if((mask & (LLInventoryObserver::ADD)) != 0) 1630 if((mask & (LLInventoryObserver::ADD)) != 0)
@@ -2331,13 +2334,16 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
2331 2334
2332 if(option == 0 && object) 2335 if(option == 0 && object)
2333 { 2336 {
2334 if (cat_and_wear && cat_and_wear->mWear) 2337 if (cat_and_wear && cat_and_wear->mWear) // && !cat_and_wear->mFolderResponded)
2335 { 2338 {
2336 InventoryObjectList inventory_objects; 2339 InventoryObjectList inventory_objects;
2337 object->getInventoryContents(inventory_objects); 2340 object->getInventoryContents(inventory_objects);
2338 int contents_count = inventory_objects.size()-1; //subtract one for containing folder 2341 int contents_count = inventory_objects.size()-1; //subtract one for containing folder
2339 2342
2340 LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count); 2343 LLInventoryCopyAndWearObserver* inventoryObserver;
2344 inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID,
2345 contents_count,
2346 cat_and_wear->mFolderResponded);
2341 gInventory.addObserver(inventoryObserver); 2347 gInventory.addObserver(inventoryObserver);
2342 } 2348 }
2343 2349
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp
index 58a2bdc..3f74965 100644
--- a/linden/indra/newview/llinventorymodel.cpp
+++ b/linden/indra/newview/llinventorymodel.cpp
@@ -60,6 +60,7 @@
60#include "llvoavatar.h" 60#include "llvoavatar.h"
61#include "llsdutil.h" 61#include "llsdutil.h"
62#include <deque> 62#include <deque>
63#include "llfloateropenobject.h"
63 64
64// [RLVa:KB] 65// [RLVa:KB]
65#include "rlvhandler.h" 66#include "rlvhandler.h"
@@ -396,25 +397,83 @@ LLUUID LLInventoryModel::findCategoryByName(std::string name)
396 return LLUUID::null; 397 return LLUUID::null;
397} 398}
398 399
400class LLCreateInventoryCategoryResponder : public LLHTTPClient::Responder
401{
402public:
403 LLCreateInventoryCategoryResponder(LLInventoryModel* model,
404 void (*callback)(const LLSD&, void*),
405 void* user_data)
406 : mModel(model),
407 mCallback(callback),
408 mData(user_data)
409 {
410 }
411
412 virtual void error(U32 status, const std::string& reason)
413 {
414 llwarns << "CreateInventoryCategory failed. status = " << status
415 << ", reason = \"" << reason << "\"" << llendl;
416 }
417
418 virtual void result(const LLSD& content)
419 {
420 // Server has created folder.
421
422 LLUUID category_id = content["folder_id"].asUUID();
423
424 // Add the category to the internal representation
425 LLPointer<LLViewerInventoryCategory> cat;
426 cat = new LLViewerInventoryCategory(category_id,
427 content["parent_id"].asUUID(),
428 (LLAssetType::EType)content["type"].asInteger(),
429 content["name"].asString(),
430 gAgent.getID());
431 cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL);
432 cat->setDescendentCount(0);
433 LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1);
434 mModel->accountForUpdate(update);
435 mModel->updateCategory(cat);
436
437 if (mCallback && mData)
438 {
439 mCallback(content, mData);
440 }
441 }
442
443private:
444 void (*mCallback)(const LLSD&, void*);
445 void* mData;
446 LLInventoryModel* mModel;
447};
448
399// Convenience function to create a new category. You could call 449// Convenience function to create a new category. You could call
400// updateCategory() with a newly generated UUID category, but this 450// updateCategory() with a newly generated UUID category, but this
401// version will take care of details like what the name should be 451// version will take care of details like what the name should be
402// based on preferred type. Returns the UUID of the new category. 452// based on preferred type. Returns the UUID of the new category.
403LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, 453LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id,
404 LLAssetType::EType preferred_type, 454 LLAssetType::EType preferred_type, const std::string& pname,
405 const std::string& pname) 455 void (*callback)(const LLSD&, void*),
456 void* user_data)
406{ 457{
458 llassert_always(NULL != callback);
459
407 LLUUID id; 460 LLUUID id;
461
408 if(!isInventoryUsable()) 462 if(!isInventoryUsable())
409 { 463 {
410 llwarns << "Inventory is broken." << llendl; 464 llwarns << "Inventory is broken." << llendl;
411 return id; 465 LLSD result;
412 } 466 result["failure"] = true;
467 callback(result, user_data);
468 }
469
413 470
414 if(preferred_type == LLAssetType::AT_SIMSTATE) 471 if(preferred_type == LLAssetType::AT_SIMSTATE)
415 { 472 {
416 LL_DEBUGS("Inventory") << "Attempt to create simstate category." << LL_ENDL; 473 LL_DEBUGS("Inventory") << "Attempt to create simstate category." << LL_ENDL;
417 return id; 474 LLSD result;
475 result["failure"] = true;
476 callback(result, user_data);
418 } 477 }
419 478
420 id.generate(); 479 id.generate();
@@ -433,6 +492,54 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id,
433 name.assign(NEW_CATEGORY_NAME); 492 name.assign(NEW_CATEGORY_NAME);
434 } 493 }
435 494
495 if (user_data) // callback required for acked message.
496 {
497
498
499 LLViewerRegion* viewer_region = gAgent.getRegion();
500
501 if (!viewer_region->capabilitiesReceived())
502 {
503 LL_DEBUGS("Inventory") << "We didn't get the region caps yet." << LL_ENDL;
504 }
505
506 std::string url;
507 if (viewer_region)
508 {
509 url = viewer_region->getCapability("CreateInventoryCategory");
510 }
511
512 if (!url.empty())
513 {
514 LL_DEBUGS("Inventory") << "Using the CreateInventoryCategory capability." << LL_ENDL;
515 // Let's use the new capability.
516 LLSD request, body;
517 body["folder_id"] = id;
518 body["parent_id"] = parent_id;
519 body["type"] = (LLSD::Integer) preferred_type;
520 body["name"] = name;
521
522 request["message"] = "CreateInventoryCategory";
523 request["payload"] = body;
524
525 LLHTTPClient::post(url, body,
526 new LLCreateInventoryCategoryResponder(this,
527 callback,
528 user_data));
529 return LLUUID::null;
530 }
531 else
532 {
533 LL_DEBUGS("Inventory") << "Cap url empty" << LL_ENDL;
534 }
535 }
536 else //NULL == user_data
537 {
538 // user_data is a LLCategoryCreate object instantiated in the calling
539 // function - bug (or low memory - any leaks?).
540 llwarns << "NULL user_data" << llendl;
541 }
542
436 // Add the category to the internal representation 543 // Add the category to the internal representation
437 LLPointer<LLViewerInventoryCategory> cat = 544 LLPointer<LLViewerInventoryCategory> cat =
438 new LLViewerInventoryCategory(id, parent_id, preferred_type, name, gAgent.getID()); 545 new LLViewerInventoryCategory(id, parent_id, preferred_type, name, gAgent.getID());
@@ -2090,6 +2197,9 @@ bool LLInventoryModel::loadSkeleton(const LLInventoryModel::options_t& options,
2090 2197
2091 if (cit == temp_cats.end()) 2198 if (cit == temp_cats.end())
2092 { 2199 {
2200 llwarns << "Can't load " << inventory_filename
2201 << " because cit == temp_cats.end()"
2202 << llendl;
2093 continue; // cache corruption?? not sure why this happens -SJB 2203 continue; // cache corruption?? not sure why this happens -SJB
2094 } 2204 }
2095 LLViewerInventoryCategory* tcat = *cit; 2205 LLViewerInventoryCategory* tcat = *cit;
@@ -2098,6 +2208,9 @@ bool LLInventoryModel::loadSkeleton(const LLInventoryModel::options_t& options,
2098 // not sent down in the skeleton. 2208 // not sent down in the skeleton.
2099 if (cit == not_cached) 2209 if (cit == not_cached)
2100 { 2210 {
2211 llwarns << "Can't load " << inventory_filename
2212 << " because cit == not_cached"
2213 << llendl;
2101 continue; 2214 continue;
2102 } 2215 }
2103 2216
@@ -3173,7 +3286,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
3173 // << titem->getParentUUID() << llendl; 3286 // << titem->getParentUUID() << llendl;
3174 U32 callback_id; 3287 U32 callback_id;
3175 msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id); 3288 msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id);
3176 if(titem->getUUID().notNull()) 3289 if (titem->getUUID().notNull()) // && callback_id.notNull())
3177 { 3290 {
3178 items.push_back(titem); 3291 items.push_back(titem);
3179 cblist.push_back(InventoryCallbackInfo(callback_id, titem->getUUID())); 3292 cblist.push_back(InventoryCallbackInfo(callback_id, titem->getUUID()));
diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h
index 7222c60..7788c34 100644
--- a/linden/indra/newview/llinventorymodel.h
+++ b/linden/indra/newview/llinventorymodel.h
@@ -308,9 +308,11 @@ public:
308 // based on preferred type. Returns the UUID of the new 308 // based on preferred type. Returns the UUID of the new
309 // category. If you want to use the default name based on type, 309 // category. If you want to use the default name based on type,
310 // pass in a NULL to the 'name parameter. 310 // pass in a NULL to the 'name parameter.
311 LLUUID createNewCategory(const LLUUID& parent_id, 311 LLUUID createNewCategory(const LLUUID& parent_id,
312 LLAssetType::EType preferred_type, 312 LLAssetType::EType preferred_type,
313 const std::string& name); 313 const std::string& name,
314 void (*callback)(const LLSD&, void*) = NULL,
315 void* user_data = NULL);
314 316
315 LLUUID findCategoryByName(std::string name); 317 LLUUID findCategoryByName(std::string name);
316 318
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 1cdab46..dd4df42 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -111,8 +111,6 @@ BOOL LLPrefsChatImpl::postBuild()
111 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect")); 111 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect"));
112 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); 112 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
113 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); 113 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
114 childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage"));
115 childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat"));
116 114
117 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); 115 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect");
118 116
@@ -205,8 +203,6 @@ void LLPrefsChatImpl::apply()
205 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); 203 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal());
206 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); 204 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());
207 205
208 gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox"));
209 gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat"));
210 206
211 bool chan_check = childGetValue("toggle_channel_control"); 207 bool chan_check = childGetValue("toggle_channel_control");
212 gSavedSettings.setBOOL("ChatChannelSelect", chan_check); 208 gSavedSettings.setBOOL("ChatChannelSelect", chan_check);
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index 59d766f..016646e 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -511,19 +511,6 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue)
511 return true; 511 return true;
512} 512}
513 513
514bool handleTranslateChatPrefsChanged(const LLSD& newvalue)
515{
516 LLFloaterChat* floaterp = LLFloaterChat::getInstance();
517
518 if(floaterp)
519 {
520 // update "translate chat" pref in "Local Chat" floater
521 floaterp->updateSettings();
522 }
523 return true;
524}
525
526
527bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue) 514bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue)
528{ 515{
529 LLSlider::setScrollWheelMultiplier( newvalue.asInteger() ); 516 LLSlider::setScrollWheelMultiplier( newvalue.asInteger() );
@@ -675,7 +662,6 @@ void settings_setup_listeners()
675 gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); 662 gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
676 gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); 663 gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
677 gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); 664 gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1));
678 gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1));
679} 665}
680 666
681template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) 667template <> eControlType get_control_type<U32>(const U32& in, LLSD& out)
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 858137a..9a0cf47 100755
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -139,7 +139,6 @@
139#include "llfloaterworldmap.h" 139#include "llfloaterworldmap.h"
140#include "llviewerdisplay.h" 140#include "llviewerdisplay.h"
141#include "llkeythrottle.h" 141#include "llkeythrottle.h"
142#include "lltranslate.h"
143 142
144#include "panelradarentry.h" 143#include "panelradarentry.h"
145 144
@@ -2930,52 +2929,6 @@ void process_decline_callingcard(LLMessageSystem* msg, void**)
2930 LLNotifications::instance().add("CallingCardDeclined"); 2929 LLNotifications::instance().add("CallingCardDeclined");
2931} 2930}
2932 2931
2933class ChatTranslationReceiver : public LLTranslate::TranslationReceiver
2934{
2935public :
2936 ChatTranslationReceiver(const std::string &fromLang, const std::string &toLang, const LLChat &chat,
2937 const std::string &orig_mesg, const BOOL history)
2938 : LLTranslate::TranslationReceiver(fromLang, toLang),
2939 m_chat(chat),
2940 m_origMesg(orig_mesg),
2941 m_history(history)
2942 {
2943 }
2944
2945 static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &fromLang, const std::string &toLang, const LLChat &chat, const std::string &orig_mesg, const BOOL history)
2946 {
2947 return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(fromLang, toLang, chat, orig_mesg, history));
2948 }
2949
2950protected:
2951 void handleResponse(const std::string &translation, const std::string &detected_language)
2952 {
2953 // filter out non-interesting responeses
2954 if ( !translation.empty()
2955 && (m_toLang != detected_language)
2956 && (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) )
2957 {
2958 m_chat.mText += " (" + translation + ")";
2959 }
2960
2961 add_floater_chat(m_chat, m_history);
2962 }
2963
2964 void handleFailure()
2965 {
2966 LLTranslate::TranslationReceiver::handleFailure();
2967
2968 m_chat.mText += " (?)";
2969
2970 add_floater_chat(m_chat, m_history);
2971 }
2972
2973private:
2974 LLChat m_chat;
2975 std::string m_origMesg;
2976 const BOOL m_history;
2977};
2978
2979void add_floater_chat(const LLChat &chat, const BOOL history) 2932void add_floater_chat(const LLChat &chat, const BOOL history)
2980{ 2933{
2981 if (history) 2934 if (history)
@@ -2990,26 +2943,6 @@ void add_floater_chat(const LLChat &chat, const BOOL history)
2990 } 2943 }
2991} 2944}
2992 2945
2993void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history)
2994{
2995 const bool translate = gSavedSettings.getBOOL("TranslateChat");
2996
2997 if (translate && chat.mSourceType != CHAT_SOURCE_SYSTEM)
2998 {
2999 // fromLang hardcoded to "" (autodetection) pending implementation of
3000 // SVC-4879
3001 const std::string &fromLang = "";
3002 const std::string &toLang = LLTranslate::getTranslateLanguage();
3003
3004 LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(fromLang, toLang, chat, mesg, history);
3005 LLTranslate::translateMessage(result, fromLang, toLang, mesg);
3006 }
3007 else
3008 {
3009 add_floater_chat(chat, history);
3010 }
3011}
3012
3013void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) 2946void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3014{ 2947{
3015 LLChat chat; 2948 LLChat chat;
@@ -3429,12 +3362,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3429 && (is_god || !is_busy || is_owned_by_me)) 3362 && (is_god || !is_busy || is_owned_by_me))
3430 { 3363 {
3431 // show on screen and add to history 3364 // show on screen and add to history
3432 check_translate_chat(mesg, chat, FALSE); 3365 add_floater_chat(chat, FALSE);
3433 } 3366 }
3434 else 3367 else
3435 { 3368 {
3436 // just add to chat history 3369 // just add to chat history
3437 check_translate_chat(mesg, chat, TRUE); 3370 add_floater_chat(chat, TRUE);
3438 } 3371 }
3439 } 3372 }
3440} 3373}
diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h
index 11a3554..0201ce4 100644
--- a/linden/indra/newview/llviewermessage.h
+++ b/linden/indra/newview/llviewermessage.h
@@ -76,7 +76,6 @@ void process_script_question(LLMessageSystem *msg, void **user_data);
76void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data); 76void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data);
77 77
78void add_floater_chat(const LLChat &chat, const BOOL history); 78void add_floater_chat(const LLChat &chat, const BOOL history);
79void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history);
80 79
81//void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data); 80//void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data);
82void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE); 81void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE);
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp
index a43e0c0..2fafe30 100644
--- a/linden/indra/newview/llviewerregion.cpp
+++ b/linden/indra/newview/llviewerregion.cpp
@@ -1428,6 +1428,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1428 LLSD capabilityNames = LLSD::emptyArray(); 1428 LLSD capabilityNames = LLSD::emptyArray();
1429 capabilityNames.append("ChatSessionRequest"); 1429 capabilityNames.append("ChatSessionRequest");
1430 capabilityNames.append("CopyInventoryFromNotecard"); 1430 capabilityNames.append("CopyInventoryFromNotecard");
1431 capabilityNames.append("CreateInventoryCategory");
1431 // Aurora settings -- MC 1432 // Aurora settings -- MC
1432 capabilityNames.append("DispatchOpenRegionSettings"); 1433 capabilityNames.append("DispatchOpenRegionSettings");
1433 capabilityNames.append("DispatchRegionInfo"); 1434 capabilityNames.append("DispatchRegionInfo");
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index a49dde6..f9d38b1 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -2920,9 +2920,9 @@ BOOL LLViewerWindow::handlePerFrameHover()
2920 2920
2921 // Always update console 2921 // Always update console
2922 LLRect console_rect = getChatConsoleRect(); 2922 LLRect console_rect = getChatConsoleRect();
2923 // Add a magic number so the pre login console does not cover the login panel. 2923 // Add a magic number so the pre login console does not cover the login panel.
2924 // TODO: Would be nice to only do this for the pre login window. 2924 S32 magic_num = (LLStartUp::isLoggedIn()) ? 20 : 0;
2925 console_rect.mBottom = gHUDView->getRect().mBottom + getChatConsoleBottomPad() + 20; 2925 console_rect.mBottom = gHUDView->getRect().mBottom + getChatConsoleBottomPad() + magic_num;
2926 gConsole->reshape(console_rect.getWidth(), console_rect.getHeight()); 2926 gConsole->reshape(console_rect.getWidth(), console_rect.getHeight());
2927 gConsole->setRect(console_rect); 2927 gConsole->setRect(console_rect);
2928 } 2928 }
diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp
index 4a5fb48..559bc31 100644
--- a/linden/indra/newview/llvoiceclient.cpp
+++ b/linden/indra/newview/llvoiceclient.cpp
@@ -1054,6 +1054,11 @@ void LLVoiceClientCapResponder::result(const LLSD& content)
1054 1054
1055 gVoiceClient->setSpatialChannel(uri, credentials, mResponseID); 1055 gVoiceClient->setSpatialChannel(uri, credentials, mResponseID);
1056 } 1056 }
1057 else
1058 {
1059 llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl;
1060 gVoiceClient->close();
1061 }
1057} 1062}
1058 1063
1059 1064
@@ -1774,11 +1779,13 @@ void LLVoiceClient::close()
1774{ 1779{
1775 LL_DEBUGS("VoiceSession") << "Cancel Session: LLVoiceClient::close() called." 1780 LL_DEBUGS("VoiceSession") << "Cancel Session: LLVoiceClient::close() called."
1776 << llendl; 1781 << llendl;
1782 mAccountActive = false;
1777 setState(stateDisableCleanup); 1783 setState(stateDisableCleanup);
1778} 1784}
1779 1785
1780void LLVoiceClient::start() 1786void LLVoiceClient::start()
1781{ 1787{
1788 mAccountActive = true;
1782 setState(stateStart); 1789 setState(stateStart);
1783} 1790}
1784 1791
@@ -7219,6 +7226,11 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode
7219 gVoiceClient->setPIRCapResponseID(response_id); 7226 gVoiceClient->setPIRCapResponseID(response_id);
7220 gVoiceClient->setSpatialChannel(uri, credentials, response_id); 7227 gVoiceClient->setSpatialChannel(uri, credentials, response_id);
7221 } 7228 }
7229 else
7230 {
7231 llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl;
7232 gVoiceClient->close();
7233 }
7222 } 7234 }
7223 } 7235 }
7224}; 7236};
diff --git a/linden/indra/newview/llwldaycycle.cpp b/linden/indra/newview/llwldaycycle.cpp
index 1d17c60..07ac2a4 100644
--- a/linden/indra/newview/llwldaycycle.cpp
+++ b/linden/indra/newview/llwldaycycle.cpp
@@ -51,9 +51,6 @@ LLWLDayCycle::~LLWLDayCycle()
51 51
52void LLWLDayCycle::loadDayCycle(const std::string & fileName) 52void LLWLDayCycle::loadDayCycle(const std::string & fileName)
53{ 53{
54 // clear the first few things
55 mTimeMap.clear();
56
57 // now load the file 54 // now load the file
58 std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, 55 std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,
59 "windlight/days", fileName)); 56 "windlight/days", fileName));
@@ -62,6 +59,9 @@ void LLWLDayCycle::loadDayCycle(const std::string & fileName)
62 llifstream day_cycle_xml(pathName); 59 llifstream day_cycle_xml(pathName);
63 if (day_cycle_xml.is_open()) 60 if (day_cycle_xml.is_open())
64 { 61 {
62 // clear the first few things
63 mTimeMap.clear();
64
65 // load and parse it 65 // load and parse it
66 LLSD day_data(LLSD::emptyArray()); 66 LLSD day_data(LLSD::emptyArray());
67 LLPointer<LLSDParser> parser = new LLSDXMLParser(); 67 LLPointer<LLSDParser> parser = new LLSDXMLParser();
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
index e83a930..0d80a21 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
@@ -75,12 +75,9 @@
75 Gestures 75 Gestures
76 </combo_item> 76 </combo_item>
77 </combo_box> 77 </combo_box>
78 <check_box bottom_delta="7" enabled="true" follows="left|top" font="SansSerifSmall" 78 <check_box bottom_delta="0" enabled="true" follows="left|top" font="SansSerifSmall"
79 height="20" initial_value="false" label="Show muted text" left_delta="125" 79 height="20" initial_value="false" label="Show muted text" left_delta="125"
80 name="show mutes" radio_style="false" width="116" /> 80 name="show mutes" radio_style="false" width="116" />
81 <check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall"
82 height="20" initial_value="false" label="Translate chat (powered by Google)" left_delta="0"
83 name="translate chat" radio_style="false" width="100" />
84 <button name="toggle_active_speakers_btn" 81 <button name="toggle_active_speakers_btn"
85 label="&lt;&lt;" label_selected="&gt;&gt;" follows="right|top" 82 label="&lt;&lt;" label_selected="&gt;&gt;" follows="right|top"
86 bottom_delta="0" left="262" right="305" height="20" 83 bottom_delta="0" left="262" right="305" height="20"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
index cf947ee..566fdad 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
@@ -192,10 +192,10 @@ USE left="270" FOR TABBING OPTIONS
192 </panel> 192 </panel>
193 193
194 194
195 <!-- SPELL CHECKING AND TRANSLATE PANEL --> 195 <!-- SPELL CHECKING PANEL -->
196 196
197 197
198 <panel border="true" bottom="-580" follows="left|top|right|bottom" height="525" label="Spell Checking &amp; Translate" 198 <panel border="true" bottom="-580" follows="left|top|right|bottom" height="525" label="Spell Checking"
199 left="1" mouse_opaque="true" name="spell_check_tab" width="418"> 199 left="1" mouse_opaque="true" name="spell_check_tab" width="418">
200 200
201 201
@@ -252,89 +252,7 @@ USE left="270" FOR TABBING OPTIONS
252 <button name="ac_button" label="AutoCorrect..." halign="center" 252 <button name="ac_button" label="AutoCorrect..." halign="center"
253 tool_tip="Modify the AutoCorrect word list and settings" left="50" 253 tool_tip="Modify the AutoCorrect word list and settings" left="50"
254 bottom_delta="-40" width="160" height="20" font="SansSerifSmall" follows="left|top"/> 254 bottom_delta="-40" width="160" height="20" font="SansSerifSmall" follows="left|top"/>
255 255
256
257 <view_border bevel_style="none" border_thickness="1" bottom_delta="-15" follows="left|top"
258 height="1" left="55" name="border" width="380" />
259
260
261 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
262 bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" font-style="BOLD|SHADOW"
263 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="20"
264 mouse_opaque="false" name="text_translate" v_pad="0" width="128">
265 Translate Chat:
266 </text>
267 <check_box bottom_delta="-25" control_name="TranslateChat" enabled="true" follows="left|top"
268 font="SansSerifSmall" height="16" initial_value="false"
269 label="Use machine translation while chatting (powered by Google)" left_delta="30" mouse_opaque="true"
270 name="translate_chat" radio_style="false" width="237" />
271
272 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
273 bottom_delta="-16" drop_shadow_visible="true" enabled="true" follows="left|top"
274 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="0"
275 mouse_opaque="false" name="text_translate_chat" v_pad="0" width="160">
276 Translate into this language:
277 </text>
278
279 <combo_box allow_text_entry="false" bottom_delta="-5" enabled="true"
280 follows="left|top" height="16" left="270" max_chars="135"
281 mouse_opaque="true" name="translate_language_combobox" width="160">
282 <combo_item type="string" length="1" enabled="true" name="System Default Language" value="default">
283 System Default
284 </combo_item>
285 <combo_item type="string" length="1" enabled="true" name="English" value="en">
286 English
287 </combo_item>
288
289 <!-- After "System Default" and "English", please keep the rest of these combo_items in alphabetical order by the first character in the string. -->
290
291 <combo_item type="string" length="1" enabled="true" name="Danish" value="da">
292 Dansk (Danish)
293 </combo_item>
294 <combo_item type="string" length="1" enabled="true" name="Deutsch(German)" value="de">
295 Deutsch (German)
296 </combo_item>
297 <combo_item type="string" length="1" enabled="true" name="Spanish" value="es">
298 Español (Spanish)
299 </combo_item>
300 <combo_item type="string" length="1" enabled="true" name="French" value="fr">
301 Français (French)
302 </combo_item>
303 <combo_item type="string" length="1" enabled="true" name="Italian" value="it">
304 Italiano (Italian)
305 </combo_item>
306 <combo_item type="string" length="1" enabled="true" name="Hungarian" value="hu">
307 Magyar (Hungarian)
308 </combo_item>
309 <combo_item type="string" length="1" enabled="true" name="Dutch" value="nl">
310 Nederlands (Dutch)
311 </combo_item>
312 <combo_item type="string" length="1" enabled="true" name="Polish" value="pl">
313 Polski (Polish)
314 </combo_item>
315 <combo_item type="string" length="1" enabled="true" name="Portugese" value="pt">
316 Portugués (Portuguese)
317 </combo_item>
318 <combo_item type="string" length="1" enabled="true" name="Russian" value="ru">
319 Русский (Russian)
320 </combo_item>
321 <combo_item type="string" length="1" enabled="true" name="Turkish" value="tr">
322 Türkçe (Turkish)
323 </combo_item>
324 <combo_item type="string" length="1" enabled="true" name="Ukrainian" value="uk">
325 Українська (Ukrainian)
326 </combo_item>
327 <combo_item type="string" length="1" enabled="true" name="Chinese" value="zh">
328 中文 (简体) (Chinese)
329 </combo_item>
330 <combo_item type="string" length="1" enabled="true" name="(Japanese)" value="ja">
331 日本語 (Japanese)
332 </combo_item>
333 <combo_item type="string" length="1" enabled="true" name="(Korean)" value="ko">
334 한국어 (Korean)
335 </combo_item>
336 </combo_box>
337
338 256
339 <button bottom="-20" follows="left|top" font="SansSerifSmall" height="18" label="?" 257 <button bottom="-20" follows="left|top" font="SansSerifSmall" height="18" label="?"
340 name="EmeraldHelp_SpellCheck" tool_tip="Click here for help regarding the settings in this page." 258 name="EmeraldHelp_SpellCheck" tool_tip="Click here for help regarding the settings in this page."
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index c69644b..a7c0a48 100755
--- a/linden/scripts/install.py
+++ b/linden/scripts/install.py
@@ -36,6 +36,7 @@ $/LicenseInfo$
36import sys 36import sys
37import os.path 37import os.path
38import re 38import re
39import string
39 40
40# Look for indra/lib/python in all possible parent directories ... 41# Look for indra/lib/python in all possible parent directories ...
41# This is an improvement over the setup-path.py method used previously: 42# This is an improvement over the setup-path.py method used previously:
@@ -106,7 +107,7 @@ class InstallFile(object):
106 107
107 def _is_md5sum_match(self): 108 def _is_md5sum_match(self):
108 hasher = md5(file(self.filename, 'rb').read()) 109 hasher = md5(file(self.filename, 'rb').read())
109 if hasher.hexdigest() == self.md5sum: 110 if string.lower(hasher.hexdigest()) == string.lower(self.md5sum):
110 return True 111 return True
111 return False 112 return False
112 113