From e2f9276a083f5883e250b0edcc5c68273985be8b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 21 Jun 2011 15:18:05 -0700 Subject: EXP-877 Profile button not active when selecting items in Marketplace inbox --- indra/newview/llavataractions.cpp | 64 +++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 23 deletions(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index cbbdcb2983..eeb4ec8458 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -69,6 +69,7 @@ #include "lltrans.h" #include "llcallingcard.h" #include "llslurl.h" // IDEVO +#include "llsidepanelinventory.h" // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) @@ -444,8 +445,6 @@ void LLAvatarActions::share(const LLUUID& id) namespace action_give_inventory { - typedef std::set uuid_set_t; - /** * Returns a pointer to 'Add More' inventory panel of Edit Outfit SP. */ @@ -475,18 +474,16 @@ namespace action_give_inventory /** * Checks My Inventory visibility. */ + static bool is_give_inventory_acceptable() { - LLInventoryPanel* active_panel = get_active_inventory_panel(); - if (!active_panel) return false; - // check selection in the panel - const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + const std::set inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs(); if (inventory_selected_uuids.empty()) return false; // nothing selected bool acceptable = false; - uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); - const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); + std::set::const_iterator it = inventory_selected_uuids.begin(); + const std::set::const_iterator it_end = inventory_selected_uuids.end(); for (; it != it_end; ++it) { LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); @@ -529,12 +526,12 @@ namespace action_give_inventory } } - static void build_items_string(const uuid_set_t& inventory_selected_uuids , std::string& items_string) + static void build_items_string(const std::set& inventory_selected_uuids , std::string& items_string) { llassert(inventory_selected_uuids.size() > 0); const std::string& separator = LLTrans::getString("words_separator"); - for (uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); ; ) + for (std::set::const_iterator it = inventory_selected_uuids.begin(); ; ) { LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); if (NULL != inv_cat) @@ -570,10 +567,7 @@ namespace action_give_inventory return; } - LLInventoryPanel* active_panel = get_active_inventory_panel(); - if (!active_panel) return; - - const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + const std::set inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs(); if (inventory_selected_uuids.empty()) { return; @@ -590,8 +584,8 @@ namespace action_give_inventory // We souldn't open IM session, just calculate session ID for logging purpose. See EXT-6710 const LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, avatar_uuid); - uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); - const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); + std::set::const_iterator it = inventory_selected_uuids.begin(); + const std::set::const_iterator it_end = inventory_selected_uuids.end(); const std::string& separator = LLTrans::getString("words_separator"); std::string noncopy_item_names; @@ -654,10 +648,7 @@ namespace action_give_inventory { llassert(avatar_names.size() == avatar_uuids.size()); - LLInventoryPanel* active_panel = get_active_inventory_panel(); - if (!active_panel) return; - - const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + const std::set inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs(); if (inventory_selected_uuids.empty()) { return; @@ -678,6 +669,33 @@ namespace action_give_inventory } } + + +//static +std::set LLAvatarActions::getInventorySelectedUUIDs() +{ + std::set inventory_selected_uuids; + + LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel(); + if (active_panel) + { + inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); + } + + if (inventory_selected_uuids.empty()) + { + LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel("sidepanel_inventory"); + LLInventoryPanel * inbox = sidepanel_inventory->findChild("inventory_inbox"); + if (inbox) + { + inventory_selected_uuids = inbox->getRootFolder()->getSelectionList(); + } + + } + + return inventory_selected_uuids; +} + //static void LLAvatarActions::shareWithAvatars() { @@ -705,12 +723,12 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL // check selection in the panel LLFolderView* root_folder = inv_panel->getRootFolder(); - const uuid_set_t inventory_selected_uuids = root_folder->getSelectionList(); + const std::set inventory_selected_uuids = root_folder->getSelectionList(); if (inventory_selected_uuids.empty()) return false; // nothing selected bool can_share = true; - uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); - const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); + std::set::const_iterator it = inventory_selected_uuids.begin(); + const std::set::const_iterator it_end = inventory_selected_uuids.end(); for (; it != it_end; ++it) { LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); -- cgit v1.2.3 From aecfaef10c41dce7395c3a02dcd84a39b6ffbeee Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 5 Jul 2011 16:51:04 -0700 Subject: EXP-982 FIX As a user, I would like to see the new web-based profiles without any browser chrome and at an appropriate default size --- indra/newview/llavataractions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index eeb4ec8458..b2d97a796a 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -313,7 +313,9 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa std::string url = getProfileURL(username); // PROFILES: open in webkit window - LLWeb::loadWebURLInternal(url, "", agent_id.asString()); + const bool show_chrome = false; + static LLCachedControl profile_rect(gSavedSettings, "WebProfileRect"); + LLFloaterWebContent::create(url, "", agent_id.asString(), show_chrome, profile_rect); } // static -- cgit v1.2.3 From e92d3dcf1013ab340fdef514b41ebf790f79e04c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 5 Jul 2011 23:40:19 -0700 Subject: EXP-971 FIX New Direct Delivery item does not sort as most recent item in Recent Tab if that tab is open when item delivered --- indra/newview/llavataractions.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index b2d97a796a..4685865bce 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -49,6 +49,7 @@ #include "llfloaterpay.h" #include "llfloaterwebcontent.h" #include "llfloaterworldmap.h" +#include "llfolderview.h" #include "llgiveinventory.h" #include "llinventorybridge.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType -- cgit v1.2.3