summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorypanel.cpp11
-rw-r--r--indra/newview/llinventorypanel.h2
-rw-r--r--indra/newview/llviewermessage.cpp20
3 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index d6eee523f4..ca5abfd661 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1798,14 +1798,14 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
}
//static
-void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL 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)
{
LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
sidepanel_inventory->showInventoryPanel();
bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX)));
- if (!in_inbox && (main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected()))
+ if (!in_inbox && (use_main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected()))
{
sidepanel_inventory->selectAllItemsPanel();
}
@@ -1822,7 +1822,12 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
}
}
-
+ LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
+ if (main_inventory && main_inventory->isSingleFolderMode()
+ && use_main_panel)
+ {
+ main_inventory->toggleViewMode();
+ }
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if (active_panel)
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 1476194195..f323a6c6d7 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -246,7 +246,7 @@ public:
static void openInventoryPanelAndSetSelection(BOOL auto_open,
const LLUUID& obj_id,
- BOOL main_panel = FALSE,
+ BOOL use_main_panel = FALSE,
BOOL take_keyboard_focus = TAKE_FOCUS_YES,
BOOL reset_filter = FALSE);
static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 065e3ab3ad..78241a7c71 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -76,6 +76,7 @@
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpanelgrouplandmoney.h"
+#include "llpanelmaininventory.h"
#include "llrecentpeople.h"
#include "llscriptfloater.h"
#include "llscriptruntimeperms.h"
@@ -1536,11 +1537,28 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
}
////////////////////////////////////////////////////////////////////////////////
+ static LLUICachedControl<bool> find_original_new_floater("FindOriginalOpenWindow", false);
+ //show in a new single-folder window
+ if(find_original_new_floater)
+ {
+ const LLInventoryObject *obj = gInventory.getObject(obj_id);
+ if (obj && obj->getParentUUID().notNull())
+ {
+ LLPanelMainInventory::newFolderWindow(obj->getParentUUID(), obj_id);
+ }
+ }
+ else
+ {
// Highlight item
const BOOL auto_open =
gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
!from_name.empty(); // don't open if it's not from anyone.
- LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id);
+ if(auto_open)
+ {
+ LLFloaterReg::showInstance("inventory");
+ }
+ LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true);
+ }
}
}