summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-09-24 20:15:50 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-09-25 09:38:54 +0300
commitcd8b0a4fc9062e2ea03c41c7c83dbbfde0755d8c (patch)
tree0f01f220e64d12cdcf76908a00dd0c21bc2d69c0
parenta2e9a0caf32003253766efe528329fdd11f28b0b (diff)
Revert "viewer#2413 Remove obsolete alert about expiring voice morphs"
This reverts commit 5c16ae13758bdfe8fe1f13d5f67eabbb6eaa30a1. Fix is correct, but should wait untill server sided fix gets deployed.
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llvoicevivox.cpp34
-rw-r--r--indra/newview/llvoicevivox.h1
-rw-r--r--indra/newview/skins/default/xui/da/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/de/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml15
-rw-r--r--indra/newview/skins/default/xui/es/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/it/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/notifications.xml11
-rw-r--r--indra/newview/skins/default/xui/pl/notifications.xml5
-rw-r--r--indra/newview/skins/default/xui/pt/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/ru/notifications.xml6
-rw-r--r--indra/newview/skins/default/xui/tr/notifications.xml6
-rw-r--r--indra/newview/skins/default/xui/zh/notifications.xml6
15 files changed, 119 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 82eb98b06b..3163f5a849 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13202,6 +13202,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>VoiceEffectExpiryWarningTime</key>
+ <map>
+ <key>Comment</key>
+ <string>How much notice to give of Voice Morph subscriptions expiry, in seconds.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>259200</integer>
+ </map>
<key>VoiceMorphingEnabled</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 1e934ade59..e25f914c47 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6458,6 +6458,7 @@ LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) :
mIsNew(false)
{
mExpiryTimer.stop();
+ mExpiryWarningTimer.stop();
}
LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry()
@@ -6568,6 +6569,20 @@ void LLVivoxVoiceClient::addVoiceFont(const S32 font_index,
font->mExpiryTimer.start();
font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL);
+ // Set the warning timer to some interval before actual expiry.
+ S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime");
+ if (warning_time != 0)
+ {
+ font->mExpiryWarningTimer.start();
+ F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time);
+ font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL);
+ }
+ else
+ {
+ // Disable the warning timer.
+ font->mExpiryWarningTimer.stop();
+ }
+
// Only flag new session fonts after the first time we have fetched the list.
if (mVoiceFontsReceived)
{
@@ -6609,6 +6624,7 @@ void LLVivoxVoiceClient::expireVoiceFonts()
// than checking each font individually.
bool have_expired = false;
+ bool will_expire = false;
bool expired_in_use = false;
LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault();
@@ -6618,6 +6634,7 @@ void LLVivoxVoiceClient::expireVoiceFonts()
{
voiceFontEntry* voice_font = iter->second;
LLFrameTimer& expiry_timer = voice_font->mExpiryTimer;
+ LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer;
// Check for expired voice fonts
if (expiry_timer.getStarted() && expiry_timer.hasExpired())
@@ -6634,6 +6651,14 @@ void LLVivoxVoiceClient::expireVoiceFonts()
deleteVoiceFont(voice_font->mID);
have_expired = true;
}
+
+ // Check for voice fonts that will expire in less that the warning time
+ if (warning_timer.getStarted() && warning_timer.hasExpired())
+ {
+ LL_DEBUGS("VoiceFont") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL;
+ will_expire = true;
+ warning_timer.stop();
+ }
}
LLSD args;
@@ -6655,6 +6680,15 @@ void LLVivoxVoiceClient::expireVoiceFonts()
// Refresh voice font lists in the UI.
notifyVoiceFontObservers();
}
+
+ // Give a warning notification if any voice fonts are due to expire.
+ if (will_expire)
+ {
+ S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime"));
+ args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value());
+
+ LLNotificationsUtil::add("VoiceEffectsWillExpire", args);
+ }
}
void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id)
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 3167705528..7862e492b2 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -880,6 +880,7 @@ private:
bool mIsNew;
LLFrameTimer mExpiryTimer;
+ LLFrameTimer mExpiryWarningTimer;
};
bool mVoiceFontsReceived;
diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml
index 4a4b7269dc..283a7b2a43 100644
--- a/indra/newview/skins/default/xui/da/notifications.xml
+++ b/indra/newview/skins/default/xui/da/notifications.xml
@@ -1574,6 +1574,10 @@ Klik på Acceptér for at deltage eller Afvis for at afvise invitationen. Klik p
Den aktive stemme &quot;morph&quot; er udløbet og din normale stemme opsætning er genaktiveret.
[[URL] Click here] for at forny dit abbonnement.
</notification>
+ <notification name="VoiceEffectsWillExpire">
+ En eller flere af dine stemme &quot;morphs&quot; vil udløbe om mindre end [INTERVAL] dage.
+[[URL] Click here] for at forny dit abbonnement.
+ </notification>
<notification name="VoiceEffectsNew">
Nye stemme &quot;morphs&quot; er tilgængelige!
</notification>
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index 76bebedeec..6ad71e0ad1 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -2466,6 +2466,10 @@ Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice
[[URL] Klicken Sie hier], um Ihr Abo zu erneuern.
Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice-Morphing-Vorteil zu nutzen.</notification>
+ <notification name="VoiceEffectsWillExpire">Ein oder mehrere Ihrer Voice-Morph-Abos laufen in weniger als [INTERVAL] Tagen ab.
+[[URL] Klicken Sie hier], um Ihr Abo zu erneuern.
+
+Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice-Morphing-Vorteil zu nutzen.</notification>
<notification name="VoiceEffectsNew">Neue Voice-Morph-Effekte sind erhältlich!</notification>
<notification name="Cannot enter parcel: not a group member">Nur Mitglieder einer bestimmten Gruppe dürfen diesen Bereich betreten.</notification>
<notification name="Cannot enter parcel: banned">Zugang zur Parzelle verweigert. Sie wurden verbannt.</notification>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 848d9aca7c..5ce73b2cfa 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -8860,6 +8860,21 @@ If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice mo
<notification
icon="notify.tga"
+ name="VoiceEffectsWillExpire"
+ sound="UISndAlert"
+ persist="true"
+ type="notify">
+ <unique/>
+One or more of your Voice Morphs will expire in less than [INTERVAL] days.
+[[URL] Click here] to renew your subscription.
+
+If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice morphing perk.
+ <tag>fail</tag>
+ <tag>voice</tag>
+ </notification>
+
+ <notification
+ icon="notify.tga"
name="VoiceEffectsNew"
sound="UISndAlert"
persist="true"
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index bf55e2c443..739391b965 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -2452,6 +2452,10 @@ Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio
[[URL] Pulsa aquí] para renovar la suscripción.
Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio de transformación de voz.</notification>
+ <notification name="VoiceEffectsWillExpire">Una o más de tus transformaciones de voz caducarán en menos de [INTERVAL] días.
+[[URL] Pulsa aquí] para renovar la suscripción
+
+Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio de transformación de voz.</notification>
<notification name="VoiceEffectsNew">Están disponibles nuevas transformaciones de voz.</notification>
<notification name="Cannot enter parcel: not a group member">Sólo los miembros de un grupo determinado pueden visitar esta zona.</notification>
<notification name="Cannot enter parcel: banned">No puedes entrar en esta parcela, se te ha prohibido el acceso.</notification>
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 17cf18633f..587c88faad 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -2451,6 +2451,10 @@ Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votr
[[URL] Cliquez ici] pour renouveler votre abonnement.
Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votre effet de voix.</notification>
+ <notification name="VoiceEffectsWillExpire">Au moins l'un de vos effets de voix expirera dans moins de [INTERVAL] jours.
+[[URL] Cliquez ici] pour renouveler votre abonnement.
+
+Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votre effet de voix.</notification>
<notification name="VoiceEffectsNew">De nouveaux effets de voix sont disponibles !</notification>
<notification name="Cannot enter parcel: not a group member">Seuls les membres d'un certain groupe peuvent visiter cette zone.</notification>
<notification name="Cannot enter parcel: banned">Vous ne pouvez pas pénétrer sur ce terrain car l'accès vous y est interdit.</notification>
diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml
index 1c40e7304a..f79cc1515b 100644
--- a/indra/newview/skins/default/xui/it/notifications.xml
+++ b/indra/newview/skins/default/xui/it/notifications.xml
@@ -2454,6 +2454,10 @@ Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la
[[URL] Fai clic qui] per rinnovare l'abbonamento.
Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la manipolazione vocale.</notification>
+ <notification name="VoiceEffectsWillExpire">Almeno una delle tue manipolazioni vocali scadrà tra meno di [INTERVAL] giorni.
+[[URL] Fai clic qui] per rinnovare l'abbonamento.
+
+Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la manipolazione vocale.</notification>
<notification name="VoiceEffectsNew">Sono disponibili nuove manipolazioni vocali.</notification>
<notification name="Cannot enter parcel: not a group member">Soltanto i membri di un determinato gruppo possono visitare questa zona.</notification>
<notification name="Cannot enter parcel: banned">Non puoi entrare nel terreno, sei stato bloccato.</notification>
diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml
index fbd56e118c..123e95df04 100644
--- a/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/indra/newview/skins/default/xui/ja/notifications.xml
@@ -4663,6 +4663,17 @@ Webページにリンクすると、他人がこの場所に簡単にアクセ
voice
</tag>
</notification>
+ <notification name="VoiceEffectsWillExpire">ボイスモーフィング効果の1つ、または複数の有効期限が[INTERVAL]日以内に終了します。
+期限を延長・更新するには[[URL] ここ]をクリックしてください。
+
+プレミアム会員の方は、[[PREMIUM_URL] ここ]をクリックしてボイスモーフィング特典をお受け取りください。
+ <tag>
+ fail
+ </tag>
+ <tag>
+ voice
+ </tag>
+ </notification>
<notification name="VoiceEffectsNew">新しいボイスモーフィング効果が登場!
<tag>
voice
diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml
index 17c11bc75f..e668c6cc20 100644
--- a/indra/newview/skins/default/xui/pl/notifications.xml
+++ b/indra/newview/skins/default/xui/pl/notifications.xml
@@ -3118,6 +3118,11 @@ Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrz
[[URL] Kliknij tutaj] aby odnowić subskrypcję.
Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrzymać swój perk Przekształceń Głosu.
</notification>
+ <notification name="VoiceEffectsWillExpire">
+ Jedno lub więcej z Twoich Przekształceń Głosu wygaśnie za mniej niż [INTERVAL] dni.
+[[URL] Kliknij tutaj] aby odnowić subskrypcję.
+Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrzymać swój perk Przekształceń Głosu.
+ </notification>
<notification name="VoiceEffectsNew">
Nowe Przekształcenia Głosu są dostępne!
</notification>
diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml
index 0390239669..a3220bca54 100644
--- a/indra/newview/skins/default/xui/pt/notifications.xml
+++ b/indra/newview/skins/default/xui/pt/notifications.xml
@@ -2441,6 +2441,10 @@ Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu ap
[[URL] Clique aqui] para renovar o serviço.
Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu app de distorção de voz.</notification>
+ <notification name="VoiceEffectsWillExpire">Uma ou mais das suas distorções de voz tem vencimento em menos de [INTERVAL] dias.
+[[URL] Clique aqui] para renovar o serviço.
+
+Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu app de distorção de voz.</notification>
<notification name="VoiceEffectsNew">Novas Distorções de voz!</notification>
<notification name="Cannot enter parcel: not a group member">Só membros de um grupo podem acessar esta área.</notification>
<notification name="Cannot enter parcel: banned">Você não pode entrar nessa terra, você foi banido.</notification>
diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml
index bde18edc23..e75fd1fd82 100644
--- a/indra/newview/skins/default/xui/ru/notifications.xml
+++ b/indra/newview/skins/default/xui/ru/notifications.xml
@@ -3232,6 +3232,12 @@
Если вы - владелец премиум-аккаунта, [[PREMIUM_URL] щелкните здесь], чтобы получить право на анимационное изменение голоса.
</notification>
+ <notification name="VoiceEffectsWillExpire">
+ Срок действия одного или нескольких ваших типов анимационного изменения голоса истекает через [INTERVAL] дней или раньше.
+[[URL] Щелкните здесь], чтобы обновить подписку.
+
+Если вы - владелец премиум-аккаунта, [[PREMIUM_URL] щелкните здесь], чтобы получить право на анимационное изменение голоса.
+ </notification>
<notification name="VoiceEffectsNew">
Появились новые типы изменения голоса!
</notification>
diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml
index 30aa0c0342..17d2969d19 100644
--- a/indra/newview/skins/default/xui/tr/notifications.xml
+++ b/indra/newview/skins/default/xui/tr/notifications.xml
@@ -3232,6 +3232,12 @@ Aboneliğinizi yenilemek için [[URL] buraya tıklayın].
Özel Üye iseniz, ses dönüştürme özelliğini almak için [[PREMIUM_URL] buraya tıklayın].
</notification>
+ <notification name="VoiceEffectsWillExpire">
+ Ses Dönüşümlerinizden birinin ya da daha fazlasının süresi [INTERVAL] günden daha az bir zamanda dolacak.
+Aboneliğinizi yenilemek için [[URL] buraya tıklayın].
+
+Özel Üye iseniz, ses dönüştürme özelliğini almak için [[PREMIUM_URL] buraya tıklayın].
+ </notification>
<notification name="VoiceEffectsNew">
Yeni Ses Şekilleri kullanılabilir!
</notification>
diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml
index 3ebea7dc27..4d0f1cb85b 100644
--- a/indra/newview/skins/default/xui/zh/notifications.xml
+++ b/indra/newview/skins/default/xui/zh/notifications.xml
@@ -3216,6 +3216,12 @@ SHA1 指紋:[MD5_DIGEST]
付費用戶請[[PREMIUM_URL] 點按這裡]領取免費變聲工具。
</notification>
+ <notification name="VoiceEffectsWillExpire">
+ 至少一個你訂用的變聲效果將在 [INTERVAL] 天後到期。
+[[URL] 點按這裡]繼續訂用。
+
+付費用戶請[[PREMIUM_URL] 點按這裡]領取免費變聲工具。
+ </notification>
<notification name="VoiceEffectsNew">
新的變聲效果上市了!
</notification>