summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llaccordionctrl.cpp25
-rw-r--r--indra/llui/llaccordionctrl.h1
-rw-r--r--indra/llui/llcheckboxctrl.cpp2
-rw-r--r--indra/llui/llfloater.cpp8
-rw-r--r--indra/llui/llfloater.h2
-rw-r--r--indra/newview/llappearancemgr.cpp16
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llavataractions.cpp5
-rw-r--r--indra/newview/llchathistory.cpp18
-rw-r--r--indra/newview/llcofwearables.cpp34
-rw-r--r--indra/newview/llcofwearables.h4
-rw-r--r--indra/newview/llfloaterland.cpp3
-rw-r--r--indra/newview/llmoveview.cpp10
-rw-r--r--indra/newview/llmoveview.h2
-rw-r--r--indra/newview/llpaneleditwearable.cpp38
-rw-r--r--indra/newview/llpaneleditwearable.h5
-rw-r--r--indra/newview/llpanelgroup.cpp12
-rw-r--r--indra/newview/llpanelgroup.h3
-rw-r--r--indra/newview/llpaneloutfitedit.cpp27
-rw-r--r--indra/newview/llpaneloutfitedit.h4
-rw-r--r--indra/newview/llpanelplaceprofile.cpp9
-rw-r--r--indra/newview/llpanelplaceprofile.h2
-rw-r--r--indra/newview/llsidepanelappearance.cpp21
-rw-r--r--indra/newview/llwearableitemslist.cpp84
-rw-r--r--indra/newview/llwearableitemslist.h73
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml13
-rw-r--r--indra/newview/skins/default/xui/fr/floater_water.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_windlight_options.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_nearby_media.xml2
31 files changed, 372 insertions, 63 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 673631f99a..2bc8ea054a 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -811,6 +811,31 @@ void LLAccordionCtrl::reset ()
mScrollbar->setDocPos(0);
}
+void LLAccordionCtrl::expandDefaultTab()
+{
+ if (mAccordionTabs.size() > 0)
+ {
+ LLAccordionCtrlTab* tab = mAccordionTabs.front();
+
+ if (!tab->getDisplayChildren())
+ {
+ tab->setDisplayChildren(true);
+ }
+
+ for (size_t i = 1; i < mAccordionTabs.size(); ++i)
+ {
+ tab = mAccordionTabs[i];
+
+ if (tab->getDisplayChildren())
+ {
+ tab->setDisplayChildren(false);
+ }
+ }
+
+ arrange();
+ }
+}
+
void LLAccordionCtrl::sort()
{
if (!mTabComparator)
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index b5fdf796cd..8241ee1518 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -122,6 +122,7 @@ public:
S32 notifyParent(const LLSD& info);
void reset ();
+ void expandDefaultTab();
void setComparator(const LLTabComparator* comp) { mTabComparator = comp; }
void sort();
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index 3d32157406..6f81f5434c 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -191,7 +191,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
const S32 FUDGE = 10;
- S32 text_width = mFont->getWidth( mLabel->getText() ) + FUDGE;
+ S32 text_width = mLabel->getTextBoundingRect().getWidth() + FUDGE;
S32 text_height = llround(mFont->getLineHeight());
LLRect label_rect;
label_rect.setOriginAndSize(
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 39a6855273..22d6f6ca52 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -451,6 +451,14 @@ void LLFloater::enableResizeCtrls(bool enable)
}
}
+void LLFloater::destroy()
+{
+ // LLFloaterReg should be synchronized with "dead" floater to avoid returning dead instance before
+ // it was deleted via LLMortician::updateClass(). See EXT-8458.
+ LLFloaterReg::removeInstance(mInstanceName, mKey);
+ die();
+}
+
// virtual
LLFloater::~LLFloater()
{
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 3ea035777c..42f422f91c 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -308,7 +308,7 @@ protected:
BOOL getAutoFocus() const { return mAutoFocus; }
LLDragHandle* getDragHandle() const { return mDragHandle; }
- void destroy() { die(); } // Don't call this directly. You probably want to call closeFloater()
+ void destroy(); // Don't call this directly. You probably want to call closeFloater()
virtual void onClickCloseBtn();
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index d2449abf08..5e0d49ac12 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2726,3 +2726,19 @@ BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
return FALSE;
*/
}
+
+void wear_multiple(const uuid_vec_t& ids, bool replace)
+{
+ LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
+
+ bool first = true;
+ uuid_vec_t::const_iterator it;
+ for (it = ids.begin(); it != ids.end(); ++it)
+ {
+ // if replace is requested, the first item worn will replace the current top
+ // item, and others will be added.
+ LLAppearanceMgr::instance().wearItemOnAvatar(*it,false,first && replace,cb);
+ first = false;
+ }
+}
+
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 84c911c038..a6cd129306 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -418,4 +418,6 @@ void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
}
}
+void wear_multiple(const uuid_vec_t& ids, bool replace);
+
#endif
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 296e3b7e86..58b651ec39 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -357,7 +357,7 @@ static void ui_audio_callback(const LLUUID& uuid)
bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
{
- if(!match || !base)
+ if(!match || !base || base->getPlainText())
return false;
LLUUID match_id = match->getID();
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 752a2e7504..1e59e5b805 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -550,9 +550,10 @@ namespace action_give_inventory
}
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
- if (NULL == active_panel)
+ if (!active_panel)
{
- return;
+ active_panel = get_outfit_editor_inventory_panel();
+ if (!active_panel) return;
}
const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index c0fa910f86..7c33923f04 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -111,6 +111,12 @@ public:
return pInstance;
}
+ ~LLChatHistoryHeader()
+ {
+ // Detach the info button so that it doesn't get destroyed (EXT-8463).
+ hideInfoCtrl();
+ }
+
BOOL handleMouseUp(S32 x, S32 y, MASK mask)
{
return LLPanel::handleMouseUp(x,y,mask);
@@ -382,8 +388,18 @@ protected:
if (!sInfoCtrl)
{
+ // *TODO: Delete the button at exit.
sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance());
- sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
+ if (sInfoCtrl)
+ {
+ sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
+ }
+ }
+
+ if (!sInfoCtrl)
+ {
+ llassert(sInfoCtrl != NULL);
+ return;
}
LLTextBase* name = getChild<LLTextBase>("user_name");
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index f75ea23351..f356a04fa4 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -284,7 +284,8 @@ LLCOFWearables::LLCOFWearables() : LLPanel(),
mAttachmentsTab(NULL),
mBodyPartsTab(NULL),
mLastSelectedTab(NULL),
- mCOFVersion(-1)
+ mCOFVersion(-1),
+ mAccordionCtrl(NULL)
{
mClothingMenu = new CofClothingContextMenu(this);
mAttachmentMenu = new CofAttachmentContextMenu(this);
@@ -336,6 +337,8 @@ BOOL LLCOFWearables::postBuild()
mTab2AssetType[mAttachmentsTab] = LLAssetType::AT_OBJECT;
mTab2AssetType[mBodyPartsTab] = LLAssetType::AT_BODYPART;
+ mAccordionCtrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
+
return LLPanel::postBuild();
}
@@ -652,18 +655,35 @@ LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType()
typedef std::map<std::string, LLAssetType::EType> type_map_t;
static type_map_t type_map;
- static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
- const LLAccordionCtrlTab* expanded_tab = accordion_ctrl->getExpandedTab();
- return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE);
+ if (mAccordionCtrl != NULL)
+ {
+ const LLAccordionCtrlTab* expanded_tab = mAccordionCtrl->getExpandedTab();
+
+ return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE);
}
+ return LLAssetType::AT_NONE;
+}
+
LLAssetType::EType LLCOFWearables::getSelectedAccordionAssetType()
+{
+ if (mAccordionCtrl != NULL)
{
- static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
- const LLAccordionCtrlTab* selected_tab = accordion_ctrl->getSelectedTab();
+ const LLAccordionCtrlTab* selected_tab = mAccordionCtrl->getSelectedTab();
- return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE);
+ return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE);
+ }
+
+ return LLAssetType::AT_NONE;
+}
+
+void LLCOFWearables::expandDefaultAccordionTab()
+{
+ if (mAccordionCtrl != NULL)
+ {
+ mAccordionCtrl->expandDefaultTab();
+ }
}
void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu)
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index d005b75eaa..cd7cc060e5 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -40,6 +40,7 @@
#include "llappearancemgr.h"
#include "llinventorymodel.h"
+class LLAccordionCtrl;
class LLAccordionCtrlTab;
class LLListContextMenu;
class LLPanelClothingListItem;
@@ -87,6 +88,7 @@ public:
LLAssetType::EType getExpandedAccordionAssetType();
LLAssetType::EType getSelectedAccordionAssetType();
+ void expandDefaultAccordionTab();
LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; }
@@ -125,6 +127,8 @@ protected:
LLListContextMenu* mAttachmentMenu;
LLListContextMenu* mBodyPartMenu;
+ LLAccordionCtrl* mAccordionCtrl;
+
/* COF category version since last refresh */
S32 mCOFVersion;
};
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 913bb676b0..f0ed659f5a 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2088,7 +2088,8 @@ void LLPanelLandOptions::refresh()
LLStyle::Params style;
style.image(LLUI::getUIImage(gFloaterView->getParentFloater(this)->getString("maturity_icon_moderate")));
LLCheckBoxWithTBAcess* fullaccess_mature_ctrl = (LLCheckBoxWithTBAcess*)mMatureCtrl;
- fullaccess_mature_ctrl->getTextBox()->setText(std::string("icon"),style);
+ fullaccess_mature_ctrl->getTextBox()->setText(LLStringExplicit(""));
+ fullaccess_mature_ctrl->getTextBox()->appendImageSegment(style);
fullaccess_mature_ctrl->getTextBox()->appendText(getString("mature_check_mature"), false);
fullaccess_mature_ctrl->setToolTip(getString("mature_check_mature_tooltip"));
fullaccess_mature_ctrl->reshape(fullaccess_mature_ctrl->getRect().getWidth(), fullaccess_mature_ctrl->getRect().getHeight(), FALSE);
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 6ae4a5e5e4..fc41137686 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -83,6 +83,16 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
{
}
+LLFloaterMove::~LLFloaterMove()
+{
+ // Ensure LLPanelStandStopFlying panel is not among floater's children. See EXT-8458.
+ setVisible(FALSE);
+
+ // Otherwise it can be destroyed and static pointer in LLPanelStandStopFlying::getInstance() will become invalid.
+ // Such situation was possible when LLFloaterReg returns "dead" instance of floater.
+ // Should not happen after LLFloater::destroy was modified to remove "dead" instances from LLFloaterReg.
+}
+
// virtual
BOOL LLFloaterMove::postBuild()
{
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index d463861188..43b0342744 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -51,7 +51,7 @@ class LLFloaterMove
private:
LLFloaterMove(const LLSD& key);
- ~LLFloaterMove() {}
+ ~LLFloaterMove();
public:
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index ec685405ed..62e6cdc79d 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -47,6 +47,7 @@
#include "llvoavatarself.h"
#include "lltexteditor.h"
#include "lltextbox.h"
+#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llagentwearables.h"
#include "llscrollingpanelparam.h"
@@ -666,6 +667,35 @@ void LLPanelEditWearable::updateAvatarHeightLabel()
mTxtAvatarHeight->appendText(this->mReplacementMetricUrl, false, param);
}
+void LLPanelEditWearable::onWearablePanelVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl)
+{
+ if (in_visible_chain.asBoolean() && accordion_ctrl != NULL)
+ {
+ accordion_ctrl->expandDefaultTab();
+ }
+}
+
+void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel)
+{
+ if (bodypart_panel != NULL)
+ {
+ LLAccordionCtrl* accordion_ctrl = bodypart_panel->getChild<LLAccordionCtrl>("wearable_accordion");
+
+ if (accordion_ctrl != NULL)
+ {
+ bodypart_panel->setVisibleCallback(
+ boost::bind(&LLPanelEditWearable::onWearablePanelVisibilityChange, this, _2, accordion_ctrl));
+ }
+ else
+ {
+ llwarns << "accordion_ctrl is NULL" << llendl;
+ }
+ }
+ else
+ {
+ llwarns << "bodypart_panel is NULL" << llendl;
+ }
+}
// virtual
BOOL LLPanelEditWearable::postBuild()
@@ -695,6 +725,14 @@ BOOL LLPanelEditWearable::postBuild()
mPanelEyes = getChild<LLPanel>("edit_eyes_panel");
mPanelHair = getChild<LLPanel>("edit_hair_panel");
+ // Setting the visibility callback is applied only to the bodyparts panel
+ // because currently they are the only ones whose 'wearable_accordion' has
+ // multiple accordion tabs (see EXT-8164 for details).
+ setWearablePanelVisibilityChangeCallback(mPanelShape);
+ setWearablePanelVisibilityChangeCallback(mPanelSkin);
+ setWearablePanelVisibilityChangeCallback(mPanelEyes);
+ setWearablePanelVisibilityChangeCallback(mPanelHair);
+
//clothes
mPanelShirt = getChild<LLPanel>("edit_shirt_panel");
mPanelPants = getChild<LLPanel>("edit_pants_panel");
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index dbda90fe9f..c0823dd3fa 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -39,6 +39,7 @@
#include "llvoavatardefines.h"
#include "llwearabletype.h"
+class LLAccordionCtrl;
class LLCheckBoxCtrl;
class LLWearable;
class LLTextBox;
@@ -113,6 +114,10 @@ private:
// updates avatar height label
void updateAvatarHeightLabel();
+ void onWearablePanelVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl);
+
+ void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel);
+
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLWearable *mWearablePtr;
LLViewerInventoryItem* mWearableItem;
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index d997b83cbb..38e776b195 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -182,6 +182,11 @@ BOOL LLPanelGroup::postBuild()
LLPanelGroupTab* panel_notices = findChild<LLPanelGroupTab>("group_notices_tab_panel");
LLPanelGroupTab* panel_land = findChild<LLPanelGroupTab>("group_land_tab_panel");
+ if (LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("groups_accordion"))
+ {
+ setVisibleCallback(boost::bind(&LLPanelGroup::onVisibilityChange, this, _2, accordion_ctrl));
+ }
+
if(panel_general) mTabs.push_back(panel_general);
if(panel_roles) mTabs.push_back(panel_roles);
if(panel_notices) mTabs.push_back(panel_notices);
@@ -305,6 +310,13 @@ void LLPanelGroup::onBtnCancel()
onBackBtnClick();
}
+void LLPanelGroup::onVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl)
+{
+ if (in_visible_chain.asBoolean() && accordion_ctrl != NULL)
+ {
+ accordion_ctrl->expandDefaultTab();
+ }
+}
void LLPanelGroup::changed(LLGroupChange gc)
{
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 13a03b0713..2b21e9895a 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -42,6 +42,7 @@ class LLOfferInfo;
const S32 UPDATE_MEMBERS_PER_FRAME = 500;
// Forward declares
+class LLAccordionCtrl;
class LLPanelGroupTab;
class LLTabContainer;
class LLAgent;
@@ -102,6 +103,7 @@ protected:
void onBackBtnClick();
void onBtnJoin();
void onBtnCancel();
+ void onVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl);
static void onBtnApply(void*);
static void onBtnRefresh(void*);
@@ -126,7 +128,6 @@ protected:
LLButton* mButtonJoin;
LLUICtrl* mJoinText;
-
};
class LLPanelGroupTab : public LLPanel
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 767b01f039..c09aff44da 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -283,6 +283,8 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
delete mCOFDragAndDropObserver;
+ delete mWearableListViewItemsComparator;
+
while (!mListViewItemTypes.empty()) {
delete mListViewItemTypes.back();
mListViewItemTypes.pop_back();
@@ -386,11 +388,24 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
+ /*
+ * By default AT_CLOTHING are sorted by (in in MY OUTFITS):
+ * - by type (types order determined in LLWearableType::EType)
+ * - each LLWearableType::EType by outer layer on top
+ *
+ * In Add More panel AT_CLOTHING should be sorted in a such way:
+ * - by type (types order determined in LLWearableType::EType)
+ * - each LLWearableType::EType by name (EXT-8205)
+ */
+ mWearableListViewItemsComparator = new LLWearableItemTypeNameComparator();
+ mWearableListViewItemsComparator->setOrder(LLAssetType::AT_CLOTHING, LLWearableItemTypeNameComparator::ORDER_RANK_1, false, true);
+
mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("list_view");
mWearableItemsList->setCommitOnSelectionChange(true);
mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
+ mWearableItemsList->setComparator(mWearableListViewItemsComparator);
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
return TRUE;
@@ -1012,6 +1027,18 @@ bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch
return false;
}
+void LLPanelOutfitEdit::resetAccordionState()
+{
+ if (mCOFWearables != NULL)
+ {
+ mCOFWearables->expandDefaultAccordionTab();
+ }
+ else
+ {
+ llwarns << "mCOFWearables is NULL" << llendl;
+ }
+}
+
void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button)
{
if(!mGearMenu)
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index fe10215f27..13ceda98a6 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -64,6 +64,7 @@ class LLMenuGL;
class LLFindNonLinksByMask;
class LLFindWearablesOfType;
class LLSaveOutfitComboBtn;
+class LLWearableItemTypeNameComparator;
class LLPanelOutfitEdit : public LLPanel
{
@@ -182,6 +183,8 @@ public:
*/
bool switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel);
+ void resetAccordionState();
+
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
@@ -222,6 +225,7 @@ private:
LLFilteredWearableListManager* mWearableListManager;
LLInventoryItemsList* mWearableItemsList;
LLPanel* mWearablesListViewPanel;
+ LLWearableItemTypeNameComparator* mWearableListViewItemsComparator;
LLCOFDragAndDropObserver* mCOFDragAndDropObserver;
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 1f979b0ef1..08835dc2b8 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -79,7 +79,8 @@ LLPanelPlaceProfile::LLPanelPlaceProfile()
: LLPanelPlaceInfo(),
mForSalePanel(NULL),
mYouAreHerePanel(NULL),
- mSelectedParcelID(-1)
+ mSelectedParcelID(-1),
+ mAccordionCtrl(NULL)
{}
// virtual
@@ -139,6 +140,7 @@ BOOL LLPanelPlaceProfile::postBuild()
mSubdivideText = getChild<LLTextEditor>("subdivide");
mResaleText = getChild<LLTextEditor>("resale");
mSaleToText = getChild<LLTextBox>("sale_to");
+ mAccordionCtrl = getChild<LLAccordionCtrl>("advanced_info_accordion");
icon_pg = getString("icon_PG");
icon_m = getString("icon_M");
@@ -278,6 +280,11 @@ void LLPanelPlaceProfile::handleVisibilityChange(BOOL new_visibility)
parcel_mgr->deselectUnused();
}
}
+
+ if (mAccordionCtrl != NULL)
+ {
+ mAccordionCtrl->expandDefaultTab();
+ }
}
void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index e77b441567..49c13ff5e3 100644
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -35,6 +35,7 @@
#include "llpanelplaceinfo.h"
+class LLAccordionCtrl;
class LLIconCtrl;
class LLTextEditor;
@@ -118,6 +119,7 @@ private:
LLTextEditor* mSubdivideText;
LLTextEditor* mResaleText;
LLTextBox* mSaleToText;
+ LLAccordionCtrl* mAccordionCtrl;
};
#endif // LL_LLPANELPLACEPROFILE_H
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 7a7ffb9983..98cd0b88eb 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -190,13 +190,16 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
{
if (new_visibility.asBoolean())
{
- if ((mOutfitEdit && mOutfitEdit->getVisible()) || (mEditWearable && mEditWearable->getVisible()))
+ bool is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible();
+ bool is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible();
+
+ if (is_outfit_edit_visible || is_wearable_edit_visible)
{
if (!gAgentCamera.cameraCustomizeAvatar() && gSavedSettings.getBOOL("AppearanceCameraMovement"))
{
gAgentCamera.changeCameraToCustomizeAvatar();
}
- if (mEditWearable && mEditWearable->getVisible())
+ if (is_wearable_edit_visible)
{
LLWearable *wearable_ptr = mEditWearable->getWearable();
if (gAgentWearables.getWearableIndex(wearable_ptr) == LLAgentWearables::MAX_CLOTHING_PER_TYPE)
@@ -205,6 +208,11 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
showOutfitEditPanel();
}
}
+
+ if (is_outfit_edit_visible)
+ {
+ mOutfitEdit->resetAccordionState();
+ }
}
}
else
@@ -283,6 +291,15 @@ void LLSidepanelAppearance::showOutfitsInventoryPanel()
void LLSidepanelAppearance::showOutfitEditPanel()
{
+ // Accordion's state must be reset in all cases except the one when user
+ // is returning back to the mOutfitEdit panel from the mEditWearable panel.
+ // The simplest way to control this is to check the visibility state of the mEditWearable
+ // BEFORE it is changed by the call to the toggleWearableEditPanel(FALSE, NULL, TRUE).
+ if (mEditWearable != NULL && !mEditWearable->getVisible() && mOutfitEdit != NULL)
+ {
+ mOutfitEdit->resetAccordionState();
+ }
+
togglMyOutfitsPanel(FALSE);
toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode
toggleOutfitEditPanel(TRUE);
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 35abbc0c4d..6a9a00f1c1 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -465,6 +465,29 @@ std::string LLPanelDummyClothingListItem::wearableTypeToString(LLWearableType::E
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
+LLWearableItemTypeNameComparator::LLWearableTypeOrder::LLWearableTypeOrder(LLWearableItemTypeNameComparator::ETypeListOrder order_priority, bool sort_asset_by_name, bool sort_wearable_by_name):
+ mOrderPriority(order_priority),
+ mSortAssetTypeByName(sort_asset_by_name),
+ mSortWearableTypeByName(sort_wearable_by_name)
+{
+}
+
+LLWearableItemTypeNameComparator::LLWearableItemTypeNameComparator()
+{
+ // By default the sort order conforms the order by spec of MY OUTFITS items list:
+ // 1. CLOTHING - sorted by name
+ // 2. OBJECT - sorted by type
+ // 3. BODYPART - sorted by name
+ mWearableOrder[LLAssetType::AT_CLOTHING] = LLWearableTypeOrder(ORDER_RANK_1, false, false);
+ mWearableOrder[LLAssetType::AT_OBJECT] = LLWearableTypeOrder(ORDER_RANK_2, true, true);
+ mWearableOrder[LLAssetType::AT_BODYPART] = LLWearableTypeOrder(ORDER_RANK_3, false, true);
+}
+
+void LLWearableItemTypeNameComparator::setOrder(LLAssetType::EType items_of_type, LLWearableItemTypeNameComparator::ETypeListOrder order_priority, bool sort_asset_items_by_name, bool sort_wearable_items_by_name)
+{
+ mWearableOrder[items_of_type] = LLWearableTypeOrder(order_priority, sort_asset_items_by_name, sort_wearable_items_by_name);
+}
+
/*virtual*/
bool LLWearableItemNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const
{
@@ -493,7 +516,7 @@ bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemB
return item_type_order1 < item_type_order2;
}
- if (item_type_order1 & TLO_SORTABLE_BY_NAME)
+ if (sortAssetTypeByName(item_type1))
{
// If both items are of the same asset type except AT_CLOTHING and AT_BODYPART
// we can compare them by name.
@@ -505,38 +528,61 @@ bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemB
if (item_wearable_type1 != item_wearable_type2)
{
- // If items are of different clothing types they are compared
- // by clothing types order determined in LLWearableType::EType.
+ // If items are of different LLWearableType::EType types they are compared
+ // by LLWearableType::EType. types order determined in LLWearableType::EType.
return item_wearable_type1 < item_wearable_type2;
}
else
{
// If both items are of the same clothing type they are compared
- // by description and place in reverse order i.e. outer layer item
- // on top.
+ // by description and place in reverse order (i.e. outer layer item
+ // on top) OR by name
+ if(sortWearableTypeByName(item_type1))
+ {
+ return LLWearableItemNameComparator::doCompare(wearable_item1, wearable_item2);
+ }
return wearable_item1->getDescription() > wearable_item2->getDescription();
}
}
-// static
-LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparator::getTypeListOrder(LLAssetType::EType item_type)
+LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparator::getTypeListOrder(LLAssetType::EType item_type) const
{
- switch (item_type)
+ wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type);
+
+ if(const_it == mWearableOrder.end())
{
- case LLAssetType::AT_OBJECT:
- return TLO_ATTACHMENT;
+ llwarns<<"Absent information about order rang of items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl;
+ return ORDER_RANK_UNKNOWN;
+ }
- case LLAssetType::AT_CLOTHING:
- return TLO_CLOTHING;
+ return const_it->second.mOrderPriority;
+}
- case LLAssetType::AT_BODYPART:
- return TLO_BODYPART;
+bool LLWearableItemTypeNameComparator::sortAssetTypeByName(LLAssetType::EType item_type) const
+{
+ wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type);
- default:
- return TLO_UNKNOWN;
+ if(const_it == mWearableOrder.end())
+ {
+ llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl;
+ return true;
}
+
+ return const_it->second.mSortAssetTypeByName;
}
+bool LLWearableItemTypeNameComparator::sortWearableTypeByName(LLAssetType::EType item_type) const
+{
+ wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type);
+
+ if(const_it == mWearableOrder.end())
+ {
+ llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl;
+ return true;
+ }
+
+ return const_it->second.mSortWearableTypeByName;
+}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -676,13 +722,11 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
const uuid_vec_t& ids = mUUIDs; // selected items IDs
LLUUID selected_id = ids.front(); // ID of the first selected item
- functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, true, LLPointer<LLInventoryCallback>(NULL));
- functor_t add = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false, LLPointer<LLInventoryCallback>(NULL));
functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1);
// Register handlers common for all wearable types.
- registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids));
- registrar.add("Wearable.Add", boost::bind(handleMultiple, add, ids));
+ registrar.add("Wearable.Wear", boost::bind(wear_multiple, ids, false));
+ registrar.add("Wearable.Add", boost::bind(wear_multiple, ids, true));
registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids));
registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id));
registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id));
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 367b648b3d..f2f81968ee 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -307,33 +307,76 @@ class LLWearableItemTypeNameComparator : public LLWearableItemNameComparator
LOG_CLASS(LLWearableItemTypeNameComparator);
public:
- LLWearableItemTypeNameComparator() {};
+
+ LLWearableItemTypeNameComparator();
virtual ~LLWearableItemTypeNameComparator() {};
+ enum ETypeListOrder
+ {
+ ORDER_RANK_1 = 1,
+ ORDER_RANK_2,
+ ORDER_RANK_3,
+ ORDER_RANK_UNKNOWN
+ };
+
+ void setOrder(LLAssetType::EType items_of_type, ETypeListOrder order_priority, bool sort_items_by_name, bool sort_wearable_items_by_name);
+
protected:
/**
- * Returns "true" if wearable_item1 is placed before wearable_item2 sorted by the following:
- * - Attachments (abc order)
- * - Clothing
- * - by type (types order determined in LLWearableType::EType)
- * - outer layer on top
- * - Body Parts (abc order),
- * "false" otherwise.
+ * All information about sort order is stored in mWearableOrder map
+ *
+ * mWearableOrder : KYES VALUES
+ * [LLAssetType] [struct LLWearableTypeOrder]
+ *
+ *---------------------------------------------------------------------------------------------
+ * I. Determines order (ORDER_RANK) in which items of LLAssetType should be displayed in list.
+ * For example by spec in MY OUTFITS the order is:
+ * 1. AT_CLOTHING (ORDER_RANK_1)
+ * 2. AT_OBJECT (ORDER_RANK_2)
+ * 3. AT_BODYPART (ORDER_RANK_3)
+ *
+ * II.Items of each type(LLAssetType) are sorted by name or type(LLWearableType)
+ * For example by spec in MY OUTFITS the order within each items type(LLAssetType) is:
+ * 1. AT_OBJECTS (abc order)
+ * 2. AT_CLOTHINGS
+ * - by type (types order determined in LLWearableType::EType)
+ * - outer layer on top
+ * 3. AT_BODYPARTS (abc order)
+ *---------------------------------------------------------------------------------------------
+ *
+ * For each LLAssetType (KEYS in mWearableOrder) the information about:
+ *
+ * I. ORDER_RANK (the flag is LLWearableTypeOrder::mOrderPriority)
+ *
+ * II. whether items of this LLAssetType type should be ordered
+ * by name or by LLWearableType::EType (the flag is LLWearableTypeOrder::mSortAssetTypeByName)
+ *
+ * III.whether items of LLWearableType type within this LLAssetType
+ * should be ordered by name (the flag is LLWearableTypeOrder::mSortWearableTypeByName)
+ *
+ * holds in mWearableOrder map as VALUES (struct LLWearableTypeOrder).
*/
/*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const;
private:
- enum ETypeListOrder
+
+ struct LLWearableTypeOrder
{
- TLO_CLOTHING = 0x01,
- TLO_ATTACHMENT = 0x02,
- TLO_BODYPART = 0x04,
- TLO_UNKNOWN = 0x08,
+ ETypeListOrder mOrderPriority;
+ bool mSortAssetTypeByName;
+ bool mSortWearableTypeByName;
- TLO_SORTABLE_BY_NAME = TLO_ATTACHMENT | TLO_UNKNOWN
+ LLWearableTypeOrder(ETypeListOrder order_priority, bool sort_asset_by_name, bool sort_wearable_by_name);
+ LLWearableTypeOrder(){};
};
- static LLWearableItemTypeNameComparator::ETypeListOrder getTypeListOrder(LLAssetType::EType item_type);
+ ETypeListOrder getTypeListOrder(LLAssetType::EType item_type) const;
+
+ bool sortAssetTypeByName(LLAssetType::EType item_type) const;
+ bool sortWearableTypeByName(LLAssetType::EType item_type) const;
+
+ typedef std::map<LLAssetType::EType,LLWearableTypeOrder> wearable_type_order_map_t;
+ wearable_type_order_map_t mWearableOrder;
};
/**
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 68e36ff0b3..99bf3e6bc1 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1472,8 +1472,10 @@ Only large parcels can be listed in search.
left="14"
name="MatureCheck"
top="177"
+ label_text.valign="center"
+ label_text.v_pad="-5"
tool_tip=" "
- width="107" />
+ width="200" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 6523b0d491..41f2b28004 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -76,19 +76,22 @@ Maximum 200 per group daily
follows="top|left"
height="23"
image_overlay="AddItem_Off"
+ image_overlay_alignment="left"
+ imgoverlay_label_space="-10"
+ label="New Notice"
layout="topleft"
left="5"
name="create_new_notice"
tool_tip="Create a new notice"
- top_delta="-3"
- width="23" />
+ top_delta="0"
+ width="93" />
<button
follows="top|left"
height="23"
image_overlay="Refresh_Off"
layout="topleft"
name="refresh_notices"
- left_pad="230"
+ left="260"
tool_tip="Refresh list of notices"
top_delta="0"
width="23" />
@@ -113,7 +116,7 @@ Maximum 200 per group daily
mouse_opaque="false"
name="lbl"
text_color="EmphasisColor"
- top="0"
+ top="5"
width="200">
Create a Notice
</text>
@@ -270,7 +273,7 @@ Maximum 200 per group daily
mouse_opaque="false"
name="lbl"
text_color="EmphasisColor"
- top_pad="0"
+ top_pad="5"
width="265">
Archived Notice
</text>
diff --git a/indra/newview/skins/default/xui/fr/floater_water.xml b/indra/newview/skins/default/xui/fr/floater_water.xml
index 96723b0fe6..7d1e3cd65c 100644
--- a/indra/newview/skins/default/xui/fr/floater_water.xml
+++ b/indra/newview/skins/default/xui/fr/floater_water.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Water Floater" title="ÉDITEUR D&apos;EAU AVANCÉ">
<floater.string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
+ Valeur par défaut:Transparente:Bassin:Trouble:Première plaie:SERPENT !!!:Valdez
</floater.string>
<text name="KeyFramePresetsText" width="120">
Préréglages :
diff --git a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
index 74f1697449..657e5f5051 100644
--- a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
@@ -184,6 +184,6 @@
</panel>
</tab_container>
<string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
+ A-Minuit:A-Midi:A-3h:A-15h:A-16h30:A-6h:A-18h:A-9h:A-21h:Barcelone:Blizzard:Bleu mi-journée:Après-midi sur la côte:Coucher de soleil (côte):Valeur par défaut:Coucher de soleil (désert):Belle journée:Gros nuages floconneux:Brumeux:Funky Funky:Funky Funky Funky:Gelatto:Fantôme:Vérités incohérentes:Mi-journée 1:Mi-journée 2:Mi-journée 3:Mi-journée 4:Nuit:Pirate:Mauve:Rêve de navigateur:Sensualité pure
</string>
</floater>
diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
index 978ca86d62..1a6101830b 100644
--- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
@@ -27,7 +27,7 @@
Médias proches
</text>
<text name="show_text">
- Afficher :
+ Voir :
</text>
<combo_box name="show_combo">
<combo_box.item label="Tout" name="All"/>