diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-16 11:02:45 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-16 11:02:45 +0100 |
commit | 9ee5a62332353db6a098628e69732d2723cc5deb (patch) | |
tree | 1da5e469f275f0f708e8efef600028d758fa8dd5 | |
parent | 594d2618aab8ce8365e7939e8e6d69c92e451493 (diff) | |
parent | 46ebc6d37389f6cbc27262ca7d1817a7215d4d9f (diff) |
merge from PE's viewer-release
-rw-r--r-- | indra/llui/llaccordionctrl.cpp | 18 | ||||
-rw-r--r-- | indra/llui/llaccordionctrl.h | 7 | ||||
-rw-r--r-- | indra/llui/llaccordionctrltab.h | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 376 | ||||
-rw-r--r-- | indra/newview/llcofwearables.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llcofwearables.h | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterinventory.h | 1 | ||||
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 32 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 3 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 102 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.h | 1 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_script_debug_panel.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_outfit_gear.xml | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_wearable_list_item.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_edit.xml | 26 |
18 files changed, 602 insertions, 41 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index fc93793ed8..3a1e9f19fa 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -826,6 +826,24 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string) mNoVisibleTabsHelpText->setValue(text); } +const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const +{ + typedef std::vector<LLAccordionCtrlTab*>::const_iterator tabs_const_iterator; + + const LLAccordionCtrlTab* result = 0; + + for (tabs_const_iterator i = mAccordionTabs.begin(); i != mAccordionTabs.end(); ++i) + { + if ((*i)->isExpanded()) + { + result = *i; + break; + } + } + + return result; +} + S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */) { if(tab_index < 0) diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index fc6f2d896c..677b598a32 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -129,6 +129,13 @@ public: */ void setFilterSubString(const std::string& filter_string); + /** + * This method returns the first expanded accordion tab. + * It is expected to be called for accordion which doesn't allow multiple + * tabs to be expanded. Use with care. + */ + const LLAccordionCtrlTab* getExpandedTab() const; + private: void initNoTabsWidget(const LLTextBox::Params& tb_params); void updateNoTabsHelpTextVisibility(); diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 19d4ec0a1c..7bf7eeef8f 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -171,7 +171,7 @@ public: virtual bool addChild(LLView* child, S32 tab_group); - bool isExpanded() { return mDisplayChildren; } + bool isExpanded() const { return mDisplayChildren; } S32 getHeaderHeight(); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bc6e030c91..5b70e4bcb0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4678,7 +4678,381 @@ <string>String</string> <key>Value</key> <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> - </map> + </map> + <key>MarketplaceURL_objectFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Attachments Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/attachments</string> + </map> + <key>MarketplaceURL_objectMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Attachments Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/attachments</string> + </map> + <key>MarketplaceURL_clothingFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Clothing Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/clothing_female_avatar</string> + </map> + <key>MarketplaceURL_clothingMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Clothing Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/clothing_male_avatar</string> + </map> + <key>MarketplaceURL_bodypartFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Bodyparts Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> + </map> + <key>MarketplaceURL_bodypartMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Bodyparts Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> + </map> + <key>MarketplaceURL_glovesMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Gloves Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string> + </map> + <key>MarketplaceURL_glovesFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Gloves Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string> + </map> + <key>MarketplaceURL_jacketFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Jacket Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/jacket_womens</string> + </map> + <key>MarketplaceURL_jacketMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Jacket Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/jacket_mens</string> + </map> + <key>MarketplaceURL_shirtFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shirt Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shirt_womens</string> + </map> + <key>MarketplaceURL_shirtMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shirt Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shirt_mens</string> + </map> + <key>MarketplaceURL_undershirtFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Undershirt Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/undershirt_womens</string> + </map> + <key>MarketplaceURL_undershirtMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Undershirt Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/undershirt_mens</string> + </map> + <key>MarketplaceURL_skirtFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skirt Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string> + </map> + <key>MarketplaceURL_skirtMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skirt Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string> + </map> + <key>MarketplaceURL_pantsFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Pants Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/pants_women</string> + </map> + <key>MarketplaceURL_pantsMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Pants Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/pants_men</string> + </map> + <key>MarketplaceURL_underpantsFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Underwear Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/underwear_women</string> + </map> + <key>MarketplaceURL_underpantsMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Underwear Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/underwear_men</string> + </map> + <key>MarketplaceURL_shoesFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shoes Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shoes_women</string> + </map> + <key>MarketplaceURL_shoesMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shoes Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/shoes_men</string> + </map> + <key>MarketplaceURL_socksFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Socks Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/socks_women</string> + </map> + <key>MarketplaceURL_socksMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Socks Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/socks_women</string> + </map> + <key>MarketplaceURL_tattooMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Tattoo Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string> + </map> + <key>MarketplaceURL_tattooFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Tattoo Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string> + </map> + <key>MarketplaceURL_hairFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Hair Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_hair</string> + </map> + <key>MarketplaceURL_hairMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Hair Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_hair</string> + </map> + <key>MarketplaceURL_eyesFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Eyes Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_eyes</string> + </map> + <key>MarketplaceURL_eyesMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Eyes Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_eyes</string> + </map> + <key>MarketplaceURL_shapeFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shape Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_shape</string> + </map> + <key>MarketplaceURL_shapeMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Shape Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_shape</string> + </map> + <key>MarketplaceURL_skinFemale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skin Female</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_skin</string> + </map> + <key>MarketplaceURL_skinMale</key> + <map> + <key>Comment</key> + <string>URL to the Marketplace Skins Male</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_skin</string> + </map> <key>MaxDragDistance</key> <map> <key>Comment</key> diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 611396b0e5..880d79222b 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -34,6 +34,8 @@ #include "llcofwearables.h" +#include "llaccordionctrl.h" +#include "llaccordionctrltab.h" #include "llagentdata.h" #include "llagentwearables.h" #include "llappearancemgr.h" @@ -557,6 +559,14 @@ LLPanel* LLCOFWearables::getSelectedItem() return mLastSelectedList->getSelectedItem(); } +void LLCOFWearables::getSelectedItems(std::vector<LLPanel*>& selected_items) const +{ + if (mLastSelectedList) + { + mLastSelectedList->getSelectedItems(selected_items); + } +} + void LLCOFWearables::clear() { mAttachments->clear(); @@ -564,6 +574,29 @@ void LLCOFWearables::clear() mBodyParts->clear(); } +LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType() +{ + static std::map<std::string, LLAssetType::EType> type_map; + static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion"); + + if (type_map.empty()) + { + type_map["tab_clothing"] = LLAssetType::AT_CLOTHING; + type_map["tab_attachments"] = LLAssetType::AT_OBJECT; + type_map["tab_body_parts"] = LLAssetType::AT_BODYPART; + } + + const LLAccordionCtrlTab* tab = accordion_ctrl->getExpandedTab(); + + if (!tab) + { + llwarns << "No accordion is expanded" << llendl; + return LLAssetType::AT_NONE; + } + + return type_map[tab->getName()]; +} + void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu) { if(menu) diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index f99f2662e6..62f4cfc692 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -78,10 +78,13 @@ public: bool getSelectedUUIDs(uuid_vec_t& selected_ids); LLPanel* getSelectedItem(); + void getSelectedItems(std::vector<LLPanel*>& selected_items) const; void refresh(); void clear(); + LLAssetType::EType getExpandedAccordionAssetType(); + LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; } protected: diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index 473d2b189d..dc719bdafe 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -66,6 +66,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getPanel(); + LLPanelMainInventory* getMainInventoryPanel() { return mPanelMainInventory;} private: LLPanelMainInventory* mPanelMainInventory; }; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c86d463a08..68fc86467c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -52,6 +52,7 @@ #include "llappearancemgr.h" #include "llappviewer.h" //#include "llfirstuse.h" +#include "llfloaterinventory.h" #include "llfocusmgr.h" #include "llfolderview.h" #include "llgesturemgr.h" @@ -63,6 +64,7 @@ #include "llinventorypanel.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llpanelmaininventory.h" #include "llpreviewanim.h" #include "llpreviewgesture.h" #include "llpreviewnotecard.h" @@ -74,6 +76,7 @@ #include "llscrollcontainer.h" #include "llselectmgr.h" #include "llsidetray.h" +#include "llsidepanelinventory.h" #include "lltabcontainer.h" #include "lltooldraganddrop.h" #include "lluictrlfactory.h" @@ -332,9 +335,38 @@ void show_item_profile(const LLUUID& item_uuid) void show_item_original(const LLUUID& item_uuid) { + bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory"); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); if (!active_panel) return; active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); + + if(reset_inventory_filter) + { + LLSidepanelInventory *sidepanel_inventory = + dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + if(sidepanel_inventory) + { + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + + main_inventory->onFilterEdit(""); + } + + //now for inventory floater + + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) + { + LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter); + if (floater_inventory) + { + LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); + + main_inventory->onFilterEdit(""); + } + } + + } } ///---------------------------------------------------------------------------- diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 5a068373f5..82b72ac224 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -84,6 +84,7 @@ public: void setSelectCallback(const LLFolderView::signal_t::slot_type& cb); + void onFilterEdit(const std::string& search_string ); protected: // // Misc functions @@ -98,7 +99,7 @@ protected: void onClearSearch(); static void onFoldersByName(void *user_data); static BOOL checkFoldersByName(void *user_data); - void onFilterEdit(const std::string& search_string ); + static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward); void onFilterSelected(); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 1454a2f6af..8da7432e0a 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -72,6 +72,8 @@ #include "lltoggleablemenu.h" #include "llwearablelist.h" #include "llwearableitemslist.h" +#include "llwearabletype.h" +#include "llweb.h" static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit"); @@ -81,6 +83,65 @@ const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK; static const std::string REVERT_BTN("revert_btn"); +class LLShopURLDispatcher +{ +public: + std::string resolveURL(LLWearableType::EType wearable_type, ESex sex); + std::string resolveURL(LLAssetType::EType asset_type, ESex sex); +}; + +std::string LLShopURLDispatcher::resolveURL(LLWearableType::EType wearable_type, ESex sex) +{ + const std::string prefix = "MarketplaceURL"; + const std::string sex_str = (sex == SEX_MALE) ? "Male" : "Female"; + const std::string type_str = LLWearableType::getTypeName(wearable_type); + + std::string setting_name = prefix; + + switch (wearable_type) + { + case LLWearableType::WT_ALPHA: + case LLWearableType::WT_NONE: + case LLWearableType::WT_INVALID: // just in case, this shouldn't happen + case LLWearableType::WT_COUNT: // just in case, this shouldn't happen + break; + + default: + setting_name += '_'; + setting_name += type_str; + setting_name += sex_str; + break; + } + + return gSavedSettings.getString(setting_name); +} + +std::string LLShopURLDispatcher::resolveURL(LLAssetType::EType asset_type, ESex sex) +{ + const std::string prefix = "MarketplaceURL"; + const std::string sex_str = (sex == SEX_MALE) ? "Male" : "Female"; + const std::string type_str = LLAssetType::lookup(asset_type); + + std::string setting_name = prefix; + + switch (asset_type) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_OBJECT: + case LLAssetType::AT_BODYPART: + setting_name += '_'; + setting_name += type_str; + setting_name += sex_str; + break; + + // to suppress warnings + default: + break; + } + + return gSavedSettings.getString(setting_name); +} + class LLPanelOutfitEditGearMenu { public: @@ -262,6 +323,7 @@ BOOL LLPanelOutfitEdit::postBuild() childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesListView, this), NULL); childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); childSetCommitCallback("gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); + childSetCommitCallback("shop_btn", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); @@ -530,6 +592,46 @@ void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id } } +void LLPanelOutfitEdit::onShopButtonClicked() +{ + static LLShopURLDispatcher url_resolver; + + std::string url; + std::vector<LLPanel*> selected_items; + mCOFWearables->getSelectedItems(selected_items); + + ESex sex = gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE; + + if (selected_items.size() == 1) + { + LLWearableType::EType type = LLWearableType::WT_NONE; + LLPanel* item = selected_items.front(); + + // LLPanelDummyClothingListItem is lower then LLPanelInventoryListItemBase in hierarchy tree + if (LLPanelDummyClothingListItem* dummy_item = dynamic_cast<LLPanelDummyClothingListItem*>(item)) + { + type = dummy_item->getWearableType(); + } + else if (LLPanelInventoryListItemBase* real_item = dynamic_cast<LLPanelInventoryListItemBase*>(item)) + { + type = real_item->getWearableType(); + } + + // WT_INVALID comes for attachments + if (type != LLWearableType::WT_INVALID) + { + url = url_resolver.resolveURL(type, sex); + } + } + + if (url.empty()) + { + url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex); + } + + LLWeb::loadURLExternal(url); +} + void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) { LLUUID id_to_remove = mCOFWearables->getSelectedUUID(); diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 56c6c6d680..1705e3043b 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -163,6 +163,7 @@ public: void onEditWearableClicked(void); void onAddWearableClicked(void); void onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id); + void onShopButtonClicked(); void displayCurrentOutfit(); void updateCurrentOutfitName(); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5563214407..7e1bff0961 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -86,7 +86,6 @@ public: registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); - registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); @@ -159,15 +158,6 @@ private: } } - void onRename() - { - const LLUUID& selected_outfit_id = getSelectedOutfitID(); - if (selected_outfit_id.notNull()) - { - LLAppearanceMgr::instance().renameOutfit(selected_outfit_id); - } - } - void onDelete() { const LLUUID& selected_outfit_id = getSelectedOutfitID(); @@ -197,11 +187,7 @@ private: return false; } - if ("rename" == param) - { - return get_is_category_renameable(&gInventory, selected_outfit_id); - } - else if ("delete" == param) + if ("delete" == param) { return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 2dc17e741d..a038f99853 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -51,6 +51,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any. + LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; } BOOL isMainInventoryPanelActive() const; protected: diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml index e94af2c8d5..d1db5c17ba 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml @@ -18,6 +18,7 @@ max_length="2147483647" name="Chat History Editor" parse_highlights="true" + read_only="true" width="420" word_wrap="true" /> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index 8e7ef7f0b5..16b33eff89 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -176,19 +176,6 @@ <menu_item_separator name="sepatator2" /> <menu_item_call - label="Rename Outfit" - layout="topleft" - name="rename"> - <on_click - function="Gear.Rename" /> - <on_enable - function="Gear.OnEnable" - parameter="rename" /> - <on_visible - function="Gear.OnVisible" - parameter="rename" /> - </menu_item_call> - <menu_item_call label="Delete Outfit" layout="topleft" name="delete_outfit"> diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index 430a7b6444..efea2ae3e8 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -2,7 +2,7 @@ <context_menu name="Outfit Wearable Context Menu"> <menu_item_call - label="Wear" + label="Replace" layout="topleft" name="wear"> <on_click diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index e4eb9afb29..e894fc8fb8 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -95,7 +95,8 @@ background_visible="true" name="group_accordions" follows="all" layout="topleft" - auto_resize="true"> + auto_resize="true" + width="313"> <accordion left="0" top="0" @@ -103,7 +104,8 @@ background_visible="true" fit_parent="true" follows="all" layout="topleft" - name="groups_accordion"> + name="groups_accordion" + width="313"> <accordion_tab expanded="true" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index ed3b176267..03a0c464d2 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -144,7 +144,7 @@ Required height for dragbar (icon in spec) is 10, so resizebar height should be It is calculated as border_size + 2*UIResizeBarOverlap --> <layout_stack - animate="false" + animate="true" border_size="8" clip="false" default_tab_group="2" @@ -284,7 +284,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap bg_alpha_color="DkGray2" auto_resize="true" default_tab_group="3" - height="211" + height="450" min_height="210" name="add_wearables_panel" width="313" @@ -307,7 +307,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap background_visible="false" border="false" follows="left|top|right|bottom" - height="203" + height="442" layout="topleft" left="0" mouse_opaque="false" @@ -322,7 +322,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap layout="topleft" follows="left|top|right|bottom" border="false" - height="210" + height="449" left="0" mouse_opaque="false" width="310" @@ -336,7 +336,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap follows="all" multi_select="true" width="310" - height="210" + height="449" left="0" top="0"/> </panel> @@ -375,7 +375,19 @@ It is calculated as border_size + 2*UIResizeBarOverlap layout="topleft" left_pad="1" name="dummy_right_icon" - width="281" /> + width="246" /> + <button + follows="bottom|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="0" + name="shop_btn" + top="1" + width="31" /> </panel> @@ -490,7 +502,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap follows="bottom|left|right" height="23" left_pad="12" - label="Revert" + label="Undo Changes" layout="topleft" name="revert_btn" top="0" |