merge from PE's viewer-trunk

meow-7.2.2
Tofu Linden 2010-05-12 10:55:19 +01:00
commit 7059173aa9
9 changed files with 189 additions and 79 deletions

View File

@ -497,6 +497,7 @@ PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description.
PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id.
PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id.
PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters.
PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id.
STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string.
STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string.

View File

@ -1154,3 +1154,31 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id )
}
}
void LLIMFloater::onClickCloseBtn()
{
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(
mSessionID);
if (session == NULL)
{
llwarns << "Empty session." << llendl;
return;
}
bool is_call_with_chat = session->isGroupSessionType()
|| session->isAdHocSessionType() || session->isP2PSessionType();
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
if (is_call_with_chat && voice_channel != NULL && voice_channel->isActive())
{
LLSD payload;
payload["session_id"] = mSessionID;
LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload);
return;
}
LLFloater::onClickCloseBtn();
}

View File

@ -50,6 +50,7 @@ class LLInventoryCategory;
*/
class LLIMFloater : public LLTransientDockableFloater
{
LOG_CLASS(LLIMFloater);
public:
LLIMFloater(const LLUUID& session_id);
@ -120,6 +121,10 @@ public:
virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; }
protected:
/* virtual */
void onClickCloseBtn();
private:
// process focus events to set a currently active session
/* virtual */ void onFocusLost();

View File

@ -635,6 +635,8 @@ BOOL LLPanelEditWearable::postBuild()
mPanelAlpha = getChild<LLPanel>("edit_alpha_panel");
mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel");
mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height");
mWearablePtr = NULL;
return TRUE;
@ -661,7 +663,9 @@ void LLPanelEditWearable::draw()
updateVerbs();
if (getWearable())
{
updatePanelPickerControls(getWearable()->getType());
EWearableType type = getWearable()->getType();
updatePanelPickerControls(type);
updateTypeSpecificControls(type);
}
LLPanel::draw();
@ -864,6 +868,9 @@ void LLPanelEditWearable::initializePanel()
// set name
mTextEditor->setText(mWearablePtr->getName());
// toggle wearable type-specific controls
toggleTypeSpecificControls(type);
// clear and rebuild visual param list
const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type);
if (!wearable_entry)
@ -922,6 +929,28 @@ void LLPanelEditWearable::initializePanel()
updateVerbs();
}
void LLPanelEditWearable::toggleTypeSpecificControls(EWearableType type)
{
// Toggle controls specific to shape editing panel.
{
bool is_shape = (type == WT_SHAPE);
childSetVisible("sex_radio", is_shape);
childSetVisible("female_icon", is_shape);
childSetVisible("male_icon", is_shape);
}
}
void LLPanelEditWearable::updateTypeSpecificControls(EWearableType type)
{
// Update controls specific to shape editing panel.
if (type == WT_SHAPE)
{
// Update avatar height
std::string avatar_height_str = llformat("%.2f", gAgentAvatarp->mBodySize.mV[VZ]);
mTxtAvatarHeight->setTextArg("[HEIGHT]", avatar_height_str);
}
}
void LLPanelEditWearable::updateScrollingPanelUI()
{
// do nothing if we don't have a valid wearable we're editing

View File

@ -80,6 +80,8 @@ private:
void onColorSwatchCommit(const LLUICtrl*);
void onTexturePickerCommit(const LLUICtrl*);
void updatePanelPickerControls(LLWearableType::EType type);
void toggleTypeSpecificControls(EWearableType type);
void updateTypeSpecificControls(EWearableType type);
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLWearable *mWearablePtr;
@ -91,6 +93,7 @@ private:
LLTextBox *mPanelTitle;
LLTextBox *mDescTitle;
LLTextBox *mTxtAvatarHeight;
// This text editor reference will change each time we edit a new wearable -

View File

@ -6473,3 +6473,19 @@ void LLOfferInfo::forceResponse(InventoryOfferResponse response)
params.functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2));
LLNotifications::instance().forceResponse(params, response);
}
static bool confirm_leave_call_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
const LLSD& payload = notification["payload"];
LLUUID session_id = payload["session_id"];
LLFloater* im_floater = LLFloaterReg::findInstance("impanel", session_id);
if (option == 0 && im_floater != NULL)
{
im_floater->closeFloater();
}
return false;
}
static LLNotificationFunctorRegistration confirm_leave_call_cb("ConfirmLeaveCall", confirm_leave_call_callback);

