diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/lib/python/indra/util/fastest_elementtree.py | 1 | ||||
-rw-r--r-- | linden/indra/llcommon/llsdserialize_xml.cpp | 39 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/logcontrol.xml | 2 | ||||
-rw-r--r-- | linden/indra/newview/floatervoicelicense.cpp | 12 | ||||
-rw-r--r-- | linden/indra/newview/llprefsvoice.cpp | 3 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 23 | ||||
-rw-r--r-- | linden/indra/newview/llvoiceclient.cpp | 12 | ||||
-rw-r--r-- | linden/indra/newview/llvoiceclient.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_voice_license.xml | 14 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_login.xml | 2 |
10 files changed, 73 insertions, 36 deletions
diff --git a/linden/indra/lib/python/indra/util/fastest_elementtree.py b/linden/indra/lib/python/indra/util/fastest_elementtree.py index 3e2189c..0e92545 100644 --- a/linden/indra/lib/python/indra/util/fastest_elementtree.py +++ b/linden/indra/lib/python/indra/util/fastest_elementtree.py | |||
@@ -43,6 +43,7 @@ try: | |||
43 | if not use_celementree: | 43 | if not use_celementree: |
44 | raise ImportError() | 44 | raise ImportError() |
45 | # Python 2.3 and 2.4. | 45 | # Python 2.3 and 2.4. |
46 | from cElementTree import fromstring # this isn't in old versions of cElementTree | ||
46 | from cElementTree import * | 47 | from cElementTree import * |
47 | ElementTreeError = SyntaxError | 48 | ElementTreeError = SyntaxError |
48 | except ImportError: | 49 | except ImportError: |
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/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index def847b..f3715c4 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/floatervoicelicense.cpp b/linden/indra/newview/floatervoicelicense.cpp index c780ff3..b7814e7 100644 --- a/linden/indra/newview/floatervoicelicense.cpp +++ b/linden/indra/newview/floatervoicelicense.cpp | |||
@@ -114,10 +114,6 @@ BOOL FloaterVoiceLicense::postBuild() | |||
114 | childSetAction("Cancel", onCancel, this); | 114 | childSetAction("Cancel", onCancel, this); |
115 | childSetCommitCallback("agree_chk", updateAgree, this); | 115 | childSetCommitCallback("agree_chk", updateAgree, this); |
116 | 116 | ||
117 | // disable Agree to License radio button until the page has fully loaded | ||
118 | LLCheckBoxCtrl* license_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | ||
119 | license_agreement->setEnabled( false ); | ||
120 | |||
121 | // hide the SL text widget if we're displaying license with using a browser widget. | 117 | // hide the SL text widget if we're displaying license with using a browser widget. |
122 | LLTextEditor *editor = getChild<LLTextEditor>("license_text"); | 118 | LLTextEditor *editor = getChild<LLTextEditor>("license_text"); |
123 | editor->setVisible( FALSE ); | 119 | editor->setVisible( FALSE ); |
@@ -159,8 +155,7 @@ void FloaterVoiceLicense::setSiteIsAlive( bool alive ) | |||
159 | { | 155 | { |
160 | // normally this is set when navigation to license page completes (so you can't accept before it loads) | 156 | // normally this is set when navigation to license page completes (so you can't accept before it loads) |
161 | // but if the page is unavailable, we need to do this now | 157 | // but if the page is unavailable, we need to do this now |
162 | LLCheckBoxCtrl* license_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | 158 | // We used to enable "agree_chk" checkbox here too -- MC |
163 | license_agreement->setEnabled( true ); | ||
164 | } | 159 | } |
165 | } | 160 | } |
166 | 161 | ||
@@ -234,9 +229,8 @@ void FloaterVoiceLicense::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaE | |||
234 | if ( ++mLoadCompleteCount == 2 ) | 229 | if ( ++mLoadCompleteCount == 2 ) |
235 | { | 230 | { |
236 | llinfos << "NAVIGATE COMPLETE" << llendl; | 231 | llinfos << "NAVIGATE COMPLETE" << llendl; |
237 | // enable Agree to License radio button now that page has loaded | 232 | // We used to enable Agree to License radio button now that page has loaded here |
238 | LLCheckBoxCtrl * license_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | 233 | // but this is event is horribly broken -- MC |
239 | license_agreement->setEnabled( true ); | ||
240 | } | 234 | } |
241 | } | 235 | } |
242 | } | 236 | } |
diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index 0e8e816..cb52ee0 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "llkeyboard.h" | 42 | #include "llkeyboard.h" |
43 | #include "llmodaldialog.h" | 43 | #include "llmodaldialog.h" |
44 | #include "llviewercontrol.h" | 44 | #include "llviewercontrol.h" |
45 | #include "llvoiceclient.h" | ||
45 | #include "lluictrlfactory.h" | 46 | #include "lluictrlfactory.h" |
46 | 47 | ||
47 | 48 | ||
@@ -150,7 +151,7 @@ void LLPrefsVoice::apply() | |||
150 | } | 151 | } |
151 | 152 | ||
152 | bool enable_voice = childGetValue("enable_voice_check"); | 153 | bool enable_voice = childGetValue("enable_voice_check"); |
153 | if (enable_voice && !gSavedSettings.getBOOL("VivoxLicenseAccepted")) | 154 | if (enable_voice && LLVoiceClient::needsVivoxLicense()) |
154 | { | 155 | { |
155 | // This window enables voice chat if license is accepted | 156 | // This window enables voice chat if license is accepted |
156 | FloaterVoiceLicense::getInstance()->open(); | 157 | FloaterVoiceLicense::getInstance()->open(); |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 08e12ce..922de18 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -1161,19 +1161,24 @@ bool idle_startup() | |||
1161 | // color init must be after saved settings loaded | 1161 | // color init must be after saved settings loaded |
1162 | init_colors(); | 1162 | init_colors(); |
1163 | 1163 | ||
1164 | if (!gSavedSettings.getBOOL("EnableVoiceChat") || | 1164 | // skipping over STATE_LOGIN_VOICE_LICENSE since we don't need it |
1165 | (gSavedSettings.getBOOL("EnableVoiceChat") && gSavedSettings.getBOOL("VivoxLicenseAccepted")) || | 1165 | // skipping over STATE_UPDATE_CHECK because that just waits for input |
1166 | !gHippoGridManager->getConnectedGrid()->isSecondLife()) | 1166 | // We don't do this on non-SL grids either |
1167 | if (LLVoiceClient::needsVivoxLicense()) | ||
1167 | { | 1168 | { |
1168 | // skipping over STATE_LOGIN_VOICE_LICENSE since we don't need it | 1169 | if (gSavedSettings.getBOOL("EnableVoiceChat")) |
1169 | // skipping over STATE_UPDATE_CHECK because that just waits for input | 1170 | { |
1170 | // We don't do this on non-SL grids either | 1171 | LLStartUp::setStartupState(STATE_LOGIN_VOICE_LICENSE); |
1171 | LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); | 1172 | LLFirstUse::voiceLicenseAgreement(); |
1173 | } | ||
1174 | else | ||
1175 | { | ||
1176 | LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT); | ||
1177 | } | ||
1172 | } | 1178 | } |
1173 | else | 1179 | else |
1174 | { | 1180 | { |
1175 | LLStartUp::setStartupState(STATE_LOGIN_VOICE_LICENSE); | 1181 | LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT); |
1176 | LLFirstUse::voiceLicenseAgreement(); | ||
1177 | } | 1182 | } |
1178 | 1183 | ||
1179 | return FALSE; | 1184 | return FALSE; |
diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 3cf15fc..2035b62 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp | |||
@@ -58,11 +58,13 @@ | |||
58 | #include "llimview.h" // for LLIMMgr | 58 | #include "llimview.h" // for LLIMMgr |
59 | #include "llimpanel.h" // for LLVoiceChannel | 59 | #include "llimpanel.h" // for LLVoiceChannel |
60 | #include "llparcel.h" | 60 | #include "llparcel.h" |
61 | #include "llstartup.h" | ||
61 | #include "llviewerparcelmgr.h" | 62 | #include "llviewerparcelmgr.h" |
62 | #include "llfirstuse.h" | 63 | #include "llfirstuse.h" |
63 | #include "llviewerwindow.h" | 64 | #include "llviewerwindow.h" |
64 | #include "llviewercamera.h" | 65 | #include "llviewercamera.h" |
65 | #include "hippolimits.h" | 66 | #include "hippolimits.h" |
67 | #include "hippogridmanager.h" | ||
66 | 68 | ||
67 | #include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel | 69 | #include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel |
68 | #include "llfloaterchat.h" // for LLFloaterChat::addChat() | 70 | #include "llfloaterchat.h" // for LLFloaterChat::addChat() |
@@ -76,6 +78,7 @@ | |||
76 | // for MD5 hash | 78 | // for MD5 hash |
77 | #include "llmd5.h" | 79 | #include "llmd5.h" |
78 | 80 | ||
81 | |||
79 | #define USE_SESSION_GROUPS 0 | 82 | #define USE_SESSION_GROUPS 0 |
80 | 83 | ||
81 | static bool sConnectingToAgni = false; | 84 | static bool sConnectingToAgni = false; |
@@ -7164,6 +7167,15 @@ void LLVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name | |||
7164 | } | 7167 | } |
7165 | } | 7168 | } |
7166 | 7169 | ||
7170 | //static | ||
7171 | bool LLVoiceClient::needsVivoxLicense() | ||
7172 | { | ||
7173 | // assumes we're always using slvoice.exe on Second Life | ||
7174 | bool needs_license = !gSavedSettings.getBOOL("VivoxLicenseAccepted") && | ||
7175 | gHippoGridManager->getCurrentGrid()->isSecondLife(); | ||
7176 | return needs_license; | ||
7177 | } | ||
7178 | |||
7167 | class LLViewerParcelVoiceInfo : public LLHTTPNode | 7179 | class LLViewerParcelVoiceInfo : public LLHTTPNode |
7168 | { | 7180 | { |
7169 | virtual void post( | 7181 | virtual void post( |
diff --git a/linden/indra/newview/llvoiceclient.h b/linden/indra/newview/llvoiceclient.h index f5c6d87..250f4cb 100644 --- a/linden/indra/newview/llvoiceclient.h +++ b/linden/indra/newview/llvoiceclient.h | |||
@@ -87,6 +87,7 @@ class LLVoiceClient: public LLSingleton<LLVoiceClient> | |||
87 | public: | 87 | public: |
88 | static void init(LLPumpIO *pump); // Call this once at application startup (creates connector) | 88 | static void init(LLPumpIO *pump); // Call this once at application startup (creates connector) |
89 | static void terminate(); // Call this to clean up during shutdown | 89 | static void terminate(); // Call this to clean up during shutdown |
90 | static bool needsVivoxLicense(); | ||
90 | 91 | ||
91 | protected: | 92 | protected: |
92 | bool writeString(const std::string &str); | 93 | bool writeString(const std::string &str); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_voice_license.xml b/linden/indra/newview/skins/default/xui/en-us/floater_voice_license.xml index c97c4f7..b691282 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_voice_license.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_voice_license.xml | |||
@@ -1,14 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="false" can_drag_on_left="false" can_minimize="false" | 2 | <floater can_close="false" can_drag_on_left="true" can_minimize="false" |
3 | can_resize="false" height="500" min_height="100" min_width="100" | 3 | can_resize="true" height="500" min_height="300" min_width="400" |
4 | name="modal container" title="" width="600"> | 4 | name="modal container" title="" width="600"> |
5 | <button bottom="-484" enabled="false" font="SansSerif" halign="center" height="20" | 5 | <button bottom="-484" enabled="false" font="SansSerif" halign="center" height="20" |
6 | label="Continue" label_selected="Continue" left="484" mouse_opaque="true" | 6 | label="Continue" label_selected="Continue" right="-16" mouse_opaque="true" |
7 | name="Continue" width="100" /> | 7 | name="Continue" follows="right|bottom" width="100" /> |
8 | <button bottom="-484" font="SansSerif" halign="center" height="20" label="Cancel" | 8 | <button bottom="-484" font="SansSerif" halign="center" height="20" label="Cancel" |
9 | label_selected="Cancel" left="16" mouse_opaque="true" name="Cancel" | 9 | label_selected="Cancel" left="16" mouse_opaque="true" name="Cancel" |
10 | width="100" /> | 10 | follows="left|bottom" width="100" /> |
11 | <check_box bottom="-435" follows="top|right" | 11 | <check_box bottom="-435" follows="bottom|left" |
12 | font="SansSerifSmall" height="16" initial_value="false" label="I Agree to the Terms of the Vivox Acceptable Use Policy" | 12 | font="SansSerifSmall" height="16" initial_value="false" label="I Agree to the Terms of the Vivox Acceptable Use Policy" |
13 | left="16" mouse_opaque="true" name="agree_chk" width="55" /> | 13 | left="16" mouse_opaque="true" name="agree_chk" width="55" /> |
14 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 14 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
@@ -25,7 +25,7 @@ To use Vivox voice chat, you must agree to the terms of the policy. | |||
25 | LICENSE_TEXT | 25 | LICENSE_TEXT |
26 | </text_editor> | 26 | </text_editor> |
27 | <!-- Loading text says: "Loading Vivox Acceptable Use Policy..." URL encoded --> | 27 | <!-- Loading text says: "Loading Vivox Acceptable Use Policy..." URL encoded --> |
28 | <web_browser bottom="-406" embedded_items="false" follows="left|top" font="SansSerif" | 28 | <web_browser bottom="-406" embedded_items="false" follows="left|top|right|bottom" font="SansSerif" |
29 | height="340" left="16" max_length="65536" mouse_opaque="true" | 29 | height="340" left="16" max_length="65536" mouse_opaque="true" |
30 | name="license_html" | 30 | name="license_html" |
31 | start_url="data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//vivox.com/vivox_aup.html%22%3EVivox%20Acceptable%20Use%20Policy%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E" | 31 | start_url="data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//vivox.com/vivox_aup.html%22%3EVivox%20Acceptable%20Use%20Policy%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml index 5e4bd39..05e6b31 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml | |||
@@ -100,7 +100,7 @@ | |||
100 | bottom_delta="-20" left_delta="0" height="20" width="250" | 100 | bottom_delta="-20" left_delta="0" height="20" width="250" |
101 | follows="left|bottom" font="SansSerif" | 101 | follows="left|bottom" font="SansSerif" |
102 | bevel_style="in" border_style="line" border_thickness="1" | 102 | bevel_style="in" border_style="line" border_thickness="1" |
103 | max_length="31" mouse_opaque="true" | 103 | max_length="63" mouse_opaque="true" |
104 | handle_edit_keys_directly="true" | 104 | handle_edit_keys_directly="true" |
105 | select_all_on_focus_received="true" | 105 | select_all_on_focus_received="true" |
106 | allow_translate="false" /> | 106 | allow_translate="false" /> |