From 0e0fa7400450ec48ce6b59c8c8e0c4001e818fbd Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Tue, 10 Nov 2009 13:24:37 -0800 Subject: added newline at end of lluictrlfactory.cpp --- indra/llui/lluictrlfactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 8ab015f2bb..adfbb41feb 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -454,4 +454,4 @@ const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_ty void LLUICtrlFactory::connect(LLView* parent, LLView* child) { parent->addChild(child); -} \ No newline at end of file +} -- cgit v1.2.3 From f8ba8b09a65357e037f64b97919c0f4f9a9b90b0 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 11 Nov 2009 11:26:19 -0800 Subject: merge --- indra/llui/llpanel.cpp | 2 ++ indra/newview/llnetmap.cpp | 4 +--- indra/newview/llsidetray.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 07c0f3ce84..89c4656297 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -512,6 +512,8 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu // add children using dimensions from referenced xml for consistent layout setShape(params.rect); LLUICtrlFactory::createChildren(this, referenced_xml, child_registry_t::instance()); + + setXMLFilename(xml_filename); } // ask LLUICtrlFactory for filename, since xml_filename might be empty diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 4286582cdc..6145588df2 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -155,11 +155,9 @@ void LLNetMap::draw() F32 rotation = 0; { - LLGLEnable scissor(GL_SCISSOR_TEST); - + LLLocalClipRect clip(getLocalRect()); { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLLocalClipRect clip(getLocalRect()); glMatrixMode(GL_MODELVIEW); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 061587f11b..c3da246039 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -101,6 +101,7 @@ LLSideTray* LLSideTray::getInstance() if (!sInstance) { sInstance = LLUICtrlFactory::createFromFile("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance()); + sInstance->setXMLFilename("panel_side_tray.xml"); } return sInstance; -- cgit v1.2.3 From 061b8d3aa659ad27cf6a5ff0ac3597036bfd8cf5 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 18 Nov 2009 17:58:09 -0500 Subject: EXT-1916 : Places: Landmarks are not sorted in the Favorites Bar Accordion --- indra/newview/llfolderviewitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 7323c421da..a1260d1156 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2498,11 +2498,13 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde { static const LLUUID& favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + static const LLUUID& landmarks_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); LLUUID a_uuid = a->getParentFolder()->getListener()->getUUID(); LLUUID b_uuid = b->getParentFolder()->getListener()->getUUID(); - if (a_uuid == favorites_folder_id && b_uuid == favorites_folder_id) + if ((a_uuid == favorites_folder_id && b_uuid == favorites_folder_id) || + (a_uuid == landmarks_folder_id && b_uuid == landmarks_folder_id)) { // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem // or to LLInvFVBridge -- cgit v1.2.3 From 5b2c91598dffe7d5c9d676dd866f438d3adb9989 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 18 Nov 2009 21:07:49 -0500 Subject: EXT-2636 : No "fetching inventory" or other indication that inventory is loading. --- indra/newview/llfloaterinventory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 92778510e7..db38fc0fb3 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -64,10 +64,7 @@ BOOL LLFloaterInventory::postBuild() void LLFloaterInventory::draw() { - if (LLInventoryModel::isEverythingFetched()) - { - updateTitle(); - } + updateTitle(); LLFloater::draw(); } @@ -85,10 +82,14 @@ void LLFloaterInventory::updateTitle() { setTitle(getString("TitleFetching", string_args)); } - else + else if (LLInventoryModel::isEverythingFetched()) { setTitle(getString("TitleCompleted", string_args)); } + else + { + setTitle(getString("Title")); + } } void LLFloaterInventory::changed(U32 mask) -- cgit v1.2.3 From 3e46ee6274d04d91657da92953b167fe94eb7f59 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 19 Nov 2009 14:22:08 +0000 Subject: Fix "Global Illumintation" typo in the menu text which was bugging me. --- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 077667a3fc..8ab5fb1659 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2464,7 +2464,7 @@ function="Advanced.EnableRenderDeferred" /> Date: Thu, 19 Nov 2009 12:06:26 -0500 Subject: EXT-2562 : Somehow show cnotents of what I'm wearing Added appearanceSP button to toggle folder closed/open state. Also fixed up some bugs with current outfit title placement in appearanceSP.xml Also added a generic call for getting the current outfit folder link --- indra/newview/llappearancemgr.cpp | 43 +++++++++++- indra/newview/llappearancemgr.h | 3 + indra/newview/llsidepanelappearance.cpp | 76 ++++++++++++---------- indra/newview/llsidepanelappearance.h | 7 +- .../skins/default/xui/en/sidepanel_appearance.xml | 35 ++++++---- 5 files changed, 112 insertions(+), 52 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d6265a85f6..1050deaa27 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -363,6 +363,35 @@ LLUUID LLAppearanceManager::getCOF() return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); } + +const LLViewerInventoryItem* LLAppearanceManager::getCurrentOutfitLink() +{ + const LLUUID& current_outfit_cat = getCOF(); + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + // Can't search on FT_OUTFIT since links to categories return FT_CATEGORY for type since they don't + // return preferred type. + LLIsType is_category( LLAssetType::AT_CATEGORY ); + gInventory.collectDescendentsIf(current_outfit_cat, + cat_array, + item_array, + false, + is_category, + false); + for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); + iter != item_array.end(); + iter++) + { + const LLViewerInventoryItem *item = (*iter); + const LLViewerInventoryCategory *cat = item->getLinkedCategory(); + if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT) + { + return item; + } + } + return NULL; +} + // Update appearance from outfit folder. void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, bool append) { @@ -531,20 +560,28 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) linkAll(cof, gest_items, link_waiter); // Add link to outfit if category is an outfit. - LLViewerInventoryCategory* catp = gInventory.getCategory(category); + const LLViewerInventoryCategory* catp = gInventory.getCategory(category); + LLSidepanelAppearance* panel_appearance = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (!append && catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) { link_inventory_item(gAgent.getID(), category, cof, catp->getName(), LLAssetType::AT_LINK_FOLDER, link_waiter); // Update the current outfit name of the appearance sidepanel. - LLSidepanelAppearance* panel_appearance = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); if (panel_appearance) { panel_appearance->refreshCurrentOutfitName(catp->getName()); } } - + else + { + // Update the current outfit name of the appearance sidepanel. + if (panel_appearance) + { + panel_appearance->refreshCurrentOutfitName(); + } + } } void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 5daa6d067b..7038d1a35b 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -61,6 +61,9 @@ public: // Find the Current Outfit folder. LLUUID getCOF(); + // Finds the folder link to the currently worn outfit + const LLViewerInventoryItem *getCurrentOutfitLink(); + void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); // For debugging - could be moved elsewhere. diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index aeab3e2876..0f8e86cb3c 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -34,9 +34,12 @@ #include "llagent.h" #include "llagentwearables.h" +#include "llappearancemgr.h" +#include "llinventorypanel.h" #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" +#include "llfoldervieweventlistener.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" #include "lltextbox.h" @@ -68,7 +71,7 @@ LLSidepanelAppearance::LLSidepanelAppearance() : mFilterSubString(LLStringUtil::null), mFilterEditor(NULL), mLookInfo(NULL), - mCurrLookPanel(NULL) + mCurrOutfitPanel(NULL) { //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_appearance.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() mFetchWorn = new LLCurrentlyWornFetchObserver(this); @@ -81,6 +84,9 @@ LLSidepanelAppearance::~LLSidepanelAppearance() // virtual BOOL LLSidepanelAppearance::postBuild() { + mOpenOutfitBtn = getChild("openoutfit_btn"); + mOpenOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onOpenOutfitButtonClicked, this)); + mEditAppearanceBtn = getChild("editappearance_btn"); mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this)); @@ -90,11 +96,9 @@ BOOL LLSidepanelAppearance::postBuild() mEditBtn = getChild("edit_btn"); mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); - mNewLookBtn = getChild("newlook_btn"); - mNewLookBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onNewOutfitButtonClicked, this)); - mNewLookBtn->setEnabled(false); - - mOverflowBtn = getChild("overflow_btn"); + mNewOutfitBtn = getChild("newlook_btn"); + mNewOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onNewOutfitButtonClicked, this)); + mNewOutfitBtn->setEnabled(false); mFilterEditor = getChild("Filter"); if (mFilterEditor) @@ -114,8 +118,6 @@ BOOL LLSidepanelAppearance::postBuild() back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onBackButtonClicked, this)); } - // *TODO: Assign the action to an appropriate event. - // mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::toggleMediaPanel, this)); } mEditWearable = dynamic_cast(getChild("panel_edit_wearable")); @@ -130,7 +132,7 @@ BOOL LLSidepanelAppearance::postBuild() mCurrentLookName = getChild("currentlook_name"); - mCurrLookPanel = getChild("panel_currentlook"); + mCurrOutfitPanel = getChild("panel_currentlook"); return TRUE; } @@ -179,6 +181,27 @@ void LLSidepanelAppearance::onWearButtonClicked() } } +void LLSidepanelAppearance::onOpenOutfitButtonClicked() +{ + const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getCurrentOutfitLink(); + if (!outfit_link) + return; + if (!outfit_link->getIsLinkType()) + return; + LLInventoryPanel *inventory_panel = mPanelOutfitsInventory->getActivePanel(); + if (inventory_panel) + { + LLFolderView *folder = inventory_panel->getRootFolder(); + LLFolderViewItem *outfit_folder = folder->getItemByID(outfit_link->getLinkedUUID()); + if (outfit_folder) + { + outfit_folder->setOpen(!outfit_folder->isOpen()); + folder->setSelectionFromRoot(outfit_folder,TRUE); + folder->scrollToShowSelection(); + } + } +} + void LLSidepanelAppearance::onEditAppearanceButtonClicked() { if (gAgentWearables.areWearablesLoaded()) @@ -231,9 +254,8 @@ void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible) mFilterEditor->setVisible(!visible); mWearBtn->setVisible(!visible); mEditBtn->setVisible(!visible); - mNewLookBtn->setVisible(!visible); - mOverflowBtn->setVisible(!visible); - mCurrLookPanel->setVisible(!visible); + mNewOutfitBtn->setVisible(!visible); + mCurrOutfitPanel->setVisible(!visible); } void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable) @@ -255,7 +277,6 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we void LLSidepanelAppearance::updateVerbs() { bool is_look_info_visible = mLookInfo->getVisible(); - mOverflowBtn->setEnabled(false); if (!is_look_info_visible) { @@ -274,35 +295,24 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string name) { if (name == "") { - const LLUUID current_outfit_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t item_array; - // Can't search on AT_OUTFIT since links to categories return AT_CATEGORY for type since they don't - // return preferred type. - LLIsType is_category( LLAssetType::AT_CATEGORY ); - gInventory.collectDescendentsIf(current_outfit_cat, - cat_array, - item_array, - false, - is_category, - false); - for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); - iter != item_array.end(); - iter++) + const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getCurrentOutfitLink(); + if (outfit_link) { - const LLViewerInventoryItem *item = (*iter); - const LLViewerInventoryCategory *cat = item->getLinkedCategory(); + const LLViewerInventoryCategory *cat = outfit_link->getLinkedCategory(); if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT) { mCurrentLookName->setText(cat->getName()); return; } } - mCurrentLookName->setText(std::string("")); + mCurrentLookName->setText(getString("No Outfit")); + mOpenOutfitBtn->setEnabled(FALSE); } else { mCurrentLookName->setText(name); + // Can't just call update verbs since the folder link may not have been created yet. + mOpenOutfitBtn->setEnabled(TRUE); } } @@ -319,7 +329,7 @@ void LLSidepanelAppearance::editWearable(LLWearable *wearable, void *data) void LLSidepanelAppearance::fetchInventory() { - mNewLookBtn->setEnabled(false); + mNewOutfitBtn->setEnabled(false); LLInventoryFetchObserver::item_ref_t ids; LLUUID item_id; for(S32 type = (S32)WT_SHAPE; type < (S32)WT_COUNT; ++type) @@ -368,5 +378,5 @@ void LLSidepanelAppearance::fetchInventory() void LLSidepanelAppearance::inventoryFetched() { - mNewLookBtn->setEnabled(true); + mNewOutfitBtn->setEnabled(true); } diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 496a1fef72..b335fd910d 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -64,6 +64,7 @@ public: private: void onFilterEdit(const std::string& search_string); + void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); void onWearButtonClicked(); void onEditButtonClicked(); @@ -78,12 +79,12 @@ private: LLPanelLookInfo* mLookInfo; LLPanelEditWearable* mEditWearable; + LLButton* mOpenOutfitBtn; LLButton* mEditAppearanceBtn; LLButton* mWearBtn; LLButton* mEditBtn; - LLButton* mNewLookBtn; - LLButton* mOverflowBtn; - LLPanel* mCurrLookPanel; + LLButton* mNewOutfitBtn; + LLPanel* mCurrOutfitPanel; LLTextBox* mCurrentLookName; diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 2ce156cfda..14530518d8 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -9,9 +9,9 @@ min_width="240" name="appearance panel" width="333"> - + +