From 5dcdb2dd02ac7e7626e03ab7b4f4bb0aaad72742 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 7 Nov 2011 14:43:59 -0800 Subject: EXP-1548 FIX -- Clicking show on inventory offer does not open inventory (or received items panel) on test grid Ravi set to use Received Items folder for transfers EXP-1555 FIX -- Double-click is inconsistent between inventory and Received Items EXP-1547 FIX -- drag/drop inventory to agent - delivers to Objects, not Received items. * "Show" button from p2p transfer now opens inventory window and inbox panel, setting focus to the item * Double-click on inbox inventory items now falls through to default item behavior --- indra/newview/llinventorypanel.cpp | 68 +++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 18c3f76826..f4e6d32510 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1128,19 +1128,71 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) { // Make sure the floater is not minimized (STORM-438). if (active_inv_floaterp && active_inv_floaterp->isMinimized()) + { active_inv_floaterp->setMinimized(FALSE); + } + } + else if (auto_open) + { + floater_inventory->openFloater(); - return res; + res = sidepanel_inventory->getActivePanel(); } + + return res; +} + +//static +void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id) +{ + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); + + if (active_panel) + { + LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; - // C. If no panels are open and we don't want to force open a panel, then just abort out. - if (!auto_open) return NULL; - - // D. Open the inventory side panel floater and use that. - floater_inventory->openFloater(); - return sidepanel_inventory->getActivePanel(); + LLViewerInventoryItem * item = gInventory.getItem(obj_id); + + bool item_in_inbox = false; + bool item_in_outbox = false; + + if (item) + { + LLViewerInventoryCategory * cat = gInventory.getCategory(item->getParentUUID()); + + if (cat) + { + item_in_inbox = (LLFolderType::FT_INBOX == cat->getPreferredType()); + item_in_outbox = (LLFolderType::FT_OUTBOX == cat->getPreferredType()); + } + } + + if (item_in_inbox || item_in_outbox) + { + LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); + LLInventoryPanel * inventory_panel = NULL; + + if (item_in_inbox) + { + sidepanel_inventory->openInbox(); + inventory_panel = sidepanel_inventory->getInboxPanel(); + } + else + { + sidepanel_inventory->openOutbox(); + inventory_panel = sidepanel_inventory->getOutboxPanel(); + } - return NULL; + if (inventory_panel) + { + inventory_panel->setSelection(obj_id, TAKE_FOCUS_YES); + } + } + else + { + active_panel->setSelection(obj_id, TAKE_FOCUS_YES); + } + } } void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type) -- cgit v1.2.3 From cef45c18239e0e4b59beb4671aa4f534ce408f61 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 9 Nov 2011 11:04:00 -0800 Subject: EXP-1548 folder FIX -- Clicking show on inventory offer does not open inventory (or received items panel) on test grid Ravi set to use Received Items folder for transfers --- indra/newview/llinventorypanel.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index f4e6d32510..acbec531b6 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1152,27 +1152,34 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; LLViewerInventoryItem * item = gInventory.getItem(obj_id); + LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id); - bool item_in_inbox = false; - bool item_in_outbox = false; + bool in_inbox = false; + bool in_outbox = false; + + LLViewerInventoryCategory * parent_cat = NULL; if (item) { - LLViewerInventoryCategory * cat = gInventory.getCategory(item->getParentUUID()); - - if (cat) - { - item_in_inbox = (LLFolderType::FT_INBOX == cat->getPreferredType()); - item_in_outbox = (LLFolderType::FT_OUTBOX == cat->getPreferredType()); - } + parent_cat = gInventory.getCategory(item->getParentUUID()); + } + else if (cat) + { + parent_cat = gInventory.getCategory(cat->getParentUUID()); + } + + if (parent_cat) + { + in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType()); + in_outbox = (LLFolderType::FT_OUTBOX == parent_cat->getPreferredType()); } - if (item_in_inbox || item_in_outbox) + if (in_inbox || in_outbox) { LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); LLInventoryPanel * inventory_panel = NULL; - if (item_in_inbox) + if (in_inbox) { sidepanel_inventory->openInbox(); inventory_panel = sidepanel_inventory->getInboxPanel(); -- cgit v1.2.3