summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-04-30 20:24:34 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-04-30 20:24:34 +0300
commit54a80085d75f2e286b29c708ae08d5f1e401ce0d (patch)
tree9e493db890dc19786defd5cc2945eaa45906abb1 /indra
parent0fa5fc47a2069a2c151536baa917b9c6978480e4 (diff)
SL-14769 Add dialog to warn user if inventory is unusable, force logout
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llstartup.cpp18
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml11
2 files changed, 27 insertions, 2 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 0cbce1f6e2..ec3180b85a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -308,6 +308,13 @@ void update_texture_fetch()
gTextureList.updateImages(0.10f);
}
+bool finish_force_quit(const LLSD& notification, const LLSD& response)
+{
+ LLAppViewer::instance()->forceQuit();
+ return false;
+}
+
+
void set_flags_and_update_appearance()
{
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
@@ -1816,7 +1823,11 @@ bool idle_startup()
// a usable state and gInventory.isInventoryUsable() will be
// true.
- // FIXME if inventory is unusable, we need to bail out.
+ // if inventory is unusable, we need to bail out.
+ if (!gInventory.isInventoryUsable())
+ {
+ LLNotificationsUtil::add("InventoryUnusable", LLSD(), LLSD(), &finish_force_quit );
+ }
gInventory.createCommonSystemCategories();
@@ -2155,7 +2166,10 @@ bool idle_startup()
if (gAgent.isOutfitChosen() && (wearables_time > max_wearables_time))
{
- LLNotificationsUtil::add("ClothingLoading");
+ if (gInventory.isInventoryUsable())
+ {
+ LLNotificationsUtil::add("ClothingLoading");
+ }
record(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, wearables_time);
LLStartUp::setStartupState( STATE_CLEANUP );
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a1c73d12d0..a486eb8cf2 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2939,6 +2939,17 @@ Darn. You have been logged out of [SECOND_LIFE].
<notification
icon="alertmodal.tga"
+ name="InventoryUnusable"
+ type="alertmodal">
+There is a problem with your inventory. First, try logging out and logging in again. If you see this message again, contact Support and ask them to correct the problem.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="Log out"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="OnlyOfficerCanBuyLand"
type="alertmodal">
Unable to buy land for the group: