summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcofwearables.cpp34
-rw-r--r--indra/newview/llimview.cpp6
-rw-r--r--indra/newview/llmoveview.cpp23
-rw-r--r--indra/newview/llmoveview.h1
-rw-r--r--indra/newview/lloutfitslist.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/menu_cof_clothing.xml26
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_list.xml3
9 files changed, 71 insertions, 60 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 1fab5c7683..cbebc93306 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -165,6 +165,14 @@ public:
}
protected:
+ static void replaceWearable()
+ {
+ static LLButton* show_add_wearables_btn =
+ LLSideTray::getInstance()->getChild<LLButton>("show_add_wearables_btn");
+
+ show_add_wearables_btn->onCommit();
+ }
+
/*virtual*/ LLContextMenu* createMenu()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -173,8 +181,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.MoveUp", boost::bind(moveWearable, selected_id, false));
- registrar.add("Clothing.MoveDown", boost::bind(moveWearable, selected_id, true));
+ registrar.add("Clothing.Replace", boost::bind(replaceWearable));
registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("Clothing.Create", boost::bind(&CofClothingContextMenu::createNew, this, selected_id));
@@ -194,15 +201,7 @@ protected:
std::string param = data.asString();
LLUUID selected_id = mUUIDs.back();
- if ("move_up" == param)
- {
- return gAgentWearables.canMoveWearable(selected_id, false);
- }
- else if ("move_down" == param)
- {
- return gAgentWearables.canMoveWearable(selected_id, true);
- }
- else if ("take_off" == param)
+ if ("take_off" == param)
{
return get_is_item_worn(selected_id);
}
@@ -210,15 +209,12 @@ protected:
{
return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id);
}
- return true;
- }
+ else if ("replace" == param)
+ {
+ return get_is_item_worn(selected_id) && mUUIDs.size() == 1;
+ }
- // We don't use LLAppearanceMgr::moveWearable() directly because
- // the item may be invalidated between setting the callback and calling it.
- static bool moveWearable(const LLUUID& item_id, bool closer_to_body)
- {
- LLViewerInventoryItem* item = gInventory.getItem(item_id);
- return LLAppearanceMgr::instance().moveWearable(item, closer_to_body);
+ return true;
}
};
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ddfcd68e38..6d3998bb96 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1898,8 +1898,6 @@ BOOL LLIncomingCallDialog::postBuild()
// check to see if this is an Avaline call
bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
- childSetVisible("Start IM", is_avatar); // no IM for avaline
-
if (caller_name == "anonymous")
{
caller_name = getString("anonymous");
@@ -1931,6 +1929,10 @@ BOOL LLIncomingCallDialog::postBuild()
mLifetimeTimer.stop();
}
+ //it's not possible to connect to existing Ad-Hoc chat through incoming ad-hoc call
+ //and no IM for avaline
+ childSetVisible("Start IM", is_avatar && notify_box_type != "VoiceInviteAdHoc");
+
setCanDrag(FALSE);
return TRUE;
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index afca9daa67..6ae4a5e5e4 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -144,18 +144,6 @@ BOOL LLFloaterMove::postBuild()
return TRUE;
}
-// virtual
-void LLFloaterMove::setEnabled(BOOL enabled)
-{
- //we need to enable/disable only buttons, EXT-1061.
-
- // is called before postBuild() - use findChild here.
- LLPanel *panel_actions = findChild<LLPanel>("panel_actions");
- if (panel_actions) panel_actions->setEnabled(enabled);
-
- showModeButtons(enabled);
-}
-
// *NOTE: we assume that setVisible() is called on floater close.
// virtual
void LLFloaterMove::setVisible(BOOL visible)
@@ -406,7 +394,7 @@ void LLFloaterMove::initMovementMode()
if (isAgentAvatarValid())
{
- setEnabled(!gAgentAvatarp->isSitting());
+ showModeButtons(!gAgentAvatarp->isSitting());
}
}
@@ -476,8 +464,7 @@ void LLFloaterMove::sUpdateFlyingStatus()
void LLFloaterMove::showModeButtons(BOOL bShow)
{
- // is called from setEnabled so can be called before postBuild(), check mModeActionsPanel agains to NULL
- if (NULL == mModeActionsPanel || mModeActionsPanel->getVisible() == bShow)
+ if (mModeActionsPanel->getVisible() == bShow)
return;
mModeActionsPanel->setVisible(bShow);
}
@@ -488,12 +475,14 @@ void LLFloaterMove::enableInstance(BOOL bEnable)
LLFloaterMove* instance = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
if (instance)
{
- instance->setEnabled(bEnable);
-
if (gAgent.getFlying())
{
instance->showModeButtons(FALSE);
}
+ else
+ {
+ instance->showModeButtons(bEnable);
+ }
}
}
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index fcf643f050..d463861188 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -55,7 +55,6 @@ private:
public:
/*virtual*/ BOOL postBuild();
- /*virtual*/ void setEnabled(BOOL enabled);
/*virtual*/ void setVisible(BOOL visible);
static F32 getYawRate(F32 time);
static void setFlyingMode(BOOL fly);
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 6c2566813f..075cfa0543 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -88,6 +88,8 @@ public:
registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this));
registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2));
+ registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this));
+
enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitsList::isActionEnabled, mOutfitList, _2));
enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2));
@@ -146,6 +148,16 @@ private:
}
}
+ void onAdd()
+ {
+ const LLUUID& selected_id = getSelectedOutfitID();
+
+ if (selected_id.notNull())
+ {
+ LLAppearanceMgr::getInstance()->addCategoryToCurrentOutfit(selected_id);
+ }
+ }
+
void onTakeOff()
{
// Take off selected items if there are any
@@ -648,6 +660,17 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata)
&& LLAppearanceMgr::getInstance()->getBaseOutfitUUID() == mSelectedOutfitUUID )
|| hasWornItemSelected();
}
+
+ if (command_name == "wear_add")
+ {
+ if (gAgentWearables.isCOFChangeInProgress())
+ {
+ return false;
+ }
+
+ return LLAppearanceMgr::getCanAddToCOF(mSelectedOutfitUUID);
+ }
+
return false;
}
diff --git a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
index 12ee9b045b..206d49e8c7 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
@@ -13,34 +13,24 @@
parameter="take_off" />
</menu_item_call>
<menu_item_call
- label="Move Up a Layer"
- layout="topleft"
- name="move_up">
- <on_click
- function="Clothing.MoveUp" />
- <on_enable
- function="Clothing.OnEnable"
- parameter="move_up" />
- </menu_item_call>
- <menu_item_call
- label="Move Down a Layer"
+ label="Edit"
layout="topleft"
- name="move_down">
+ name="edit">
<on_click
- function="Clothing.MoveDown" />
+ function="Clothing.Edit" />
<on_enable
function="Clothing.OnEnable"
- parameter="move_down" />
+ parameter="edit" />
</menu_item_call>
<menu_item_call
- label="Edit"
+ label="Replace"
layout="topleft"
- name="edit">
+ name="replace">
<on_click
- function="Clothing.Edit" />
+ function="Clothing.Replace" />
<on_enable
function="Clothing.OnEnable"
- parameter="edit" />
+ parameter="replace" />
</menu_item_call>
<menu_item_call
label="Create New"
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index 8e7ef7f0b5..c4c7a5034a 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -16,6 +16,16 @@
parameter="wear" />
</menu_item_call>
<menu_item_call
+ label="Wear - Add to Current Outfit"
+ layout="topleft"
+ name="wear_add">
+ <on_click
+ function="Gear.WearAdd" />
+ <on_enable
+ function="Gear.OnEnable"
+ parameter="wear_add" />
+ </menu_item_call>
+ <menu_item_call
label="Take Off - Remove from Current Outfit"
layout="topleft"
name="take_off">
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index b365540d1f..60a0095d5f 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -37,6 +37,7 @@
width="312" />
<panel
background_visible="true"
+ bg_alpha_color="DkGray"
class="panel_wearing"
follows="all"
height="490"
@@ -50,13 +51,13 @@
follows="all"
height="490"
keep_one_selected="true"
- left="1"
+ left="3"
multi_select="true"
name="cof_items_list"
standalone="false"
top="0"
translate="false"
- width="310"
+ width="307"
worn_indication_enabled="false"
/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
index d0c44c4328..aea4e939df 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
@@ -9,12 +9,13 @@
layout="topleft"
left="0"
top="0"
- width="313">
+ width="312">
<accordion
background_visible="true"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]."
+ no_matched_tabs_text.v_pad="10"
no_visible_tabs_text.value="There are no any outfits. Try [secondlife:///app/search/all/ Search]."
follows="all"
height="400"