Merge branch 'DRTVWR-588-maint-W' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llviewerassetupload.cpp
#	indra/newview/llviewermessage.cpp
#	indra/newview/skins/default/xui/en/menu_viewer.xml
master
Ansariel 2023-10-12 19:36:34 +02:00
commit bf8154d447
15 changed files with 124 additions and 96 deletions

View File

@ -1362,9 +1362,17 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
} }
else else
{ {
#if 0
// EXT-1565 : Zai Lynch, James Linden : 15/Oct/09
// [BSI] Feedback: Viewer clock mentions SLT, but would prefer it to show PST/PDT
// "slt" = Second Life Time, which is deprecated. // "slt" = Second Life Time, which is deprecated.
// If not utc or user local time, fallback to Pacific time // If not utc or user local time, fallback to Pacific time
replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST"; replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST";
#else
// SL-20370 : Steeltoe Linden : 29/Sep/23
// Change "PDT" to "SLT" on menu bar
replacement = "SLT";
#endif
} }
return true; return true;
} }

View File

@ -1417,8 +1417,6 @@ bool LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent) void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent)
{ {
typedef std::vector <LLPanel*> item_panel_list_t;
std::string cur_filter = mFilterSubString; std::string cur_filter = mFilterSubString;
LLStringUtil::toUpper(cur_filter); LLStringUtil::toUpper(cur_filter);

View File

@ -1657,25 +1657,23 @@ BOOL LLTabContainer::selectTab(S32 which)
LLTabTuple* selected_tuple = getTab(which); LLTabTuple* selected_tuple = getTab(which);
if (!selected_tuple) if (!selected_tuple)
{
return FALSE; return FALSE;
}
LLSD cbdata; LLSD cbdata;
if (selected_tuple->mTabPanel) if (selected_tuple->mTabPanel)
cbdata = selected_tuple->mTabPanel->getName(); cbdata = selected_tuple->mTabPanel->getName();
BOOL res = FALSE; BOOL result = FALSE;
if( !mValidateSignal || (*mValidateSignal)( this, cbdata ) ) if (!mValidateSignal || (*mValidateSignal)(this, cbdata))
{ {
res = setTab(which); result = setTab(which);
if (res && mCommitSignal) if (result && mCommitSignal)
{ {
(*mCommitSignal)(this, cbdata); (*mCommitSignal)(this, cbdata);
} }
} }
return res; return result;
} }
// private // private

View File

@ -154,6 +154,13 @@ LLSLURL::LLSLURL(const std::string& slurl)
if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
{ {
LL_DEBUGS("SLURL") << "secondlife scheme" << LL_ENDL; LL_DEBUGS("SLURL") << "secondlife scheme" << LL_ENDL;
if (path_array.size() == 0)
{
// um, we need a path...
mType = EMPTY;
return;
}
// parse a maingrid style slurl. We know the grid is maingrid // parse a maingrid style slurl. We know the grid is maingrid
// so grab it. // so grab it.
// A location slurl for maingrid (with the special schemes) can be in the form // A location slurl for maingrid (with the special schemes) can be in the form

View File

@ -60,7 +60,8 @@ public:
HOME_LOCATION, HOME_LOCATION,
LAST_LOCATION, LAST_LOCATION,
APP, APP,
HELP HELP,
EMPTY
}; };
LLSLURL(): mType(INVALID) { } LLSLURL(): mType(INVALID) { }

View File

@ -1914,7 +1914,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
} }
else if ("show_in_main_panel" == action) else if ("show_in_main_panel" == action)
{ {
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE); LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true);
return; return;
} }
else if ("cut" == action) else if ("cut" == action)
@ -3703,7 +3703,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
// </FS:TT> // </FS:TT>
else if ("show_in_main_panel" == action) else if ("show_in_main_panel" == action)
{ {
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE); LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true);
return; return;
} }
else if ("cut" == action) else if ("cut" == action)

View File

