diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-19 09:13:05 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-19 09:13:05 +0100 |
commit | bfdfff3f0743550a8f8b42e8959df909c200a073 (patch) | |
tree | 277dc5b477cad2804b5bcfc0ab091a4378ea5b0b | |
parent | b36abda510c3d48d95199c0ce810d2cb9c223644 (diff) | |
parent | 053fa9dc9a0ed2cedaa33b1aee4615adc04e909d (diff) |
merge from PE's viewer-public
-rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llaccordionctrltab.h | 2 | ||||
-rw-r--r-- | indra/newview/llcofwearables.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llexpandabletextbox.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_event.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_landmark_info.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_my_profile.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_pick_list_item.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_place_profile.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_profile.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/expandable_text.xml | 1 |
15 files changed, 18 insertions, 22 deletions
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<LLAccordionCtrlTabHeader>(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<LLAccordionCtrlTabHeader>(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; 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<LLPanelOutfitEdit*>(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/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/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<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("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() 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(); 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.</expandable_text> </layout_panel> 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 4eb7943746..40cb7c7f4b 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 0e36945f07..c6e93af50a 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 a8520c235c..c6331ec87b 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 @@ parse_urls="true" allow_scroll="true" bg_visible="false" - label="More" follows="left|top|right" name="text" read_only="true" |