diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 10:55:19 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 10:55:19 +0100 |
commit | 7059173aa920e9c8d1939a0ec9558fc79cbfb3ed (patch) | |
tree | 1e66e2083ad73fcdbc0a76ecf95c33fb20bc63ee /indra | |
parent | 489a5eb9e20256da64749e85254b9511e0919607 (diff) | |
parent | 9ab4d2ca8be2edcafa6cdfc3bd774ebaed444dc8 (diff) |
merge from PE's viewer-trunk
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/keywords.ini | 1 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 28 | ||||
-rw-r--r-- | indra/newview/llimfloater.h | 5 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_edit_shape.xml | 61 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_edit_wearable.xml | 110 |
9 files changed, 189 insertions, 79 deletions
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 0805e94b10..263b73ba23 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -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. diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 46439150a7..d25aa37e16 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -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(); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index f9dd8b9b85..d63246a5cd 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -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(); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 6f2e7c0b20..5aeb3ffc82 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -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 diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 876b22f0a5..cb22891196 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -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 - diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 92af0c485a..fb178f0868 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -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); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index d896cab260..1d7102aaaa 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -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> diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml index e1c574001a..76842e5279 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -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" diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index dc2f085356..afcd4550ca 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -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> |