From 649beed53bd44ae5b06cd36f40897ed561fe48ab Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 18 Nov 2011 22:23:09 +0200 Subject: EXP-1577 FIX Made agent profile position and size persistent. Enable My Profile to use saved_rect. Value of the "WebProfileRect" setting is ignored in this case. --- indra/newview/llavataractions.cpp | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 10fd6b739e..7f6abb0937 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -302,6 +302,25 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) make_ui_sound("UISndStartIM"); } +static const LLRect& get_preferred_profile_rect(const LLUUID& avatar_id) +{ + if (avatar_id == gAgentID) + { + return LLRect::null; // no preference + } + + // Preferred size for all residents' profiles except our own, + // for which saved_rect will be used. + static LLCachedControl profile_rect(gSavedSettings, "WebProfileRect"); + return profile_rect; +} + +static const char* get_profile_floater_name(const LLUUID& avatar_id) +{ + // Use different floater XML for our profile to be able to save its rect. + return avatar_id == gAgentID ? "my_profile" : "profile"; +} + static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { std::string username = av_name.mUsername; @@ -315,14 +334,13 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa // PROFILES: open in webkit window const bool show_chrome = false; - static LLCachedControl profile_rect(gSavedSettings, "WebProfileRect"); LLFloaterWebContent::Params p; p.url(url). id(agent_id.asString()). show_chrome(show_chrome). window_class("profile"). - preferred_media_size(profile_rect); - LLFloaterReg::showInstance("profile", p); + preferred_media_size(get_preferred_profile_rect(agent_id)); + LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p); } // static @@ -339,14 +357,15 @@ bool LLAvatarActions::profileVisible(const LLUUID& id) { LLSD sd; sd["id"] = id; - LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("profile", sd)); + LLFloater* browser = getProfileFloater(id); return browser && browser->isShown(); } //static LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id) { - LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("profile", LLSD().with("id", id))); + LLFloaterWebContent *browser = dynamic_cast + (LLFloaterReg::findInstance(get_profile_floater_name(id), LLSD().with("id", id))); return browser; } @@ -355,7 +374,7 @@ void LLAvatarActions::hideProfile(const LLUUID& id) { LLSD sd; sd["id"] = id; - LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("profile", sd)); + LLFloater* browser = getProfileFloater(id); if (browser) { browser->closeFloater(); -- cgit v1.2.3 From 0b7bd115ad118a5792e4f835fe50ac6606fd0874 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 23 Nov 2011 19:21:52 +0200 Subject: EXP-1577 FOLLOWUP Making default My Profile window size the same as size of other residents' profile floaters. --- indra/newview/llavataractions.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 7f6abb0937..2f331bdab1 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -302,25 +302,26 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) make_ui_sound("UISndStartIM"); } +static const char* get_profile_floater_name(const LLUUID& avatar_id) +{ + // Use different floater XML for our profile to be able to save its rect. + return avatar_id == gAgentID ? "my_profile" : "profile"; +} + static const LLRect& get_preferred_profile_rect(const LLUUID& avatar_id) { - if (avatar_id == gAgentID) + if (avatar_id == gAgentID && + LLFloaterReg::getInstance(get_profile_floater_name(avatar_id))->hasSavedRect()) { - return LLRect::null; // no preference + return LLRect::null; // no preference, use saved rect } - // Preferred size for all residents' profiles except our own, - // for which saved_rect will be used. + // Preferred size for all residents' profiles + // and default size for our own profile. static LLCachedControl profile_rect(gSavedSettings, "WebProfileRect"); return profile_rect; } -static const char* get_profile_floater_name(const LLUUID& avatar_id) -{ - // Use different floater XML for our profile to be able to save its rect. - return avatar_id == gAgentID ? "my_profile" : "profile"; -} - static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { std::string username = av_name.mUsername; -- cgit v1.2.3 From 2be10e866056d19f01568fe6f569af7ab9ad7686 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 6 Dec 2011 20:06:44 +0200 Subject: EXP-1577 FOLLOWUP Implemented new requirements on size of profile floaters. Implemented new requirements from XD: "Profile window should keep last size, regardless of whether it was own profile or another users'. If multiple windows open, last one touched is the size we store." --- indra/newview/llavataractions.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 2f331bdab1..8ca621538f 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -308,20 +308,6 @@ static const char* get_profile_floater_name(const LLUUID& avatar_id) return avatar_id == gAgentID ? "my_profile" : "profile"; } -static const LLRect& get_preferred_profile_rect(const LLUUID& avatar_id) -{ - if (avatar_id == gAgentID && - LLFloaterReg::getInstance(get_profile_floater_name(avatar_id))->hasSavedRect()) - { - return LLRect::null; // no preference, use saved rect - } - - // Preferred size for all residents' profiles - // and default size for our own profile. - static LLCachedControl profile_rect(gSavedSettings, "WebProfileRect"); - return profile_rect; -} - static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { std::string username = av_name.mUsername; @@ -334,13 +320,9 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa std::string url = getProfileURL(username); // PROFILES: open in webkit window - const bool show_chrome = false; LLFloaterWebContent::Params p; p.url(url). - id(agent_id.asString()). - show_chrome(show_chrome). - window_class("profile"). - preferred_media_size(get_preferred_profile_rect(agent_id)); + id(agent_id.asString()); LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p); } -- cgit v1.2.3 From 8878a5e561f292a8afcd933eaafb2c4c65b7bf7f Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 9 Dec 2011 12:29:33 -0800 Subject: * Changed background opacity of outbox and inventory to match. * Removed superfluous marketplace layout stack, leftover from inbox/outbox in same inventory window. --- indra/newview/llavataractions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 8ca621538f..e7e098e423 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -707,7 +707,7 @@ std::set LLAvatarActions::getInventorySelectedUUIDs() LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); if (sidepanel_inventory) { - inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList(); + inventory_selected_uuids = sidepanel_inventory->getInboxSelectionList(); } } -- cgit v1.2.3 From aba090ab9027e5a5c1e9eb114ecca12b9eafa978 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 13 Dec 2011 17:27:54 +0200 Subject: EXP-1599 FIXED (Sharing multiple selected inventory folders only shares one folder (no warning for user)) - In case of sharing multiple folders, make the confirmation dialog contain a warning that only one folder can be shared at a time. --- indra/newview/llavataractions.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 8ca621538f..7abecc643b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -680,12 +680,29 @@ namespace action_give_inventory std::string items; build_items_string(inventory_selected_uuids, items); + int folders_count = 0; + std::set::const_iterator it = inventory_selected_uuids.begin(); + + //traverse through selected inventory items and count folders among them + for ( ; it != inventory_selected_uuids.end() && folders_count <=1 ; ++it) + { + LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); + if (NULL != inv_cat) + { + folders_count++; + } + } + + // EXP-1599 + // In case of sharing multiple folders, make the confirmation + // dialog contain a warning that only one folder can be shared at a time. + std::string notification = (folders_count > 1) ? "ShareFolderConfirmation" : "ShareItemsConfirmation"; LLSD substitutions; substitutions["RESIDENTS"] = residents; substitutions["ITEMS"] = items; LLShareInfo::instance().mAvatarNames = avatar_names; LLShareInfo::instance().mAvatarUuids = avatar_uuids; - LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, LLSD(), &give_inventory_cb); + LLNotificationsUtil::add(notification, substitutions, LLSD(), &give_inventory_cb); } } -- cgit v1.2.3 From 47425d67fe032804d8a10123cd1a7daf9bff84f7 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 13 Feb 2012 17:12:03 +0200 Subject: EXP-1882 FIXED Crashes when invoking avatar picker from mouse look mode. Fixing the cases missed in EXP-1879. --- indra/newview/llavataractions.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 9a7cdcfa21..f618af9536 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -738,6 +738,11 @@ void LLAvatarActions::shareWithAvatars() LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE); + if (!picker) + { + return; + } + picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable)); picker->openFriendsTab(); LLNotificationsUtil::add("ShareNotification"); -- cgit v1.2.3