From 49da5288bd0425241823186bfd56a159fe2f9a60 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 24 Feb 2023 03:05:30 +0200 Subject: SL-19234 add Inventory settings floater --- indra/newview/app_settings/settings.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 411f77e6a7..3a896b4f5f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16898,5 +16898,38 @@ Value 0 + FindOriginalOpenWindow + + Comment + Sets the action for 'Find original' and 'Show in Inventory' (0 - shows item in main Inventory, 1 - opens a new single-folder window) + Persist + 1 + Type + Boolean + Value + 0 + +MultiModeDoubleClickOpenWindow + + Comment + Sets the action for Double-click on folder in multi-folder view (0 - expands and collapses folder, 1 - opens a new window) + Persist + 1 + Type + Boolean + Value + 0 + +SingleModeDoubleClickOpenWindow + + Comment + Sets the action for Double-click on folder in single-folder view (0 - stays in current window, 1 - opens a new window) + Persist + 1 + Type + Boolean + Value + 0 + -- cgit v1.3 From f377e27f0b8ddabf755c6efe71d6bc0e53e751c1 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 27 Feb 2023 20:27:11 +0200 Subject: SL-19274 Add new double-click option to Inventory settings --- indra/llui/llfolderviewitem.cpp | 9 +++++-- indra/llui/llfolderviewmodel.h | 2 +- indra/newview/app_settings/settings.xml | 6 ++--- indra/newview/llconversationmodel.h | 2 +- indra/newview/llinventorybridge.cpp | 24 +++++++++---------- indra/newview/llinventorybridge.h | 2 +- indra/newview/llinventorypanel.cpp | 18 ++++++++++++++ indra/newview/llinventorypanel.h | 2 +- indra/newview/llpanelmaininventory.cpp | 7 ++++-- indra/newview/llpanelmaininventory.h | 2 +- indra/newview/llpanelobjectinventory.cpp | 2 +- .../default/xui/en/floater_inventory_settings.xml | 28 +++++++++++++++------- 12 files changed, 70 insertions(+), 34 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 4a9ac56d9f..6ddbf26639 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -2077,11 +2077,16 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) } if( !handled ) { - static LLUICachedControl double_click_new_window("MultiModeDoubleClickOpenWindow", false); - if (double_click_new_window) + static LLUICachedControl double_click_action("MultiModeDoubleClickFolder", false); + if (double_click_action == 1) { getViewModelItem()->navigateToFolder(true); return TRUE; + } + if (double_click_action == 2) + { + getViewModelItem()->navigateToFolder(false, true); + return TRUE; } if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad) { diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index b1db9489fd..b5a765fab3 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -160,7 +160,7 @@ public: virtual void closeItem( void ) = 0; virtual void selectItem(void) = 0; - virtual void navigateToFolder(bool new_window = false) = 0; + virtual void navigateToFolder(bool new_window = false, bool change_mode = false) = 0; virtual BOOL isItemWearable() const { return FALSE; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3a896b4f5f..23521351ca 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16909,14 +16909,14 @@ Value 0 -MultiModeDoubleClickOpenWindow +MultiModeDoubleClickFolder Comment - Sets the action for Double-click on folder in multi-folder view (0 - expands and collapses folder, 1 - opens a new window) + Sets the action for Double-click on folder in multi-folder view (0 - expands and collapses folder, 1 - opens a new window, 2 – stays in current floater but switches to SFV) Persist 1 Type - Boolean + U32 Value 0 diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index c7da060f33..22d2d60905 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -111,7 +111,7 @@ public: virtual void previewItem( void ); virtual void selectItem(void) { } virtual void showProperties(void); - virtual void navigateToFolder(bool new_window = false) {} + virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} // Methods used in sorting (see LLConversationSort::operator()) EConversationType const getType() const { return mConvType; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f7b7a6635e..5f1db0895c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -413,7 +413,7 @@ void LLInvFVBridge::showProperties() } } -void LLInvFVBridge::navigateToFolder(bool new_window) +void LLInvFVBridge::navigateToFolder(bool new_window, bool change_mode) { if(new_window) { @@ -421,21 +421,21 @@ void LLInvFVBridge::navigateToFolder(bool new_window) } else { - LLInventorySingleFolderPanel* panel = dynamic_cast(mInventoryPanel.get()); - if (!panel) + if(change_mode) { - return; - } - LLInventoryModel* model = getInventoryModel(); - if (!model) - { - return; + LLInventoryPanel::setSFViewAndOpenFolder(mInventoryPanel.get(), mUUID); } - if (mUUID.isNull()) + else { - return; + LLInventorySingleFolderPanel* panel = dynamic_cast(mInventoryPanel.get()); + if (!panel || !getInventoryModel() || mUUID.isNull()) + { + return; + } + + panel->changeFolderRoot(mUUID); } - panel->changeFolderRoot(mUUID); + } } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index b2cc33aadd..958d284854 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -107,7 +107,7 @@ public: virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual void openItem() {} virtual void closeItem() {} - virtual void navigateToFolder(bool new_window = false); + virtual void navigateToFolder(bool new_window = false, bool change_mode = false); virtual void showProperties(); virtual BOOL isItemRenameable() const { return TRUE; } virtual BOOL isMultiPreviewAllowed() { return TRUE; } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 77588c8716..82f791a171 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1831,6 +1831,24 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L } } +void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id) +{ + + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) + { + LLFloaterSidePanelContainer* inventory_floater = dynamic_cast(*iter); + LLSidepanelInventory* sidepanel_inventory = inventory_floater->findChild("main_panel"); + + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + if (main_inventory && panel->hasAncestor(main_inventory) && !main_inventory->isSingleFolderMode()) + { + main_inventory->onViewModeClick(); + main_inventory->setSingleFolderViewRoot(folder_id, false); + } + } +} + void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type) { getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << folder_type)); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index baaefe5dd7..e9eaaa232d 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -246,7 +246,7 @@ public: BOOL main_panel = FALSE, BOOL take_keyboard_focus = TAKE_FOCUS_YES, BOOL reset_filter = FALSE); - + static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id); void addItemID(const LLUUID& id, LLFolderViewItem* itemp); void removeItemID(const LLUUID& id); LLFolderViewItem* getItemByID(const LLUUID& id); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 0fd4eb0c15..5da53cc928 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1321,10 +1321,13 @@ void LLPanelMainInventory::onForwardFolderClicked() mSingleFolderPanelInventory->onForwardFolder(); } -void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id) +void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id, bool clear_nav_history) { mSingleFolderPanelInventory->changeFolderRoot(folder_id); - mSingleFolderPanelInventory->clearNavigationHistory(); + if(clear_nav_history) + { + mSingleFolderPanelInventory->clearNavigationHistory(); + } } void LLPanelMainInventory::showActionMenu(LLMenuGL* menu, std::string spawning_view_name) diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 85373d7de3..6382f44bc9 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -103,7 +103,7 @@ public: void onUpFolderClicked(); void onBackFolderClicked(); void onForwardFolderClicked(); - void setSingleFolderViewRoot(const LLUUID& folder_id); + void setSingleFolderViewRoot(const LLUUID& folder_id, bool clear_nav_history = true); bool isSingleFolderMode() { return mSingleFolderMode; } protected: diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index c22915c3ab..1348996136 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -125,7 +125,7 @@ public: virtual BOOL canOpenItem() const { return FALSE; } virtual void closeItem() {} virtual void selectItem() {} - virtual void navigateToFolder(bool new_window = false) {} + virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} virtual BOOL isItemRenameable() const; virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemMovable() const; diff --git a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml index c3e81a5523..bfac79ac46 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml @@ -4,10 +4,10 @@ can_minimize="true" can_resize="false" save_rect="true" - height="350" + height="370" width="370" name="inventory_settings" - title="Inventory settings"> + title="INVENTORY SETTINGS"> + @@ -92,7 +102,7 @@ layout="topleft" font="SansSerifMedium" left="60" - width="325" + width="300" height="45" name="single_double_click_setting"> Date: Wed, 8 Mar 2023 02:41:11 +0200 Subject: SL-19359 Show Received Items panel in all new Inventory floaters --- indra/llui/lluictrl.cpp | 9 ++++++ indra/llui/lluictrl.h | 1 + indra/newview/app_settings/settings.xml | 11 ------- indra/newview/llsidepanelinventory.cpp | 35 ++++++++++++++-------- .../skins/default/xui/en/sidepanel_inventory.xml | 2 +- 5 files changed, 34 insertions(+), 24 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 2196ba201b..21afcae7c3 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -531,6 +531,15 @@ void LLUICtrl::setControlVariable(LLControlVariable* control) } } +void LLUICtrl::removeControlVariable() +{ + if (mControlVariable) + { + mControlConnection.disconnect(); + mControlVariable = NULL; + } +} + //virtual void LLUICtrl::setControlName(const std::string& control_name, LLView *context) { diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 67dd24341c..be1c7dd0b6 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -175,6 +175,7 @@ public: bool setControlValue(const LLSD& value); void setControlVariable(LLControlVariable* control); virtual void setControlName(const std::string& control, LLView *context = NULL); + void removeControlVariable(); LLControlVariable* getControlVariable() { return mControlVariable; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 23521351ca..87b0ad8faf 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5001,17 +5001,6 @@ Boolean Value 0 - - InventoryInboxToggleState - - Comment - Stores the open/closed state of inventory Received items panel - Persist - 1 - Type - Boolean - Value - 0 InventoryLinking diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 3a0302e531..cfceefed26 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -73,6 +73,8 @@ static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; +static bool sLoginCompleted = false; + // // Helpers // @@ -182,22 +184,30 @@ BOOL LLSidepanelInventory::postBuild() inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); - // Get the previous inbox state from "InventoryInboxToggleState" setting. - bool is_inbox_collapsed = !inbox_button->getToggleState(); + // For main Inventory floater: Get the previous inbox state from "InventoryInboxToggleState" setting. + // For additional Inventory floaters: Collapsed state is default. + bool is_inbox_collapsed = !inbox_button->getToggleState() || sLoginCompleted; // Restore the collapsed inbox panel state mInboxLayoutPanel = getChild(INBOX_LAYOUT_PANEL_NAME); - inv_stack->collapsePanel(mInboxLayoutPanel, is_inbox_collapsed); - if (!is_inbox_collapsed) - { + inv_stack->collapsePanel(mInboxLayoutPanel, is_inbox_collapsed); + if (!is_inbox_collapsed) + { mInboxLayoutPanel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight")); - } - - // Set the inbox visible based on debug settings (final setting comes from http request below) - enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); - - // Trigger callback for after login so we can setup to track inbox changes after initial inventory load - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInbox, this)); + } + + if (sLoginCompleted) + { + //save the state of Inbox panel only for main Inventory floater + inbox_button->removeControlVariable(); + inbox_button->setToggleState(false); + updateInbox(); + } + else + { + // Trigger callback for after login so we can setup to track inbox changes after initial inventory load + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInbox, this)); + } } gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); @@ -207,6 +217,7 @@ BOOL LLSidepanelInventory::postBuild() void LLSidepanelInventory::updateInbox() { + sLoginCompleted = true; // // Track inbox folder changes // diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index a4b7f48c5e..dfd3e3bf9d 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -57,7 +57,7 @@ user_resize="true" follows="left|right|top" name="inbox_layout_panel" - visible="false" + visible="true" min_dim="35" expanded_min_dim="90" height="235"> -- cgit v1.3 From c9d9f1c54e104dd0ac670fbac2f4e9e053eea25c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 24 Mar 2023 18:52:15 +0200 Subject: SL-18003 Make ais fetch faster --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llinventorymodelbackgroundfetch.cpp | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 87b0ad8faf..a2a1b3f117 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15290,7 +15290,7 @@ Type U32 Value - 1 + 20 PoolSizeUpload diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index ea721b3a40..023cc05ee7 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -33,6 +33,7 @@ #include "llcallbacklist.h" #include "llinventorypanel.h" #include "llinventorymodel.h" +#include "llstartup.h" #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewermessage.h" @@ -447,7 +448,8 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() return; } - static const S32 max_concurrent_fetches(50); + static LLCachedControl ais_pool(gSavedSettings, "", 20); + const U32 max_concurrent_fetches = llmax(1, ais_pool - 1); if (mFetchCount >= max_concurrent_fetches) { @@ -456,7 +458,9 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() // Don't loop for too long (in case of large, fully loaded inventory) F64 curent_time = LLTimer::getTotalSeconds(); - const F64 max_time = 0.006f; // 6 ms + const F64 max_time = LLStartUp::getStartupState() > STATE_WEARABLES_WAIT + ? 0.006f // 6 ms + : 1.f; const F64 end_time = curent_time + max_time; while (!mFetchQueue.empty() && mFetchCount < max_concurrent_fetches && curent_time < end_time) @@ -480,8 +484,10 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc const LLUUID & cat_id(fetch_info.mUUID); if (cat_id.isNull()) // Lost and found { - AISAPI::FetchCategoryChildren(LLUUID::null, AISAPI::INVENTORY, false, ais_simple_callback); - mFetchCount++; + LL_WARNS() << "Lost and found not implemented yet" << LL_ENDL; + // todo: needs to be requested from ais in special manner? + /*AISAPI::FetchCategoryChildren(LLUUID::null, AISAPI::INVENTORY, false, ais_simple_callback); + mFetchCount++;*/ } else { -- cgit v1.3 From 03c263a1cdd88ec5967e751cba8640edf9896e51 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 28 Apr 2023 23:37:34 +0300 Subject: SL-19533 Fix 'fetching' state timeout --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llaisapi.cpp | 3 ++- indra/newview/llaisapi.h | 1 + indra/newview/llinventorymodelbackgroundfetch.cpp | 6 ++++-- indra/newview/llviewerinventory.cpp | 11 +++++++++-- 5 files changed, 27 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a2a1b3f117..43d3f63a34 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15283,6 +15283,17 @@ Value 1 + BatchSizeAIS3 + + Comment + Amount of folder ais packs into category subset request + Persist + 1 + Type + S32 + Value + 20 + PoolSizeAIS Comment diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 951860e39d..b09b8ec517 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -46,6 +46,7 @@ //========================================================================= const std::string AISAPI::INVENTORY_CAP_NAME("InventoryAPIv3"); const std::string AISAPI::LIBRARY_CAP_NAME("LibraryAPIv3"); +const S32 AISAPI::HTTP_TIMEOUT = 180; std::list AISAPI::sPostponedQuery; @@ -823,7 +824,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); LLCore::HttpHeaders::ptr_t httpHeaders; - httpOptions->setTimeout(180); + httpOptions->setTimeout(HTTP_TIMEOUT); LL_DEBUGS("Inventory") << "Request url: " << url << LL_ENDL; diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 6270a34081..973c82a847 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -38,6 +38,7 @@ class AISAPI { public: + static const S32 HTTP_TIMEOUT; typedef enum { INVENTORY, LIBRARY diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 5f7950df08..8f1012868f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -729,10 +729,12 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc gInventory.getDirectDescendentsOf(cat_id, categories, items); LLViewerInventoryCategory::EFetchType target_state = LLViewerInventoryCategory::FETCH_RECURSIVE; - // technically limit is 'as many as you can put into url', but for now stop at 10 - const S32 batch_limit = 20; bool content_done = true; + // Top limit is 'as many as you can put into url' + static LLCachedControl ais_batch(gSavedSettings, "BatchSizeAIS3", 20); + S32 batch_limit = llclamp(ais_batch(), 1, 40); + for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); it != categories->end(); ++it) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 96f0b500a0..80e4f5f6d5 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -690,9 +690,16 @@ void LLViewerInventoryCategory::setFetching(LLViewerInventoryCategory::EFetchTyp { if (mDescendentsRequested.hasExpired() || (mFetching == FETCH_NONE)) { - const F32 FETCH_TIMER_EXPIRY = 30.0f; mDescendentsRequested.reset(); - mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY); + if (AISAPI::isAvailable()) + { + mDescendentsRequested.setTimerExpirySec(AISAPI::HTTP_TIMEOUT); + } + else + { + const F32 FETCH_TIMER_EXPIRY = 30.0f; + mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY); + } } mFetching = fetching; } -- cgit v1.3 From f149b87fcc152a7e6232d1a2eb81bb2ac72697da Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 29 Jun 2023 23:53:22 +0300 Subject: SL-19929 New inventory feature notification --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/settings.xml | 11 ++++ indra/newview/llagent.cpp | 33 ++++++++++-- indra/newview/llagent.h | 12 +++-- indra/newview/llfloaternewfeaturenotification.cpp | 63 ++++++++++++++++++++++ indra/newview/llfloaternewfeaturenotification.h | 49 +++++++++++++++++ indra/newview/llsidepanelinventory.cpp | 2 + indra/newview/llstartup.cpp | 4 +- indra/newview/llviewerfloaterreg.cpp | 4 ++ .../xui/en/floater_new_feature_notification.xml | 54 +++++++++++++++++++ 10 files changed, 224 insertions(+), 10 deletions(-) create mode 100644 indra/newview/llfloaternewfeaturenotification.cpp create mode 100644 indra/newview/llfloaternewfeaturenotification.h create mode 100644 indra/newview/skins/default/xui/en/floater_new_feature_notification.xml (limited to 'indra/newview/app_settings') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index eedc24f973..c37d03221c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -246,6 +246,7 @@ set(viewer_SOURCE_FILES llfloatermyscripts.cpp llfloatermyenvironment.cpp llfloaternamedesc.cpp + llfloaternewfeaturenotification.cpp llfloaternotificationsconsole.cpp llfloaternotificationstabbed.cpp llfloaterobjectweights.cpp @@ -894,6 +895,7 @@ set(viewer_HEADER_FILES llfloatermyscripts.h llfloatermyenvironment.h llfloaternamedesc.h + llfloaternewfeaturenotification.h llfloaternotificationsconsole.h llfloaternotificationstabbed.h llfloaterobjectweights.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index dd87f827df..df3dd65a0e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5497,6 +5497,17 @@ Value 0 + LastUIFeatureVersion + + Comment + UI Feature Version number for tracking feature notification between viewer builds + Persist + 1 + Type + S32 + Value + 0 + LastFindPanel Comment diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8cc9be7244..2430ca5f83 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -120,6 +120,8 @@ const F64 CHAT_AGE_FAST_RATE = 3.0; const F32 MIN_FIDGET_TIME = 8.f; // seconds const F32 MAX_FIDGET_TIME = 20.f; // seconds +const S32 UI_FEATURE_VERSION = 1; + // The agent instance. LLAgent gAgent; @@ -372,7 +374,7 @@ LLAgent::LLAgent() : mHideGroupTitle(FALSE), mGroupID(), - mInitialized(FALSE), + mInitialized(false), mListener(), mDoubleTapRunTimer(), @@ -447,7 +449,7 @@ LLAgent::LLAgent() : mNextFidgetTime(0.f), mCurrentFidget(0), - mFirstLogin(FALSE), + mFirstLogin(false), mOutfitChosen(FALSE), mVoiceConnected(false), @@ -504,7 +506,7 @@ void LLAgent::init() mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_AGENT); - mInitialized = TRUE; + mInitialized = true; } //----------------------------------------------------------------------------- @@ -559,6 +561,31 @@ void LLAgent::onAppFocusGained() } } +void LLAgent::setFirstLogin(bool b) +{ + mFirstLogin = b; + + if (mFirstLogin) + { + // Don't notify new users about new features + S32 feature_version = gSavedSettings.getS32("LastUIFeatureVersion"); + if (feature_version < UI_FEATURE_VERSION) + { + gSavedSettings.setS32("LastUIFeatureVersion", UI_FEATURE_VERSION); + } + } +} + +void LLAgent::showLatestFeatureNotification() +{ + // Notify user about new thumbnail support + S32 feature_version = gSavedSettings.getS32("LastUIFeatureVersion"); + if (feature_version < UI_FEATURE_VERSION) + { + LLFloaterReg::showInstance("new_feature_notification"); + gSavedSettings.setS32("LastUIFeatureVersion", UI_FEATURE_VERSION); + } +} void LLAgent::ageChat() { diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 498bea3c07..fb9ac402e1 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -117,15 +117,17 @@ private: //-------------------------------------------------------------------- public: void onAppFocusGained(); - void setFirstLogin(BOOL b) { mFirstLogin = b; } + void setFirstLogin(bool b); // Return TRUE if the database reported this login as the first for this particular user. - BOOL isFirstLogin() const { return mFirstLogin; } - BOOL isInitialized() const { return mInitialized; } + bool isFirstLogin() const { return mFirstLogin; } + bool isInitialized() const { return mInitialized; } + + void showLatestFeatureNotification(); public: std::string mMOTD; // Message of the day private: - BOOL mInitialized; - BOOL mFirstLogin; + bool mInitialized; + bool mFirstLogin; boost::shared_ptr mListener; //-------------------------------------------------------------------- diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp new file mode 100644 index 0000000000..e04b1a5da5 --- /dev/null +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -0,0 +1,63 @@ +/** + * @file llfloaternewfeaturenotification.cpp + * @brief LLFloaterNewFeatureNotification class implementation + * + * $LicenseInfo:firstyear=2023&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2023, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaternewfeaturenotification.h" + + +LLFloaterNewFeatureNotification::LLFloaterNewFeatureNotification(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterNewFeatureNotification::~LLFloaterNewFeatureNotification() +{ +} + +BOOL LLFloaterNewFeatureNotification::postBuild() +{ + setCanDrag(FALSE); + getChild("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); + return TRUE; +} + +void LLFloaterNewFeatureNotification::onOpen(const LLSD& key) +{ + centerOnScreen(); +} + +void LLFloaterNewFeatureNotification::onCloseBtn() +{ + closeFloater(); +} + +void LLFloaterNewFeatureNotification::centerOnScreen() +{ + LLVector2 window_size = LLUI::getInstance()->getWindowSize(); + centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); +} + diff --git a/indra/newview/llfloaternewfeaturenotification.h b/indra/newview/llfloaternewfeaturenotification.h new file mode 100644 index 0000000000..86e9683def --- /dev/null +++ b/indra/newview/llfloaternewfeaturenotification.h @@ -0,0 +1,49 @@ +/** + * @file llfloaternewfeaturenotification.h + * @brief LLFloaterNewFeatureNotification class definition + * + * $LicenseInfo:firstyear=2023&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2023, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_FLOATER_NEW_FEATURE_NOTOFICATION_H +#define LL_FLOATER_NEW_FEATURE_NOTOFICATION_H + +#include "llfloater.h" + +class LLFloaterNewFeatureNotification: + public LLFloater +{ + friend class LLFloaterReg; +public: + BOOL postBuild() override; + void onOpen(const LLSD& key) override; + +private: + LLFloaterNewFeatureNotification(const LLSD& key); + /*virtual*/ ~LLFloaterNewFeatureNotification(); + + void centerOnScreen(); + + void onCloseBtn(); +}; + +#endif diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 5eb853f44c..dde260eb7f 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -400,6 +400,8 @@ void LLSidepanelInventory::onOpen(const LLSD& key) gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } #endif + + gAgent.showLatestFeatureNotification(); } void LLSidepanelInventory::performActionOnSelection(const std::string &action) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a37bde6eb8..edd46f7423 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3627,7 +3627,7 @@ bool process_login_success_response() std::string flag = login_flags["ever_logged_in"]; if(!flag.empty()) { - gAgent.setFirstLogin((flag == "N") ? TRUE : FALSE); + gAgent.setFirstLogin(flag == "N"); } /* Flag is currently ignored by the viewer. @@ -3718,7 +3718,7 @@ bool process_login_success_response() std::string fake_initial_outfit_name = gSavedSettings.getString("FakeInitialOutfitName"); if (!fake_initial_outfit_name.empty()) { - gAgent.setFirstLogin(TRUE); + gAgent.setFirstLogin(true); sInitialOutfit = fake_initial_outfit_name; if (sInitialOutfitGender.empty()) { diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0c6e2de3ed..060bdb6995 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -100,6 +100,7 @@ #include "llfloatermyscripts.h" #include "llfloatermyenvironment.h" #include "llfloaternamedesc.h" +#include "llfloaternewfeaturenotification.h" #include "llfloaternotificationsconsole.h" #include "llfloaternotificationstabbed.h" #include "llfloaterobjectweights.h" @@ -229,6 +230,7 @@ public: "avatar_picker", "camera", "camera_presets", + "change_item_thumbnail" "classified", "add_landmark", "delete_pref_preset", @@ -247,6 +249,7 @@ public: "message_critical", // Modal!!! Login specific. If this is in use elsewhere, better to create a non modal variant "message_tos", // Modal!!! Login specific. "mute_object_by_name", + "new_feature_notification", "publish_classified", "save_pref_preset", "save_camera_preset", @@ -402,6 +405,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("new_feature_notification", "floater_new_feature_notification.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml new file mode 100644 index 0000000000..370a08f16a --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml @@ -0,0 +1,54 @@ + + + +New inventory features + + +You can now add preview images to inventory items and view a folder in its own window. +Learn more in this [https://community.secondlife.com/blogs/entry/13637-new-features-inventory-item-preview-and-single-folder-view/ blogpost] + +