@ -2135,62 +2135,68 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
} }
//static //static
void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL use_main_panel, BOOL take_keyboard_focus, BOOL reset_filter) void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id,
bool use_main_panel, bool take_keyboard_focus, bool reset_filter)
{ {
// <FS:Ansariel> Use correct inventory floater // <FS:Ansariel> Use correct inventory floater
//LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); //LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
//sidepanel_inventory->showInventoryPanel(); //sidepanel_inventory->showInventoryPanel();
// </FS:Ansariel> // </FS:Ansariel>
bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); LLUUID cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
bool in_inbox = gInventory.isObjectDescendentOf(obj_id, cat_id);
bool show_inbox = gSavedSettings.getBOOL("FSShowInboxFolder"); // <FS:Ansariel> Optional hiding of Received Items folder aka Inbox bool show_inbox = gSavedSettings.getBOOL("FSShowInboxFolder"); // <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
// <FS:Ansariel> FIRE-22167: Make "Show in Main View" work properly // <FS:Ansariel> FIRE-22167: Make "Show in Main View" work properly
//if (!in_inbox && (use_main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected())) //if (main_panel && !in_inbox) //if (!in_inbox && use_main_panel)
//{ //{
// sidepanel_inventory->selectAllItemsPanel(); // sidepanel_inventory->selectAllItemsPanel();
//} //}
// </FS:Ansariel> // </FS:Ansariel>
if (!auto_open)
LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
if(!auto_open && inventory_floater && inventory_floater->getVisible())
{ {
LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel"); LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel(); if (inventory_floater && inventory_floater->getVisible())
if(main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
{ {
LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL; LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
main_panel->setGallerySelection(obj_id); LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
return; if (main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
{
LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL;
main_panel->setGallerySelection(obj_id);
return;
}
} }
} }
// <FS:Ansariel> Use correct inventory floater // <FS:Ansariel> Use correct inventory floater
//LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); //if (use_main_panel)
//if (main_inventory && main_inventory->isSingleFolderMode()
// && use_main_panel)
//{ //{
// const LLInventoryObject *obj = gInventory.getObject(obj_id); // LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
// if (obj) // if (main_inventory && main_inventory->isSingleFolderMode())
// { // {
// LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL; // const LLInventoryObject *obj = gInventory.getObject(obj_id);
// main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false); // if (obj)
// main_inventory->setGallerySelection(obj_id); // {
// return; // LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL;
// main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false);
// main_inventory->setGallerySelection(obj_id);
// return;
// }
// } // }
//} //}
if (!inventory_floater) LLFloater* inv_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
if (!inv_floater)
{ {
inventory_floater = LLFloaterReg::showInstance("inventory"); inv_floater = LLFloaterReg::showInstance("inventory");
} }
if (use_main_panel && inventory_floater) if (use_main_panel && inv_floater)
{ {
LLSidepanelInventory* inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel"); LLSidepanelInventory* inventory_panel = inv_floater->findChild<LLSidepanelInventory>("main_panel");
LLPanelMainInventory* main_inventory = inventory_panel->getMainInventoryPanel(); LLPanelMainInventory* main_inventory = inventory_panel->getMainInventoryPanel();
if (main_inventory && main_inventory->isSingleFolderMode()) if (main_inventory && main_inventory->isSingleFolderMode())
{ {
const LLInventoryObject *obj = gInventory.getObject(obj_id); const LLInventoryObject* obj = gInventory.getObject(obj_id);
if (obj) if (obj)
{ {
main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false); main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false);
@ -2202,7 +2208,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
// </FS:Ansariel> // </FS:Ansariel>
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if (active_panel) if (active_panel)
{ {
LL_DEBUGS("Messaging", "Inventory") << "Highlighting" << obj_id << LL_ENDL; LL_DEBUGS("Messaging", "Inventory") << "Highlighting" << obj_id << LL_ENDL;
@ -2218,10 +2223,8 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
// </FS:Ansariel> // </FS:Ansariel>
{ {
LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); // <FS:Ansariel> Use correct inventory floater LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); // <FS:Ansariel> Use correct inventory floater
LLInventoryPanel * inventory_panel = NULL;
sidepanel_inventory->openInbox(); sidepanel_inventory->openInbox();
inventory_panel = sidepanel_inventory->getInboxPanel(); LLInventoryPanel* inventory_panel = sidepanel_inventory->getInboxPanel();
if (inventory_panel) if (inventory_panel)
{ {
inventory_panel->setSelection(obj_id, take_keyboard_focus); inventory_panel->setSelection(obj_id, take_keyboard_focus);
@ -2254,7 +2257,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id) void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id)
{ {
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); 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) for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
{ {

View File

@ -260,12 +260,12 @@ public:
// "Auto_open" determines if we open an inventory panel if none are open. // "Auto_open" determines if we open an inventory panel if none are open.
static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE); static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
static void openInventoryPanelAndSetSelection(BOOL auto_open, static void openInventoryPanelAndSetSelection(bool auto_open,
const LLUUID& obj_id, const LLUUID& obj_id,
BOOL use_main_panel = FALSE, bool use_main_panel = false,
BOOL take_keyboard_focus = TAKE_FOCUS_YES, bool take_keyboard_focus = true,
BOOL reset_filter = FALSE); bool reset_filter = false);
static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id); static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
void addItemID(const LLUUID& id, LLFolderViewItem* itemp); void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
void removeItemID(const LLUUID& id); void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id); LLFolderViewItem* getItemByID(const LLUUID& id);

View File

@ -5705,7 +5705,7 @@ void on_new_single_inventory_upload_complete(
} }
else else
{ {
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, server_response["new_inventory_item"].asUUID(), TRUE, TAKE_FOCUS_NO, TRUE); LLInventoryPanel::openInventoryPanelAndSetSelection(true, server_response["new_inventory_item"].asUUID(), true, false, true);
} }
// restore keyboard focus // restore keyboard focus

View File

@ -116,6 +116,13 @@ LLSLURL::LLSLURL(const std::string& slurl)
// and the slurl type (APP or LOCATION) // and the slurl type (APP or LOCATION)
if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
{ {
if (path_array.size() == 0)
{
// um, we need a path...
mType = EMPTY;
return;
}
// parse a maingrid style slurl. We know the grid is maingrid // parse a maingrid style slurl. We know the grid is maingrid
// so grab it. // so grab it.
// A location slurl for maingrid (with the special schemes) can be in the form // A location slurl for maingrid (with the special schemes) can be in the form

View File

@ -55,13 +55,14 @@ public:
static const char* SLURL_REGION_PATH; static const char* SLURL_REGION_PATH;
// if you modify this enumeration, update typeName as well // if you modify this enumeration, update typeName as well
enum SLURL_TYPE { enum SLURL_TYPE {
INVALID, INVALID,
LOCATION, LOCATION,
HOME_LOCATION, HOME_LOCATION,
LAST_LOCATION, LAST_LOCATION,
APP, APP,
HELP, HELP,
EMPTY,
NUM_SLURL_TYPES // must be last NUM_SLURL_TYPES // must be last
}; };

View File

@ -140,6 +140,11 @@ bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl,
LLMediaCtrl* web, LLMediaCtrl* web,
bool trusted_browser) bool trusted_browser)
{ {
// SL-20422 : Clicking the "Bring it back" link on Aditi displays a teleport alert
// Stop further processing empty urls like [secondlife:/// Bring it back.]
if (slurl.getType() == LLSLURL::EMPTY)
return true;
const bool right_click = false; const bool right_click = false;
return dispatchCore(slurl, nav_type, right_click, web, trusted_browser); return dispatchCore(slurl, nav_type, right_click, web, trusted_browser);
} }

View File

@ -904,9 +904,9 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
// </FS:Ansariel> // </FS:Ansariel>
// <FS:Testy> FIRE-22943: Don't switch away from the "Recent Items" tab. // <FS:Testy> FIRE-22943: Don't switch away from the "Recent Items" tab.
//LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, FALSE, TAKE_FOCUS_NO, (panel == NULL)); //LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, false, false, !panel);
BOOL show_main_panel = (!panel || panel->getName() != "Recent Items"); bool show_main_panel = (!panel || panel->getName() != "Recent Items");
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, show_main_panel, TAKE_FOCUS_NO, (panel == NULL)); LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, show_main_panel, false, !panel);
// </FS:Testy> // </FS:Testy>
// restore keyboard focus // restore keyboard focus

View File

@ -1720,20 +1720,29 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
} }
else else
{ {
// Highlight item // Highlight item
// <FS:Ansariel> Only show if either ShowInInventory is true OR it is an inventory // <FS:Ansariel> Only show if either ShowInInventory is true OR it is an inventory
// offer from an agent and the asset is not previewable // offer from an agent and the asset is not previewable
const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") || (from_agent_manual && !check_asset_previewable(asset_type)); //bool show_in_inventory = gSavedSettings.get<bool>("ShowInInventory");
//gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false //bool auto_open =
//!from_name.empty(); // don't open if it's not from anyone. // show_in_inventory && // don't open if ShowInInventory is FALSE
// <FS:Ansariel> Use correct inventory floater // !from_name.empty(); // don't open if it's not from anyone
//if (auto_open)
//{ //// SL-20419 : Don't change active tab if floater is visible
// LLFloaterReg::showInstance("inventory"); //LLFloater* instance = LLFloaterReg::findInstance("inventory");
//} //bool use_main_panel = instance && instance->getVisible();
// </FS:Ansariel>
if (auto_open) // <FS:Ansariel> Don't mess with open inventory panels when ShowInInventory is FALSE //if (auto_open)
LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true); //{
// LLFloaterReg::showInstance("inventory");
//}
//LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, use_main_panel);
const bool auto_open = gSavedSettings.getBOOL("ShowInInventory") || (from_agent_manual && !check_asset_previewable(asset_type));
if (auto_open) // <FS:Ansariel> Don't mess with open inventory panels when ShowInInventory is FALSE
LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true);
// </FS:Ansariel>
} }
} }
} }

