Merge branch 'DRTVWR-518-ui' of https://bitbucket.org/lindenlab/viewer
commit
c80a8babe4
|
|
@ -216,7 +216,7 @@ void LLFloaterCreateLandmark::onCreateFolderClicked()
|
|||
if (!folder_name.empty())
|
||||
{
|
||||
inventory_func_type func = boost::bind(&LLFloaterCreateLandmark::folderCreatedCallback, this, _1);
|
||||
LLUUID test = gInventory.createNewCategory(mLandmarksID, LLFolderType::FT_NONE, folder_name, func);
|
||||
gInventory.createNewCategory(mLandmarksID, LLFolderType::FT_NONE, folder_name, func);
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
}
|
||||
|
|
@ -282,13 +282,8 @@ void LLFloaterCreateLandmark::onSaveClicked()
|
|||
|
||||
void LLFloaterCreateLandmark::onCancelClicked()
|
||||
{
|
||||
// <FS:Ansariel> Don't create landmark on cancel
|
||||
if (mItem)
|
||||
{
|
||||
remove_inventory_item(mItem, nullptr, true);
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
LLUUID item_id = mItem->getUUID();
|
||||
remove_inventory_item(item_id, NULL);
|
||||
closeFloater();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ private:
|
|||
LLLineEditor* mLandmarkTitleEditor;
|
||||
LLTextEditor* mNotesEditor;
|
||||
LLUUID mLandmarksID;
|
||||
LLUUID mItemID;
|
||||
|
||||
LLLandmarksInventoryObserver* mInventoryObserver;
|
||||
LLPointer<LLInventoryItem> mItem;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@
|
|||
#include "llmenubutton.h"
|
||||
#include "llpaneloutfitsinventory.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llsaveoutfitcombobtn.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltoggleablemenu.h"
|
||||
|
|
@ -84,6 +83,8 @@ const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LL
|
|||
const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK;
|
||||
|
||||
static const std::string REVERT_BTN("revert_btn");
|
||||
static const std::string SAVE_AS_BTN("save_as_btn");
|
||||
static const std::string SAVE_BTN("save_btn");
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -569,12 +570,13 @@ BOOL LLPanelOutfitEdit::postBuild()
|
|||
mGearMenu = LLPanelOutfitEditGearMenu::create();
|
||||
mGearMenuBtn->setMenu(mGearMenu);
|
||||
|
||||
getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
|
||||
getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
|
||||
|
||||
// <FS:Ansariel> Show avatar complexity in appearance floater
|
||||
mAvatarComplexityLabel = getChild<LLTextBox>("avatar_complexity_label");
|
||||
mAvatarComplexityAddingLabel = getChild<LLTextBox>("avatar_complexity_adding_label");
|
||||
|
||||
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
|
||||
|
||||
onOutfitChanging(gAgentWearables.isCOFChangeInProgress());
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1254,11 +1256,9 @@ void LLPanelOutfitEdit::updateVerbs()
|
|||
bool outfit_locked = LLAppearanceMgr::getInstance()->isOutfitLocked();
|
||||
bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull();
|
||||
|
||||
mSaveComboBtn->setSaveBtnEnabled(!outfit_locked && outfit_is_dirty);
|
||||
getChildView(SAVE_BTN)->setEnabled(!outfit_locked && outfit_is_dirty);
|
||||
getChildView(REVERT_BTN)->setEnabled(outfit_is_dirty && has_baseoutfit);
|
||||
|
||||
mSaveComboBtn->setMenuItemEnabled("save_outfit", !outfit_locked && outfit_is_dirty);
|
||||
|
||||
mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing"));
|
||||
|
||||
updateCurrentOutfitName();
|
||||
|
|
@ -1444,6 +1444,15 @@ void LLPanelOutfitEdit::saveListSelection()
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelOutfitEdit::saveOutfit(bool as_new)
|
||||
{
|
||||
LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance();
|
||||
if (panel_outfits_inventory)
|
||||
{
|
||||
panel_outfits_inventory->saveOutfit(as_new);
|
||||
}
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Show avatar complexity in appearance floater
|
||||
void LLPanelOutfitEdit::updateAvatarComplexity(U32 complexity)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ class LLMenuButton;
|
|||
class LLMenuGL;
|
||||
class LLFindNonLinksByMask;
|
||||
class LLFindWearablesOfType;
|
||||
class LLSaveOutfitComboBtn;
|
||||
class LLWearableItemTypeNameComparator;
|
||||
|
||||
class LLPanelOutfitEdit : public LLPanel
|
||||
|
|
@ -198,6 +197,7 @@ private:
|
|||
void getSelectedItemsUUID(uuid_vec_t& uuid_list);
|
||||
void getCurrentItemUUID(LLUUID& selected_id);
|
||||
void onCOFChanged();
|
||||
void saveOutfit(bool as_new = false);
|
||||
|
||||
/**
|
||||
* Method preserves selection while switching between folder/list view modes
|
||||
|
|
@ -243,7 +243,6 @@ private:
|
|||
LLToggleableMenu* mGearMenu;
|
||||
LLToggleableMenu* mAddWearablesGearMenu;
|
||||
bool mInitialized;
|
||||
std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
|
||||
LLMenuButton* mWearablesGearMenuBtn;
|
||||
LLMenuButton* mGearMenuBtn;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "lloutfitgallery.h"
|
||||
#include "lloutfitslist.h"
|
||||
#include "llpanelwearing.h"
|
||||
#include "llsaveoutfitcombobtn.h"
|
||||
#include "llsidepanelappearance.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
|
|
@ -49,6 +48,9 @@ static const std::string OUTFITS_TAB_NAME = "outfitslist_tab";
|
|||
static const std::string OUTFIT_GALLERY_TAB_NAME = "outfit_gallery_tab";
|
||||
static const std::string COF_TAB_NAME = "cof_tab";
|
||||
|
||||
static const std::string SAVE_AS_BTN("save_as_btn");
|
||||
static const std::string SAVE_BTN("save_btn");
|
||||
|
||||
static LLPanelInjector<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
|
||||
|
||||
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
|
||||
|
|
@ -101,8 +103,9 @@ BOOL LLPanelOutfitsInventory::postBuild()
|
|||
{
|
||||
LLInventoryModelBackgroundFetch::instance().start(outfits_cat);
|
||||
}
|
||||
|
||||
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this, true));
|
||||
|
||||
getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, false));
|
||||
getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, true));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -309,7 +312,7 @@ void LLPanelOutfitsInventory::updateListCommands()
|
|||
mOutfitGalleryPanel->childSetEnabled("trash_btn", trash_enabled);
|
||||
wear_btn->setEnabled(wear_enabled);
|
||||
wear_btn->setVisible(wear_visible);
|
||||
mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled);
|
||||
getChild<LLButton>(SAVE_BTN)->setEnabled(make_outfit_enabled);
|
||||
wear_btn->setToolTip(getString((!isOutfitsGalleryPanelActive() && mMyOutfitsPanel->hasItemSelected()) ? "wear_items_tooltip" : "wear_outfit_tooltip"));
|
||||
}
|
||||
|
||||
|
|
@ -409,6 +412,18 @@ LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP()
|
|||
return panel_appearance;
|
||||
}
|
||||
|
||||
void LLPanelOutfitsInventory::saveOutfit(bool as_new)
|
||||
{
|
||||
if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
|
||||
{
|
||||
// we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
|
||||
// If updateBaseOutfit fails, ask for an outfit name anyways
|
||||
return;
|
||||
}
|
||||
|
||||
onSave();
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Show avatar complexity in appearance floater
|
||||
void LLPanelOutfitsInventory::updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity)
|
||||
{
|
||||
|
|
@ -417,4 +432,3 @@ void LLPanelOutfitsInventory::updateAvatarComplexity(U32 complexity, const std::
|
|||
mCurrentOutfitPanel->updateAvatarComplexity(complexity, item_complexity, temp_item_complexity, body_parts_complexity);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ class LLPanelWearing;
|
|||
class LLMenuGL;
|
||||
class LLSidepanelAppearance;
|
||||
class LLTabContainer;
|
||||
class LLSaveOutfitComboBtn;
|
||||
class LLInventoryCategoriesObserver; // <FS:Ansariel> FIRE-17626: Attachment count in appearance floater
|
||||
|
||||
class LLPanelOutfitsInventory : public LLPanel
|
||||
|
|
@ -53,6 +52,7 @@ public:
|
|||
|
||||
void onSearchEdit(const std::string& string);
|
||||
void onSave();
|
||||
void saveOutfit(bool as_new = false);
|
||||
|
||||
bool onSaveCommit(const LLSD& notification, const LLSD& response);
|
||||
|
||||
|
|
@ -75,7 +75,6 @@ protected:
|
|||
private:
|
||||
LLTabContainer* mAppearanceTabs;
|
||||
std::string mFilterSubString;
|
||||
std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
|
||||
|
||||
// <FS:Ansariel> FIRE-17626: Attachment count in appearance floater
|
||||
LLInventoryCategoriesObserver* mCategoriesObserver;
|
||||
|
|
|
|||
|
|
@ -547,22 +547,26 @@ It is calculated as border_size + 2*UIResizeBarOverlap
|
|||
layout="topleft"
|
||||
name="save_btn"
|
||||
top="0"
|
||||
width="155" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
name="save_flyout_btn"
|
||||
label=""
|
||||
layout="topleft"
|
||||
left_pad="-20"
|
||||
tab_stop="false"
|
||||
top="0"
|
||||
image_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_unselected="SegmentedBtn_Right_Off"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_overlay="Arrow_Small_Up"
|
||||
width="20"/>
|
||||
right="-1" />
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="save_as_btn_lp"
|
||||
auto_resize="true"
|
||||
width="156">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save as..."
|
||||
layout="topleft"
|
||||
name="save_as_btn"
|
||||
top="0"
|
||||
left="1"
|
||||
right="-1" />
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
|
|
@ -572,7 +576,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
|
|||
mouse_opaque="false"
|
||||
name="revert_btn_lp"
|
||||
auto_resize="true"
|
||||
width="147">
|
||||
width="156">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
|
|
@ -582,7 +586,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
|
|||
name="revert_btn"
|
||||
top="0"
|
||||
tool_tip="Revert to last saved version"
|
||||
width="147" />
|
||||
right="-1" />
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -112,22 +112,27 @@
|
|||
name="save_btn"
|
||||
top="0"
|
||||
right="-1" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
name="save_flyout_btn"
|
||||
label=""
|
||||
layout="topleft"
|
||||
left_pad="-20"
|
||||
tab_stop="false"
|
||||
image_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_unselected="SegmentedBtn_Right_Off"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_overlay="Arrow_Small_Up"
|
||||
width="20"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="save_as_btn_lp"
|
||||
auto_resize="true"
|
||||
width="205">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save as..."
|
||||
layout="topleft"
|
||||
name="save_as_btn"
|
||||
top="0"
|
||||
left="1"
|
||||
right="-1" />
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
show_title="true"
|
||||
can_minimize="false"
|
||||
can_close="false"
|
||||
header_height="10"
|
||||
bg_opaque_image="Window_NoTitle_Foreground"
|
||||
bg_alpha_image="Window_NoTitle_Background"
|
||||
height="305"
|
||||
layout="topleft"
|
||||
name="create_landmark"
|
||||
|
|
|
|||
|
|
@ -543,27 +543,31 @@ It is calculated as border_size + 2*UIResizeBarOverlap
|
|||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save"
|
||||
label="Save changes"
|
||||
left="1"
|
||||
layout="topleft"
|
||||
name="save_btn"
|
||||
top="0"
|
||||
width="155" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
name="save_flyout_btn"
|
||||
label=""
|
||||
layout="topleft"
|
||||
left_pad="-20"
|
||||
tab_stop="false"
|
||||
top="0"
|
||||
image_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_unselected="SegmentedBtn_Right_Off"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_overlay="Arrow_Small_Up"
|
||||
width="20"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="save_as_btn_lp"
|
||||
auto_resize="true"
|
||||
width="156">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save as..."
|
||||
layout="topleft"
|
||||
name="save_as_btn"
|
||||
top="0"
|
||||
left="1"
|
||||
right="-1" />
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
|
|
|
|||
|
|
@ -105,28 +105,33 @@
|
|||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save As"
|
||||
label="Save changes"
|
||||
left="4"
|
||||
layout="topleft"
|
||||
name="save_btn"
|
||||
top="0"
|
||||
right="-1" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
name="save_flyout_btn"
|
||||
label=""
|
||||
layout="topleft"
|
||||
left_pad="-20"
|
||||
tab_stop="false"
|
||||
image_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_unselected="SegmentedBtn_Right_Off"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_overlay="Arrow_Small_Up"
|
||||
width="20"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="save_as_btn_lp"
|
||||
auto_resize="true"
|
||||
width="156">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save as..."
|
||||
layout="topleft"
|
||||
name="save_as_btn"
|
||||
top="0"
|
||||
left="1"
|
||||
right="-1" />
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue