From c8c125b774b926c7d487b11833ac0c83d6936bc2 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 17 Aug 2010 22:40:28 +0300 Subject: EXT-8564 FIXED Ability to take off wearables via "Wearing" Tab of My Outfits. Added Take Off / Detach options to the Wearing tab context menu. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/864/ --HG-- branch : product-engine --- indra/newview/llpanelwearing.cpp | 51 +++++++++++++++++++++- .../skins/default/xui/en/menu_wearing_tab.xml | 18 ++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index b8852890ad..fd7ca39c72 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -87,9 +87,58 @@ protected: { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); + registrar.add("Wearing.Edit", boost::bind(&edit_outfit)); + registrar.add("Wearing.TakeOff", boost::bind(handleMultiple, take_off, mUUIDs)); + registrar.add("Wearing.Detach", boost::bind(handleMultiple, take_off, mUUIDs)); + + LLContextMenu* menu = createFromFile("menu_wearing_tab.xml"); + + updateMenuItemsVisibility(menu); - return createFromFile("menu_wearing_tab.xml"); + return menu; + } + + void updateMenuItemsVisibility(LLContextMenu* menu) + { + bool bp_selected = false; // true if body parts selected + bool clothes_selected = false; + bool attachments_selected = false; + + // See what types of wearables are selected. + for (uuid_vec_t::const_iterator it = mUUIDs.begin(); it != mUUIDs.end(); ++it) + { + LLViewerInventoryItem* item = gInventory.getItem(*it); + + if (!item) + { + llwarns << "Invalid item" << llendl; + continue; + } + + LLAssetType::EType type = item->getType(); + if (type == LLAssetType::AT_CLOTHING) + { + clothes_selected = true; + } + else if (type == LLAssetType::AT_BODYPART) + { + bp_selected = true; + } + else if (type == LLAssetType::AT_OBJECT) + { + attachments_selected = true; + } + } + + // Enable/disable some menu items depending on the selection. + bool allow_detach = !bp_selected && !clothes_selected && attachments_selected; + bool allow_take_off = !bp_selected && clothes_selected && !attachments_selected; + + menu->setItemVisible("take_off", allow_take_off); + menu->setItemVisible("detach", allow_detach); + menu->setItemVisible("edit_outfit_separator", allow_take_off || allow_detach); } }; diff --git a/indra/newview/skins/default/xui/en/menu_wearing_tab.xml b/indra/newview/skins/default/xui/en/menu_wearing_tab.xml index 85505f9972..2d54e69601 100644 --- a/indra/newview/skins/default/xui/en/menu_wearing_tab.xml +++ b/indra/newview/skins/default/xui/en/menu_wearing_tab.xml @@ -2,6 +2,24 @@ + + + + + + + Date: Wed, 18 Aug 2010 12:10:25 +0300 Subject: EXT-7951 FIXED (Mini-Location panel appearance design issues: Replaced dark icons with light ones) - Replaced dark icons with light ones Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/858/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_topinfo_bar.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml index d8f4297e0c..30d3064e14 100644 --- a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml @@ -36,7 +36,7 @@ enabled="true" follows="right|top" height="18" - image_name="Parcel_VoiceNo_Light" + image_name="Parcel_VoiceNo_Dark" name="voice_icon" top="1" visible="false" @@ -45,7 +45,7 @@ Date: Thu, 19 Aug 2010 15:09:07 +0300 Subject: EXT-8635 FIXED Replaced "no matches found" with "Loading..." in the My Outfits tab. Set no items text to "Loading..." when creating the wearable items list and to "There are no items in this outfit" when category is complete. "Outhfit" is there, because wearable items list nay be empty only for them. This string was introduced, because the only situation when there are no items shown in outfit tab is for empty outfit- because even when applying filter either all items from outfit will be shown or outfit tab won't be shown at all. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/865/ --HG-- branch : product-engine --- indra/newview/llwearableitemslist.cpp | 6 ++++++ indra/newview/skins/default/xui/en/strings.xml | 2 ++ 2 files changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index abe629ffe4..9f7ea68e87 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -636,6 +636,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); } mWornIndicationEnabled = p.worn_indication_enabled; + setNoItemsCommentText(LLTrans::getString("LoadingData")); } // virtual @@ -677,6 +678,11 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) LLInventoryModel::EXCLUDE_TRASH, collector); + if(item_array.empty() && gInventory.isCategoryComplete(category_id)) + { + setNoItemsCommentText(LLTrans::getString("EmptyOutfitText")); + } + refreshList(item_array); } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 04d8c53d97..676bef2d0b 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3265,4 +3265,6 @@ Abuse Report Delete selected items? Delete selected item? + There are no items in this outfit + -- cgit v1.2.3 From b091125a0e53bef47bd968be78b55150807595ed Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 19 Aug 2010 15:11:37 +0300 Subject: EXT-8658 FIXED Made only online participants of Adhoc chat to be shown shown in Recent Tab. Used previously commented code which adds only online paricipants instead of current code that added all. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/860/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cd35ec5d39..41e505cc58 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1021,19 +1021,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if (is_not_group_id) { - -#if 0 - //use this code to add only online members - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); - LLSpeakerMgr::speaker_list_t speaker_list; - speaker_mgr->getSpeakerList(&speaker_list, true); - for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) - { - const LLPointer& speakerp = *it; - - LLRecentPeople::instance().add(speakerp->mID); - } -#else LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(im_session_id); if( session == 0)//??? shouldn't really happen { @@ -1048,16 +1035,20 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; - // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. - for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); - it!=session->mInitialTargetIDs.end();++it) + // Add only online members to recent (EXT-8658) + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); + LLSpeakerMgr::speaker_list_t speaker_list; + if(speaker_mgr != NULL) + { + speaker_mgr->getSpeakerList(&speaker_list, true); + } + for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { - const LLUUID id = *it; + const LLPointer& speakerp = *it; - LLRecentPeople::instance().add(id); + LLRecentPeople::instance().add(speakerp->mID); } } -#endif } -- cgit v1.2.3