From c9430abf455c3282e60b96a6ca88d13d66a0cc82 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 15 Jul 2010 15:57:57 +0300 Subject: EXT-8284 FIXED ('Add More' panel items aren't sorted by clothing type after it was opened by 'Replace' item of context menu) - Set proper callback for 'Replace' clothing - Renamed onReplaceBodyPartMenuItemClicked to onReplaceMenuItemClicked because now this callback is used not only for Body Parts but for clothing also - Added argument 'const LLUUID& item_id' for 'static void replaceWearable()' to be able to call onReplaceMenuItemClicked with LLUUID argument Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/750/ --HG-- branch : product-engine --- indra/newview/llcofwearables.cpp | 8 ++++---- indra/newview/llpaneloutfitedit.cpp | 4 ++-- indra/newview/llpaneloutfitedit.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 86d9121213..45e144ca41 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -163,7 +163,7 @@ public: } protected: - static void replaceWearable() + static void replaceWearable(const LLUUID& item_id) { // *TODO: Most probable that accessing to LLPanelOutfitEdit instance should be: // LLSideTray::getInstance()->getSidepanelAppearance()->getPanelOutfitEdit() @@ -175,7 +175,7 @@ protected: "panel_outfit_edit")); if (panel_outfit_edit != NULL) { - panel_outfit_edit->showAddWearablesPanel(true); + panel_outfit_edit->onReplaceMenuItemClicked(item_id); } } @@ -187,7 +187,7 @@ protected: functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); registrar.add("Clothing.TakeOff", boost::bind(handleMultiple, take_off, mUUIDs)); - registrar.add("Clothing.Replace", boost::bind(replaceWearable)); + registrar.add("Clothing.Replace", boost::bind(replaceWearable, selected_id)); registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); registrar.add("Clothing.Create", boost::bind(&CofClothingContextMenu::createNew, this, selected_id)); @@ -244,7 +244,7 @@ protected: // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel(). // LLSideTray::getInstance()->getPanel() is rather slow variant LLPanelOutfitEdit* panel_oe = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); - registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked, panel_oe, selected_id)); + registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceMenuItemClicked, panel_oe, selected_id)); registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id)); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 5b2b7e0ffc..6d9465d422 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -746,11 +746,11 @@ void LLPanelOutfitEdit::onAddWearableClicked(void) } } -void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id) +void LLPanelOutfitEdit::onReplaceMenuItemClicked(LLUUID selected_item_id) { LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id); - if (item && item->getType() == LLAssetType::AT_BODYPART) + if (item) { showFilteredWearablesListView(item->getWearableType()); } diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index ff49e2075e..87d60d3b80 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -170,7 +170,7 @@ public: void onRemoveFromOutfitClicked(void); void onEditWearableClicked(void); void onAddWearableClicked(void); - void onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id); + void onReplaceMenuItemClicked(LLUUID selected_item_id); void onShopButtonClicked(); void displayCurrentOutfit(); -- cgit v1.2.3 From bc87b6078bdcd36aeca908f9369f11edf6c61447 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 16 Jul 2010 19:08:37 +0300 Subject: EXT-8258 FIXED Update the Trash button in 'My Inventory' if selected items get worn or taken off. Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/772/ --HG-- branch : product-engine --- indra/newview/llpanelmaininventory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 3e12f0ba9a..98cb88e751 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -45,6 +45,7 @@ #include "llinventorypanel.h" #include "llfiltereditor.h" #include "llfloaterreg.h" +#include "lloutfitobserver.h" #include "llpreviewtexture.h" #include "llresmgr.h" #include "llscrollcontainer.h" @@ -919,6 +920,9 @@ void LLPanelMainInventory::initListCommandsHandlers() mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + + // Update the trash button when selected item(s) get worn or taken off. + LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this)); } void LLPanelMainInventory::updateListCommands() -- cgit v1.2.3 From feab33f952446cf765e5c14f09289362b966eb56 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 16 Jul 2010 19:12:46 +0300 Subject: EXT-8365 FIXED Untranslated "More" link in the Residents Profiles. The default link label specified in widgets/expandable_text.xml didn't seem to be taken into account for translation. So I moved the label to strings.xml to make sure it's localized. Also I removed overridden textbox.label attribute values because VLT can't handle them. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/770/ --HG-- branch : product-engine --- indra/newview/llexpandabletextbox.cpp | 3 ++- indra/newview/skins/default/xui/en/floater_event.xml | 1 - indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml | 1 - indra/newview/skins/default/xui/en/panel_landmark_info.xml | 1 - indra/newview/skins/default/xui/en/panel_my_profile.xml | 3 --- indra/newview/skins/default/xui/en/panel_pick_list_item.xml | 1 - indra/newview/skins/default/xui/en/panel_place_profile.xml | 1 - indra/newview/skins/default/xui/en/panel_profile.xml | 3 --- indra/newview/skins/default/xui/en/widgets/expandable_text.xml | 1 - 9 files changed, 2 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 92fda31cc2..8ccc5fb248 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -34,6 +34,7 @@ #include "llexpandabletextbox.h" #include "llscrollcontainer.h" +#include "lltrans.h" #include "llwindow.h" #include "llviewerwindow.h" @@ -117,7 +118,7 @@ LLExpandableTextBox::LLTextBoxEx::Params::Params() LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) : LLTextEditor(p), - mExpanderLabel(p.label), + mExpanderLabel(p.label.isProvided() ? p.label : LLTrans::getString("More")), mExpanderVisible(false) { setIsChrome(TRUE); diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml index 887cedc33f..9864083442 100644 --- a/indra/newview/skins/default/xui/en/floater_event.xml +++ b/indra/newview/skins/default/xui/en/floater_event.xml @@ -244,7 +244,6 @@ layout="topleft" left="6" name="event_desc" - textbox.label="More" width="322"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml index af3315ebfe..996e28c575 100644 --- a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml @@ -65,7 +65,6 @@ left="103" name="description" textbox.max_length="1024" - textbox.label="More" textbox.show_context_menu="false" top_pad="0" width="178" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index a0a1e2963a..f5202382cc 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -139,7 +139,6 @@ layout="topleft" left="10" name="description" - textbox.label="More" top_pad="10" value="Du waltz die spritz" width="280" /> diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index 1083f4d467..0310391846 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -118,7 +118,6 @@ layout="topleft" left="107" textbox.max_length="512" - textbox.label="More" textbox.show_context_menu="true" name="sl_description_edit" top_pad="-3" @@ -174,7 +173,6 @@ layout="topleft" left="107" textbox.max_length="512" - textbox.label="More" textbox.show_context_menu="true" name="fl_description_edit" top_pad="-3" @@ -316,7 +314,6 @@ name="sl_groups" top_pad="0" translate="false" - textbox.label="More" textbox.show_context_menu="true" width="298" expanded_bg_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index 41651edaa0..715dc5f23c 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -65,7 +65,6 @@ left="103" name="picture_descr" textbox.max_length="1024" - textbox.label="More" textbox.show_context_menu="false" top_pad="0" width="178" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 35e8075896..cba4e0693a 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -293,7 +293,6 @@ layout="topleft" left="5" name="description" - textbox.label="More" top_pad="10" value="Du waltz die spritz" width="300" /> diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index fc33836c79..e41b80baf2 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -108,7 +108,6 @@ layout="topleft" left="107" textbox.max_length="512" - textbox.label="More" textbox.show_context_menu="true" name="sl_description_edit" top_pad="-3" @@ -155,7 +154,6 @@ layout="topleft" left="107" textbox.max_length="512" - textbox.label="More" textbox.show_context_menu="true" name="fl_description_edit" top_pad="-3" @@ -295,7 +293,6 @@ left="7" name="sl_groups" textbox.max_length="512" - textbox.label="More" textbox.show_context_menu="true" top_pad="0" translate="false" diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index 216c4dea95..46a681b697 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -5,7 +5,6 @@ allow_html="true" allow_scroll="true" bg_visible="false" - label="More" follows="left|top|right" name="text" read_only="true" -- cgit v1.2.3 From c7549513974bdf8028824135bd017c7ea390ea77 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 16 Jul 2010 19:03:13 +0300 Subject: EXT-8188 FIXED Added SelectionEnabled flag to fix accordion tab header highlighting. Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/735/. --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 5 +++-- indra/llui/llaccordionctrltab.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 37fc571bbd..0cccd4e6de 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -358,6 +358,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p) ,mPaddingBottom(p.padding_bottom) ,mCanOpenClose(true) ,mFitPanel(p.fit_panel) + ,mSelectionEnabled(p.selection_enabled) ,mContainerPanel(NULL) ,mScrollbar(NULL) { @@ -371,7 +372,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p) mHeader = LLUICtrlFactory::create(headerParams); addChild(mHeader, 1); - if (p.selection_enabled) + if (mSelectionEnabled) { LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this)); } @@ -797,7 +798,7 @@ void LLAccordionCtrlTab::showAndFocusHeader() { LLAccordionCtrlTabHeader* header = getChild(DD_HEADER_NAME); header->setFocus(true); - header->setSelected(true); + header->setSelected(mSelectionEnabled); LLRect screen_rc; LLRect selected_rc = header->getRect(); diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 5646a355d0..1344ce0a30 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -241,6 +241,8 @@ private: bool mStoredOpenCloseState; bool mWasStateStored; + bool mSelectionEnabled; + LLScrollbar* mScrollbar; LLView* mContainerPanel; -- cgit v1.2.3