meow-7.2.2
Eli Linden 2010-06-25 11:34:43 -07:00
commit 4eca0ee2be
9 changed files with 73 additions and 62 deletions

View File

@ -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;
}
};

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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);

View File

@ -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;
}

View File

@ -12,26 +12,6 @@
function="Clothing.OnEnable"
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"
layout="topleft"
name="move_down">
<on_click
function="Clothing.MoveDown" />
<on_enable
function="Clothing.OnEnable"
parameter="move_down" />
</menu_item_call>
<menu_item_call
label="Edit"
layout="topleft"
@ -42,6 +22,16 @@
function="Clothing.OnEnable"
parameter="edit" />
</menu_item_call>
<menu_item_call
label="Replace"
layout="topleft"
name="replace">
<on_click
function="Clothing.Replace" />
<on_enable
function="Clothing.OnEnable"
parameter="replace" />
</menu_item_call>
<menu_item_call
label="Create New"
layout="topleft"

View File

@ -15,6 +15,16 @@
function="Gear.OnVisible"
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"

View File

@ -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>

View File

@ -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"