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("edit_alpha_panel"); mPanelTattoo = getChild("edit_tattoo_panel"); + mTxtAvatarHeight = mPanelShape->getChild("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. + +Are you sure you want to leave this call? + + + + - Your CPU speed does not meet the minimum requirements. 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" > - - - Gender: - - - - - - + width="310"> + [HEIGHT] Meters tall + + width="150" /> + + + + + + + +