From 9c55ff93903d19b22dec63a6db26e9ec3436fbf5 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 6 Nov 2009 22:13:59 +0200 Subject: Fixed normal bug EXT-1509 "Going into mouselook while in a private call ruins the call floater.": - Made callfloater a single instance floater. - Updated floater IM panel visibility change logic. - Added NULL checks for voice client pointers in LLFloaterIMPanel. --HG-- branch : product-engine --- indra/newview/llimpanel.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 7399f1e1b3..0b8b5935f8 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -321,6 +321,9 @@ void LLFloaterIMPanel::draw() // hide/show start call and end call buttons LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID); + if (!voice_channel) + return; + childSetVisible("end_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); childSetVisible("start_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED); childSetEnabled("start_call_btn", enable_connect); @@ -770,10 +773,13 @@ void LLFloaterIMPanel::onVisibilityChange(const LLSD& new_visibility) } LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID); - if (new_visibility.asBoolean() && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED) - LLFloaterReg::showInstance("voice_call", mSessionUUID); - else - LLFloaterReg::hideInstance("voice_call", mSessionUUID); + if (voice_channel && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED) + { + if (new_visibility.asBoolean()) + LLFloaterReg::showInstance("voice_call", mSessionUUID); + else + LLFloaterReg::hideInstance("voice_call", mSessionUUID); + } } void LLFloaterIMPanel::sendMsg() -- cgit v1.2.3 From eecf91653b679b83add99c08a20da5d2d8891436 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Sat, 7 Nov 2009 15:01:04 +0200 Subject: Fixed low bug EXT-1963 "Unexpected gray square in the bottom of Places panel": - Fixed reference to a missing texture. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_places.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index cbbcfe5068..5efacb68be 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -104,7 +104,7 @@ background_visible="true" follows="bottom|right" font="SansSerifSmall" height="19" - image_disabled="ForwardArrow_Disabled" + image_disabled="ForwardArrow_Off" image_selected="ForwardArrow_Press" image_unselected="ForwardArrow_Off" layout="topleft" -- cgit v1.2.3 From e360a444648dfa57c446e7714ea7eaf4db4a1d44 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Sat, 7 Nov 2009 17:20:52 +0200 Subject: Fixed normal bug EXT-2314 "Restore maturity rating in "Landmark" and "Teleport History" views": - Added rating icons and text to "Landmark" and "Teleport History" views. - Removed code for "Last Visited" from Teleport History. --HG-- branch : product-engine --- indra/newview/llpanellandmarkinfo.cpp | 31 +++++++++++++- indra/newview/llpanelplaceinfo.cpp | 17 ++------ indra/newview/llpanelplaceinfo.h | 2 + indra/newview/llpanelplaceprofile.cpp | 48 +++++++++++----------- indra/newview/llpanelplaceprofile.h | 4 +- indra/newview/llpanelplaces.cpp | 1 - .../skins/default/xui/en/panel_landmark_info.xml | 28 +++++++++++++ .../skins/default/xui/en/panel_place_profile.xml | 18 ++++++++ 8 files changed, 107 insertions(+), 42 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 4985663833..f94a59ecef 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -35,6 +35,7 @@ #include "llpanellandmarkinfo.h" #include "llcombobox.h" +#include "lliconctrl.h" #include "lllineeditor.h" #include "lltextbox.h" #include "lltexteditor.h" @@ -58,6 +59,11 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); static LLRegisterPanelClassWrapper t_landmark_info("panel_landmark_info"); +// Statics for textures filenames +static std::string icon_pg; +static std::string icon_m; +static std::string icon_r; + LLPanelLandmarkInfo::LLPanelLandmarkInfo() : LLPanelPlaceInfo() {} @@ -79,6 +85,10 @@ BOOL LLPanelLandmarkInfo::postBuild() mNotesEditor = getChild("notes_editor"); mFolderCombo = getChild("folder_combo"); + icon_pg = getString("icon_PG"); + icon_m = getString("icon_M"); + icon_r = getString("icon_R"); + return TRUE; } @@ -101,9 +111,8 @@ void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) LLPanel* landmark_info_panel = getChild("landmark_info_panel"); bool is_info_type_create_landmark = type == CREATE_LANDMARK; - bool is_info_type_landmark = type == LANDMARK; - landmark_info_panel->setVisible(is_info_type_landmark); + landmark_info_panel->setVisible(type == LANDMARK); getChild("folder_label")->setVisible(is_info_type_create_landmark); mFolderCombo->setVisible(is_info_type_create_landmark); @@ -136,6 +145,24 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) { LLPanelPlaceInfo::processParcelInfo(parcel_data); + // HACK: Flag 0x2 == adult region, + // Flag 0x1 == mature region, otherwise assume PG + if (parcel_data.flags & 0x2) + { + mMaturityRatingIcon->setValue(icon_r); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT)); + } + else if (parcel_data.flags & 0x1) + { + mMaturityRatingIcon->setValue(icon_m); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE)); + } + else + { + mMaturityRatingIcon->setValue(icon_pg); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG)); + } + S32 region_x; S32 region_y; S32 region_z; diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index c600651015..906f8d084b 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -40,6 +40,7 @@ #include "llsdutil_math.h" +#include "lliconctrl.h" #include "llscrollcontainer.h" #include "lltextbox.h" @@ -81,6 +82,7 @@ BOOL LLPanelPlaceInfo::postBuild() mParcelName = getChild("parcel_title"); mDescEditor = getChild("description"); + mMaturityRatingIcon = getChild("maturity_icon"); mMaturityRatingText = getChild("maturity_value"); LLScrollContainer* scroll_container = getChild("place_scroll"); @@ -98,6 +100,7 @@ void LLPanelPlaceInfo::resetLocation() mPosRegion.clearVec(); std::string not_available = getString("not_available"); + mMaturityRatingIcon->setValue(not_available); mMaturityRatingText->setValue(not_available); mRegionName->setText(not_available); mParcelName->setText(not_available); @@ -204,20 +207,6 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) mDescEditor->setText(parcel_data.desc); } - // HACK: Flag 0x2 == adult region, - // Flag 0x1 == mature region, otherwise assume PG - std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG); - if (parcel_data.flags & 0x2) - { - rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT); - } - else if (parcel_data.flags & 0x1) - { - rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE); - } - - mMaturityRatingText->setValue(rating); - S32 region_x; S32 region_y; S32 region_z; diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index ec30397cff..ba32cc4c34 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -41,6 +41,7 @@ #include "llremoteparcelrequest.h" class LLExpandableTextBox; +class LLIconCtrl; class LLInventoryItem; class LLPanelPickEdit; class LLParcel; @@ -117,6 +118,7 @@ protected: LLTextBox* mRegionName; LLTextBox* mParcelName; LLExpandableTextBox* mDescEditor; + LLIconCtrl* mMaturityRatingIcon; LLTextBox* mMaturityRatingText; }; diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 2a9ba4697d..61501cc1b1 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -97,7 +97,6 @@ BOOL LLPanelPlaceProfile::postBuild() setMouseDownCallback(boost::bind(&LLPanelPlaceProfile::onForSaleBannerClick, this)); mParcelOwner = getChild("owner_value"); - mLastVisited = getChild("last_visited_value"); mParcelRatingIcon = getChild("rating_icon"); mParcelRatingText = getChild("rating_value"); @@ -165,7 +164,6 @@ void LLPanelPlaceProfile::resetLocation() std::string not_available = getString("not_available"); mParcelOwner->setValue(not_available); - mLastVisited->setValue(not_available); mParcelRatingIcon->setValue(not_available); mParcelRatingText->setText(not_available); @@ -209,17 +207,13 @@ void LLPanelPlaceProfile::resetLocation() void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) { bool is_info_type_agent = type == AGENT; - bool is_info_type_teleport_history = type == TELEPORT_HISTORY; - getChild("maturity_label")->setVisible(!is_info_type_agent); + mMaturityRatingIcon->setVisible(!is_info_type_agent); mMaturityRatingText->setVisible(!is_info_type_agent); getChild("owner_label")->setVisible(is_info_type_agent); mParcelOwner->setVisible(is_info_type_agent); - getChild("last_visited_label")->setVisible(is_info_type_teleport_history); - mLastVisited->setVisible(is_info_type_teleport_history); - getChild("advanced_info_accordion")->setVisible(is_info_type_agent); switch(type) @@ -238,6 +232,30 @@ void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) LLPanelPlaceInfo::setInfoType(type); } +// virtual +void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) +{ + LLPanelPlaceInfo::processParcelInfo(parcel_data); + + // HACK: Flag 0x2 == adult region, + // Flag 0x1 == mature region, otherwise assume PG + if (parcel_data.flags & 0x2) + { + mMaturityRatingIcon->setValue(icon_r); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT)); + } + else if (parcel_data.flags & 0x1) + { + mMaturityRatingIcon->setValue(icon_m); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE)); + } + else + { + mMaturityRatingIcon->setValue(icon_pg); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG)); + } +} + void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, LLViewerRegion* region, const LLVector3d& pos_global, @@ -521,22 +539,6 @@ void LLPanelPlaceProfile::updateCovenantText(const std::string &text) mCovenantText->setText(text); } -void LLPanelPlaceProfile::updateLastVisitedText(const LLDate &date) -{ - if (date.isNull()) - { - mLastVisited->setText(getString("unknown")); - } - else - { - std::string timeStr = getString("acquired_date"); - LLSD substitution; - substitution["datetime"] = (S32) date.secondsSinceEpoch(); - LLStringUtil::format (timeStr, substitution); - mLastVisited->setText(timeStr); - } -} - void LLPanelPlaceProfile::onForSaleBannerClick() { LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance(); diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index b3ef4acf51..8c30ca92fb 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -50,6 +50,8 @@ public: /*virtual*/ void setInfoType(INFO_TYPE type); + /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + // Displays information about the currently selected parcel // without sending a request to the server. // If is_current_parcel true shows "You Are Here" banner. @@ -61,7 +63,6 @@ public: void updateEstateName(const std::string& name); void updateEstateOwnerName(const std::string& name); void updateCovenantText(const std::string &text); - void updateLastVisitedText(const LLDate &date); private: void onForSaleBannerClick(); @@ -78,7 +79,6 @@ private: LLPanel* mYouAreHerePanel; LLTextBox* mParcelOwner; - LLTextBox* mLastVisited; LLIconCtrl* mParcelRatingIcon; LLTextBox* mParcelRatingText; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 8d117afcfe..3d0fba9426 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -293,7 +293,6 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPosGlobal = hist_items[index].mGlobalPos; mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); - mPlaceProfile->updateLastVisitedText(hist_items[index].mDate); mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 0c24adfad5..b01ddbf75a 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -43,6 +43,16 @@ name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + + + + - - + width="18" /> + + + + + + + + + + + + + + + + + + + + + +