diff options
Diffstat (limited to 'linden/indra')
-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 |
4 files changed, 29 insertions, 10 deletions
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 946b289..7761605 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; |
@@ -7148,6 +7151,15 @@ void LLVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name | |||
7148 | } | 7151 | } |
7149 | } | 7152 | } |
7150 | 7153 | ||
7154 | //static | ||
7155 | bool LLVoiceClient::needsVivoxLicense() | ||
7156 | { | ||
7157 | // assumes we're always using slvoice.exe on Second Life | ||
7158 | bool needs_license = !gSavedSettings.getBOOL("VivoxLicenseAccepted") && | ||
7159 | gHippoGridManager->getCurrentGrid()->isSecondLife(); | ||
7160 | return needs_license; | ||
7161 | } | ||
7162 | |||
7151 | class LLViewerParcelVoiceInfo : public LLHTTPNode | 7163 | class LLViewerParcelVoiceInfo : public LLHTTPNode |
7152 | { | 7164 | { |
7153 | virtual void post( | 7165 | 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); |