View File

@ -6041,6 +6041,19 @@ Drag items from inventory onto a person in the resident picker
Avatar '[NAME]' rezzed in [TIME] seconds.
</notification>
<notification
icon="alertmodal.tga"
name="ConfirmLeaveCall"
type="alert">
Are you sure you want to leave this call?
<usetemplate
ignoretext="Confirm before I leave call"
name="okcancelignore"
notext="No"
yestext="Yes"/>
<unique/>
</notification>
<global name="UnsupportedCPU">
- Your CPU speed does not meet the minimum requirements.
</global>

View File

@ -8,54 +8,19 @@
name="edit_shape_panel"
top_pad="10"
width="333" >
<panel
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
<text
follows="top|left|right"
height="50"
left="10"
font="SansSerifSmallBold"
halign="right"
height="12"
layout="topleft"
name="avatar_sex_panel"
left="0"
name="avatar_height"
text_color="EmphasisColor"
top="0"
width="313" >
<text
follows="top|left"
height="16"
layout="topleft"
left="10"
name="gender_text"
width="313">
Gender:
</text>
<radio_group
follows="left|top|right"
left="10"
height="28"
layout="topleft"
name="sex_radio"
top_pad="3"
width="303" >
<radio_item
follows="all"
height="16"
label="Female"
layout="topleft"
left="10"
name="radio"
width="82" />
<radio_item
follows="all"
height="16"
label="Male"
layout="topleft"
left_pad="10"
name="radio2"
width="82" />
</radio_group>
</panel>
width="310">
[HEIGHT] Meters tall
</text>
<panel
border="false"
bg_alpha_color="DkGray2"
@ -63,17 +28,17 @@
background_visible="true"
background_opaque="true"
follows="all"
height="345"
height="388"
label="Shirt"
layout="topleft"
left="10"
name="accordion_panel"
top_pad="10"
top_pad="0"
width="313">
<accordion
layout="topleft"
follows="all"
height ="345"
height ="388"
left="0"
name="wearable_accordion"
top="0"

View File

@ -165,12 +165,59 @@ left="0"
width="313">
<text
follows="top|left|right"
font="SansSerifSmallBold"
height="16"
layout="topleft"
left="10"
name="description_text"
text_color="white"
top="10"
value="Shape:"
width="303" />
width="150" />
<radio_group
follows="left|top|right"
left="210"
height="20"
layout="topleft"
name="sex_radio"
top="5"
width="110">
<radio_item
follows="all"
height="16"
label=""
layout="topleft"
left="0"
name="sex_male"
tool_tip="Male"
width="40" />
<radio_item
follows="all"
height="16"
label=""
layout="topleft"
left_pad="10"
name="sex_female"
tool_tip="Female"
width="40" />
</radio_group>
<!-- graphical labels for the radio buttons above -->
<icon
height="16"
image_name="icons/Male.png"
left="230"
name="male_icon"
tool_tip="Male"
top="7"
width="16" />
<icon
height="16"
image_name="icons/Female.png"
name="female_icon"
left="280"
tool_tip="Female"
top="7"
width="16" />
<text_editor
follows="all"
height="23"
@ -178,6 +225,7 @@ left="0"
layout="topleft"
max_length="300"
name="description"
top_pad="3"
width="290" />
</panel>
<panel
@ -186,8 +234,10 @@ left="0"
layout="topleft"
left="0"
name="edit_subpanel_container"
top_pad="10"
top_pad="2"
width="333">
<!-- the shape editing panel is taller than the others
because it also displays avatar height -->
<panel
filename="panel_edit_shape.xml"
follows="all"
@ -201,141 +251,141 @@ left="0"
<panel
filename="panel_edit_skin.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_skin_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_hair.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_hair_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_eyes.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_eyes_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_shirt.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_shirt_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_pants.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_pants_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_shoes.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_shoes_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_socks.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_socks_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_jacket.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_jacket_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_skirt.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_skirt_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_gloves.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_gloves_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_undershirt.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_undershirt_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_underpants.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_underpants_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_alpha.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_alpha_panel"
top="0"
top="8"
visible="false"
width="333" />
<panel
filename="panel_edit_tattoo.xml"
follows="all"
height="400"
height="392"
layout="topleft"
left="0"
name="edit_tattoo_panel"
top="0"
top="8"
visible="false"
width="333" />
</panel>