View File

@ -979,35 +979,27 @@ void LLWearableItemsList::updateList(const LLUUID& category_id)
void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids) void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids)
{ {
// nothing to update // nothing to update
if (changed_items_uuids.empty()) return; if (changed_items_uuids.empty())
return;
typedef std::vector<LLPanel*> item_panel_list_t; uuid_vec_t::const_iterator uuids_begin = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end();
pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end();
item_panel_list_t items; while (pairs_iter != pairs_end)
getItems(items);
for (item_panel_list_t::iterator items_iter = items.begin();
items_iter != items.end();
++items_iter)
{ {
LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(*items_iter); LLPanel* panel = (*(pairs_iter++))->first;
if (!item) continue; LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(panel);
if (!item)
continue;
LLViewerInventoryItem* inv_item = item->getItem(); LLViewerInventoryItem* inv_item = item->getItem();
if (!inv_item) continue; if (!inv_item)
continue;
LLUUID linked_uuid = inv_item->getLinkedUUID(); const LLUUID& linked_uuid = inv_item->getLinkedUUID();
if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end)
for (uuid_vec_t::const_iterator iter = changed_items_uuids.begin(); {
iter != changed_items_uuids.end(); item->setNeedsRefresh(true);
++iter) }
{
if (linked_uuid == *iter)
{
item->setNeedsRefresh(true);
break;
}
}
} }
} }