From 4d9762eb846ae1894f0c31eecb6230803018e730 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 22 Dec 2009 12:26:06 +0200 Subject: work on EXT-3463 - Ambiguity: some system messages are shown as sent from avatar and others are shown as sent from SL --HG-- branch : product-engine --- indra/newview/llimview.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..a521eb56af 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -243,6 +243,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES std::string joined_call = LLTrans::getString("joined_call"); std::string other_avatar_name = ""; + std::string message; + switch(mSessionType) { case AVALINE_SESSION: @@ -255,10 +257,13 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + message = other_avatar_name + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + message = you + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -268,10 +273,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + message = you + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, joined_call); + message = other_avatar_name + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -295,10 +302,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + message = other_avatar_name + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + message = you + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -308,7 +317,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + message = you + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; default: break; -- cgit v1.2.3 From 5121891e473ba6e511c2f2cff2a5c1217e4c93a8 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 22 Dec 2009 17:01:31 +0200 Subject: Update for normal bug EXT-3520 - Can't open Group Notices or Attachments. Attachments will be opened in a preview floater. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6a31bbfa1e..519f58ca95 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -906,7 +906,20 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLFloaterReg::showInstance("preview_texture", LLSD(item_id), take_focus); break; } + case LLAssetType::AT_ANIMATION: + LLFloaterReg::showInstance("preview_anim", LLSD(item_id), take_focus); + break; + case LLAssetType::AT_GESTURE: + LLFloaterReg::showInstance("preview_gesture", LLSD(item_id), take_focus); + break; + case LLAssetType::AT_SCRIPT: + LLFloaterReg::showInstance("preview_script", LLSD(item_id), take_focus); + break; + case LLAssetType::AT_SOUND: + LLFloaterReg::showInstance("preview_sound", LLSD(item_id), take_focus); + break; default: + LLFloaterReg::showInstance("properties", LLSD(item_id), take_focus); break; } } -- cgit v1.2.3 From 3defdaa0071418ce15c0d33a3b25f8338763ccf1 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 23 Dec 2009 13:01:34 +0200 Subject: fix for EXT-2881 Enough space to place 5 chiclets without arrows in bottom bar when voice indicator isn't shown --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 19 +++++++++++++++++-- indra/newview/llchiclet.h | 2 ++ 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 17ef1f41a4..e6f56d89f7 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -477,7 +477,6 @@ void LLIMChiclet::setShowSpeaker(bool show) { mShowSpeaker = show; toggleSpeakerControl(); - onChicletSizeChanged(); } } @@ -502,7 +501,6 @@ void LLIMChiclet::setShowCounter(bool show) { LLChiclet::setShowCounter(show); toggleCounterControl(); - onChicletSizeChanged(); } } @@ -527,6 +525,8 @@ void LLIMChiclet::setRequiredWidth() } reshape(required_width, getRect().getHeight()); + + onChicletSizeChanged(); } void LLIMChiclet::toggleSpeakerControl() @@ -567,6 +567,7 @@ void LLIMChiclet::setShowNewMessagesIcon(bool show) { mNewMessagesIcon->setVisible(show); } + setRequiredWidth(); } bool LLIMChiclet::getShowNewMessagesIcon() @@ -1462,6 +1463,20 @@ void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) } +S32 LLChicletPanel::notifyParent(const LLSD& info) +{ + if(info.has("notification")) + { + std::string str_notification = info["notification"]; + if(str_notification == "size_changes") + { + arrange(); + return 1; + } + } + return LLPanel::notifyParent(info); +} + void LLChicletPanel::arrange() { if(mChicletList.empty()) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 2ab6abfb5b..511b85b0b6 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -1021,6 +1021,8 @@ public: S32 getTotalUnreadIMCount(); + S32 notifyParent(const LLSD& info); + protected: LLChicletPanel(const Params&p); friend class LLUICtrlFactory; -- cgit v1.2.3 From a6694da8841160c591a63f82b6bcc75752db1d19 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 23 Dec 2009 13:07:00 +0200 Subject: Update for low bug EXT-3353 - There's an ability to create classified w/o title and description. Classified name can accept only ascii. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_edit_classified.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml index b5760e977f..1fbf7abda9 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml @@ -103,6 +103,7 @@ top_pad="2" max_length="63" name="classified_name" + prevalidate_callback="ascii" text_color="black" width="290" /> Date: Wed, 23 Dec 2009 13:27:29 +0200 Subject: Update for normal bug EXT-3520 - Can't open Group Notices or Attachments. Disabled generic preview floater as it spawns for all new inventory items. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 519f58ca95..737f7a224d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -919,7 +919,6 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLFloaterReg::showInstance("preview_sound", LLSD(item_id), take_focus); break; default: - LLFloaterReg::showInstance("properties", LLSD(item_id), take_focus); break; } } -- cgit v1.2.3 From fc2596e3c2cc7ca8d9a26cd85ef54c6bb7c17944 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 23 Dec 2009 14:03:02 +0200 Subject: fix for EXT-637 Please, add tooltips with a full names of the landmraks in the Favor bar / Overflow menu rect param actually do nothing. to change tooltip width we may manipulate max_width param. --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 832626e007..28e6f1321b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -162,9 +162,22 @@ public: if (!region_name.empty()) { LLToolTip::Params params; - params.message = llformat("%s\n%s (%d, %d, %d)", getLabelSelected().c_str(), region_name.c_str(), + std::string extra_message = llformat("%s (%d, %d, %d)", region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ()); - params.sticky_rect = calcScreenRect(); + + params.message = llformat("%s\n%s", getLabelSelected().c_str(), extra_message.c_str()); + + LLRect rect = calcScreenRect(); + LLFontGL* standart_font = LLFontGL::getFontSansSerif(); + if(standart_font) + { + S32 w = llmax((S32)(standart_font->getWidthF32(getLabelSelected())+0.5),(S32)(standart_font->getWidthF32(extra_message)+0.5)); + rect.mRight = rect.mLeft + w; + params.max_width = w; + } + + params.sticky_rect = rect; + LLToolTipMgr::instance().show(params); } return TRUE; -- cgit v1.2.3 From 0521baf33951965dfcd5aa6d80ba7624dbadbc19 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 23 Dec 2009 14:08:22 +0200 Subject: Fix for normal bug EXT-3626 - 'Online' accordion doesn't appear after online avatar is added to friends. --HG-- branch : product-engine --- indra/newview/llpanelpeople.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e5846c7318..374af5c059 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -984,6 +984,8 @@ void LLPanelPeople::onTabSelected(const LLSD& param) mNearbyListUpdater->setActive(tab_name == NEARBY_TAB_NAME); updateButtons(); + showFriendsAccordionsIfNeeded(); + if (GROUP_TAB_NAME == tab_name) mFilterEditor->setLabel(getString("groups_filter_label")); else -- cgit v1.2.3 From d07fd64b6fc3f4c6af648ec43b84cd82c7e62fc6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 14:40:52 +0200 Subject: finished EXT-1912 Add handling restrictions of PSTN P2P calls in new IM Floaters chiclets for avaline calls are not spawned anymore --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 6 ++++++ indra/newview/llimview.cpp | 11 +++++++++++ indra/newview/llimview.h | 2 ++ indra/newview/llsyswellwindow.cpp | 8 ++++++-- 4 files changed, 25 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4d5d416907..976b312509 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -148,6 +148,12 @@ void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& nam { if (!getChicletPanel()) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; + + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; + if (getChicletPanel()->findChiclet(session_id)) return; LLIMChiclet* chiclet = createIMChiclet(session_id); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d209060b58..3345f7d0bf 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -483,6 +483,17 @@ bool LLIMModel::LLIMSession::isAdHoc() return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); } +bool LLIMModel::LLIMSession::isP2P() +{ + return IM_NOTHING_SPECIAL == mType; +} + +bool LLIMModel::LLIMSession::isOtherParticipantAvaline() +{ + return !mOtherParticipantIsAvatar; +} + + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { LLIMSession* session = findIMSession(old_session_id); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 3f46b0d754..92caf0af9a 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -75,6 +75,8 @@ public: static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); bool isAdHoc(); + bool isP2P(); + bool isOtherParticipantAvaline(); LLUUID mSessionID; std::string mName; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 8c6ea59407..3cddf6d902 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -743,9 +743,13 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (mMessageList->getItemByValue(session_id)) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; + + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; - if (!gIMMgr->hasSession(session_id)) return; + if (mMessageList->getItemByValue(session_id)) return; addIMRow(session_id, 0, name, other_participant_id); reshapeWindow(); -- cgit v1.2.3 From 4cea2cac115f47e3699f1528f92ce3adcf76d87a Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 16:35:45 +0200 Subject: fixed EXT-3635 States of Call/Leave Call buttons are not properly managed when starting call using Call button in people panels --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 9 ++++++++- indra/newview/llpanelimcontrolpanel.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 3f309b3bf5..a8a75a1feb 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -65,7 +65,11 @@ void LLPanelChatControlPanel::onOpenVoiceControlsClicked() void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { - bool is_call_started = ( new_state >= LLVoiceChannel::STATE_CALL_STARTED ); + updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED); +} + +void LLPanelChatControlPanel::updateButtons(bool is_call_started) +{ childSetVisible("end_call_btn", is_call_started); childSetVisible("voice_ctrls_btn", is_call_started); childSetVisible("call_btn", ! is_call_started); @@ -112,6 +116,9 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id) if(voice_channel) { mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2)); + + //call (either p2p, group or ad-hoc) can be already in started state + updateButtons(voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); } } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 711340efc7..c18be5a6df 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -57,6 +57,8 @@ public: virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + void updateButtons(bool is_call_started); + virtual void setSessionId(const LLUUID& session_id); const LLUUID& getSessionId() { return mSessionId; } -- cgit v1.2.3 From caaa88306f5c29e2c937431efe999ce506e52d09 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 24 Dec 2009 13:06:43 +0200 Subject: =?UTF-8?q?fixed=20EXT-3036=20=E2=80=9CAvatar=20Notes&Privacy:=20'?= =?UTF-8?q?Allow=20this=20person=20to'=20checkboxes=20can=20be=20all=20set?= =?UTF-8?q?=20for=20non-friend=E2=80=9D,=20added=20checkboxes=20cleanup=20?= =?UTF-8?q?on=20panel=20update;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index e9131a342e..913152e259 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -179,6 +179,10 @@ void LLPanelAvatarNotes::onOpen(const LLSD& key) void LLPanelAvatarNotes::fillRightsData() { + childSetValue("status_check", FALSE); + childSetValue("map_check", FALSE); + childSetValue("objects_check", FALSE); + const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); // If true - we are viewing friend's profile, enable check boxes and set values. if(relation) -- cgit v1.2.3 From 6ed43b829b32b99b87cdd9b81e2ea3763fc49c56 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Thu, 24 Dec 2009 13:46:43 +0200 Subject: fixed minor bug EXT-3459 (Not user friendly notification after leaving group while group chat is opened) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f004c95aca..447901f984 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2990,6 +2990,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Error while moderating. + + + You have been removed from the group. + You have been removed from the group. -- cgit v1.2.3 From d36e0604a4935a258713a5872b8439a017fcd0a0 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 24 Dec 2009 14:00:36 +0200 Subject: =?UTF-8?q?fixed=20EXT-3449=20=E2=80=9C"Close"=20and=20"Dock"=20ic?= =?UTF-8?q?ons=20overlap=20title=20of=20"Nearby"=20chat=20window,=20when?= =?UTF-8?q?=20it=20has=20minimal=20size=E2=80=9D,=20added=20minimal=20size?= =?UTF-8?q?=20attribute=20to=20the=20nearby=20chat=20floater;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index 58ba346e50..920f0c909a 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -16,6 +16,7 @@ can_dock="true" bevel_style="in" height="300" + min_width="150" layout="topleft" name="nearby_chat" help_topic="nearby_chat" -- cgit v1.2.3 From 15fb7171186413e0d5662c1af68fa9d6a9182b9a Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Thu, 24 Dec 2009 14:31:12 +0200 Subject: fixed normal bug EXT-3506 Snapshot button should appear pressed and green when snapshot floater is open --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_snapshot.xml | 1 + indra/newview/skins/default/xui/en/panel_bottomtray.xml | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index ec54522d3e..a36a1b591b 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -9,6 +9,7 @@ name="Snapshot" help_topic="snapshot" save_rect="true" + save_visibility="true" title="SNAPSHOT PREVIEW" width="215"> - -- cgit v1.2.3 From b0ed2ab7d92d79f0bb7005a7533c5c0e42f5bce7 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 23 Dec 2009 16:50:16 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- made timeout to fade HAS LEFT Voice participant xml driven --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llcallfloater.cpp | 11 ++++------- indra/newview/llcallfloater.h | 6 ------ 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 455c3587ff..c6abb7ba26 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10378,6 +10378,17 @@ Value Default + VoiceParticipantLeftRemoveDelay + + Comment + Timeout to remove participants who has left Voice chat from the list in Voice Controls Panel + Persist + 1 + Type + S32 + Value + 10 + VoicePort Comment diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 29f37a04b4..a02a30a710 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -95,12 +95,6 @@ BOOL LLCallFloater::LLAvatarListItemRemoveTimer::tick() return TRUE; } - -LLCallFloater::Params::Params() -: voice_left_remove_delay("voice_left_remove_delay", 10) -{ -} - LLCallFloater::LLCallFloater(const LLSD& key) : LLDockableFloater(NULL, false, key) , mSpeakerManager(NULL) @@ -112,8 +106,11 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) , mInitParticipantsVoiceState(false) -, mVoiceLeftRemoveDelay(10) // TODO: mantipov: make xml driven +, mVoiceLeftRemoveDelay(10) { + static LLUICachedControl voice_left_remove_delay ("VoiceParticipantLeftRemoveDelay", 10); + mVoiceLeftRemoveDelay = voice_left_remove_delay; + mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); LLTransientFloaterMgr::getInstance()->addControlView(this); diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 537c57f671..ee3bc9b9fe 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -57,12 +57,6 @@ class LLSpeakerMgr; class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver { public: - struct Params : public LLInitParam::Block - { - Optional voice_left_remove_delay; - - Params(); - }; LOG_CLASS(LLCallFloater); -- cgit v1.2.3 From 170719096ae6f249e7ac0ab7ad368cbaf24115f5 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 23 Dec 2009 17:01:02 +0200 Subject: Fixed low bug EXT-3007 (Viewer stalls while resetting filter in teleport history) --HG-- branch : product-engine --- indra/newview/llpanelteleporthistory.cpp | 223 +++++++++++++++++++++++++++---- 1 file changed, 199 insertions(+), 24 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 596bd2909a..3eb90e919c 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -60,13 +60,18 @@ class LLTeleportHistoryFlatItem : public LLPanel { public: LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl); - virtual ~LLTeleportHistoryFlatItem() {}; + virtual ~LLTeleportHistoryFlatItem(); virtual BOOL postBuild(); + /*virtual*/ S32 notify(const LLSD& info); + S32 getIndex() { return mIndex; } void setIndex(S32 index) { mIndex = index; } const std::string& getRegionName() { return mRegionName;} + void setRegionName(const std::string& name); + void setHighlightedText(const std::string& text); + void updateTitle(); /*virtual*/ void setValue(const LLSD& value); @@ -75,18 +80,51 @@ public: virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); static void showPlaceInfoPanel(S32 index); + + LLHandle getItemHandle() { mItemHandle.bind(this); return mItemHandle; } + private: void onProfileBtnClick(); LLButton* mProfileBtn; + LLTextBox* mTitle; LLTeleportHistoryPanel::ContextMenu *mContextMenu; S32 mIndex; std::string mRegionName; std::string mHighlight; + LLRootHandle mItemHandle; +}; + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +class LLTeleportHistoryFlatItemStorage: public LLSingleton { +protected: + typedef std::vector< LLHandle > flat_item_list_t; + +public: + LLTeleportHistoryFlatItem* getFlatItemForPersistentItem ( + LLTeleportHistoryPanel::ContextMenu *context_menu, + const LLTeleportHistoryPersistentItem& persistent_item, + const S32 cur_item_index, + const std::string &hl); + + void removeItem(LLTeleportHistoryFlatItem* item); + + void purge(); + +private: + + flat_item_list_t mItems; }; +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl) : LLPanel(), mIndex(index), @@ -97,18 +135,37 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml"); } +LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem() +{ +} + //virtual BOOL LLTeleportHistoryFlatItem::postBuild() { - LLTextUtil::textboxSetHighlightedVal(getChild("region"), LLStyle::Params(), mRegionName, mHighlight); + mTitle = getChild("region"); mProfileBtn = getChild("profile_btn"); mProfileBtn->setClickedCallback(boost::bind(&LLTeleportHistoryFlatItem::onProfileBtnClick, this)); + updateTitle(); + return true; } +S32 LLTeleportHistoryFlatItem::notify(const LLSD& info) +{ + if(info.has("detach")) + { + delete mMouseDownSignal; + mMouseDownSignal = NULL; + delete mRightMouseDownSignal; + mRightMouseDownSignal = NULL; + return 1; + } + return 0; +} + void LLTeleportHistoryFlatItem::setValue(const LLSD& value) { if (!value.isMap()) return;; @@ -116,6 +173,25 @@ void LLTeleportHistoryFlatItem::setValue(const LLSD& value) childSetVisible("selected_icon", value["selected"]); } +void LLTeleportHistoryFlatItem::setHighlightedText(const std::string& text) +{ + mHighlight = text; +} + +void LLTeleportHistoryFlatItem::setRegionName(const std::string& name) +{ + mRegionName = name; +} + +void LLTeleportHistoryFlatItem::updateTitle() +{ + LLTextUtil::textboxSetHighlightedVal( + mTitle, + LLStyle::Params(), + mRegionName, + mHighlight); +} + void LLTeleportHistoryFlatItem::onMouseEnter(S32 x, S32 y, MASK mask) { childSetVisible("hovered_icon", true); @@ -155,6 +231,82 @@ void LLTeleportHistoryFlatItem::onProfileBtnClick() LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex); } +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +LLTeleportHistoryFlatItem* +LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem ( + LLTeleportHistoryPanel::ContextMenu *context_menu, + const LLTeleportHistoryPersistentItem& persistent_item, + const S32 cur_item_index, + const std::string &hl) +{ + LLTeleportHistoryFlatItem* item = NULL; + if ( cur_item_index < mItems.size() ) + { + item = mItems[cur_item_index].get(); + if (item->getParent() == NULL) + { + item->setIndex(cur_item_index); + item->setRegionName(persistent_item.mTitle); + item->setHighlightedText(hl); + item->setVisible(TRUE); + item->updateTitle(); + } + else + { + // Item already added to parent + item = NULL; + } + } + + if ( !item ) + { + item = new LLTeleportHistoryFlatItem(cur_item_index, + context_menu, + persistent_item.mTitle, + hl); + mItems.push_back(item->getItemHandle()); + } + + return item; +} + +void LLTeleportHistoryFlatItemStorage::removeItem(LLTeleportHistoryFlatItem* item) +{ + if (item) + { + flat_item_list_t::iterator item_iter = std::find(mItems.begin(), + mItems.end(), + item->getItemHandle()); + if (item_iter != mItems.end()) + { + mItems.erase(item_iter); + } + } +} + +void LLTeleportHistoryFlatItemStorage::purge() +{ + for ( flat_item_list_t::iterator + it = mItems.begin(), + it_end = mItems.end(); + it != it_end; ++it ) + { + LLHandle item_handle = *it; + if ( !item_handle.isDead() && item_handle.get()->getParent() == NULL ) + { + item_handle.get()->die(); + } + } + mItems.clear(); +} + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + LLTeleportHistoryPanel::ContextMenu::ContextMenu() : mMenu(NULL) { @@ -236,6 +388,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel() LLTeleportHistoryPanel::~LLTeleportHistoryPanel() { + LLTeleportHistoryFlatItemStorage::instance().purge(); LLView::deleteViewByHandle(mGearMenuHandle); } @@ -319,8 +472,11 @@ void LLTeleportHistoryPanel::draw() // virtual void LLTeleportHistoryPanel::onSearchEdit(const std::string& string) { - sFilterSubString = string; - showTeleportHistory(); + if (sFilterSubString != string) + { + sFilterSubString = string; + showTeleportHistory(); + } } // virtual @@ -478,16 +634,15 @@ void LLTeleportHistoryPanel::refresh() while (mCurrentItem >= 0) { // Filtering - std::string landmark_title = items[mCurrentItem].mTitle; - LLStringUtil::toUpper(landmark_title); - - std::string::size_type match_offset = sFilterSubString.size() ? landmark_title.find(sFilterSubString) : std::string::npos; - bool passed = sFilterSubString.size() == 0 || match_offset != std::string::npos; - - if (!passed) + if (!sFilterSubString.empty()) { - mCurrentItem--; - continue; + std::string landmark_title(items[mCurrentItem].mTitle); + LLStringUtil::toUpper(landmark_title); + if( std::string::npos == landmark_title.find(sFilterSubString) ) + { + mCurrentItem--; + continue; + } } // Checking whether date of item is earlier, than tab_boundary_date. @@ -521,9 +676,14 @@ void LLTeleportHistoryPanel::refresh() if (curr_flat_view) { - LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, sFilterSubString); - curr_flat_view->addItem(item); - + LLTeleportHistoryFlatItem* item = + LLTeleportHistoryFlatItemStorage::instance() + .getFlatItemForPersistentItem(&mContextMenu, + items[mCurrentItem], + mCurrentItem, + sFilterSubString); + if ( !curr_flat_view->addItem(item, LLUUID::null, ADD_BOTTOM, false) ) + llerrs << "Couldn't add flat item to teleport history." << llendl; if (mLastSelectedItemIndex == mCurrentItem) curr_flat_view->selectItem(item, true); } @@ -534,6 +694,16 @@ void LLTeleportHistoryPanel::refresh() break; } + for (S32 n = mItemContainers.size() - 1; n >= 0; --n) + { + LLAccordionCtrlTab* tab = mItemContainers.get(n); + LLFlatListView* fv = getFlatListViewFromTab(tab); + if (fv) + { + fv->notify(LLSD().with("rearrange", LLSD())); + } + } + mHistoryAccordion->arrange(); updateVerbs(); @@ -566,11 +736,12 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) } const LLTeleportHistoryStorage::slurl_list_t& history_items = mTeleportHistory->getItems(); - LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below - &mContextMenu, - history_items[history_items.size() - 1].mTitle, // Most recent item, it was - sFilterSubString); - // added instead of removed + LLTeleportHistoryFlatItem* item = LLTeleportHistoryFlatItemStorage::instance() + .getFlatItemForPersistentItem(&mContextMenu, + history_items[history_items.size() - 1], // Most recent item, it was added instead of removed + history_items.size(), // index will be decremented inside loop below + sFilterSubString); + fv->addItem(item, LLUUID::null, ADD_TOP); // Index of each item, from last to removed item should be decremented @@ -598,6 +769,8 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) if (item->getIndex() == removed_index) { + LLTeleportHistoryFlatItemStorage::instance().removeItem(item); + fv->removeItem(item); // If flat list becames empty, then accordion tab should be hidden @@ -629,10 +802,12 @@ void LLTeleportHistoryPanel::showTeleportHistory() LLFlatListView* fv = getFlatListViewFromTab(tab); if (fv) - fv->clear(); + { + // Detached panels are managed by LLTeleportHistoryFlatItemStorage + std::vector detached_items; + fv->detachItems(detached_items); + } } - - refresh(); } void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected) -- cgit v1.2.3 From a6f854979acb5e3e83973c5021077362b3643e01 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 17:21:41 +0200 Subject: fixed EXT-3400 Instuction string doesn't fit button's caption in IM floater --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 32eae9d11d..f004c95aca 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2907,7 +2907,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Joining voice call... - Connected, click End Call to hang up + Connected, click Leave Call to hang up Left voice call -- cgit v1.2.3 From 315c6dec0647f6f985d73d2bd28070aa78f3899e Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Wed, 23 Dec 2009 17:25:49 +0200 Subject: fixed normal bug (EXT-2787) Outdated voice chat invitation never hides itself - P2P and AVALINE invitationswill hide now if a call is not valid anymore - GROUP and ADHOC invitations will stay on a screen --HG-- branch : product-engine --- indra/newview/llimview.cpp | 63 +++++++++++++++++++++- indra/newview/llimview.h | 22 +++++--- .../skins/default/xui/en/floater_incoming_call.xml | 4 ++ .../skins/default/xui/en/floater_outgoing_call.xml | 4 ++ 4 files changed, 85 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 3345f7d0bf..e2e3524f74 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1511,7 +1511,7 @@ bool LLOutgoingCallDialog::lifetimeHasExpired() if (mLifetimeTimer.getStarted()) { F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); - if (elapsed_time > LIFETIME) + if (elapsed_time > mLifetime) { return true; } @@ -1532,6 +1532,13 @@ void LLOutgoingCallDialog::show(const LLSD& key) // hide all text at first hideAllText(); + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + // customize text strings // tell the user which voice channel they are leaving if (!mPayload["old_channel_name"].asString().empty()) @@ -1641,6 +1648,43 @@ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : LLCallDialog(payload) { } +void LLIncomingCallDialog::draw() +{ + if (lifetimeHasExpired()) + { + onLifetimeExpired(); + } + LLDockableFloater::draw(); +} + +bool LLIncomingCallDialog::lifetimeHasExpired() +{ + if (mLifetimeTimer.getStarted()) + { + F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); + if (elapsed_time > mLifetime) + { + return true; + } + } + return false; +} + +void LLIncomingCallDialog::onLifetimeExpired() +{ + // check whether a call is valid or not + if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + { + // restart notification's timer if call is still valid + mLifetimeTimer.start(); + } + else + { + // close invitation if call is already not valid + mLifetimeTimer.stop(); + closeFloater(); + } +} BOOL LLIncomingCallDialog::postBuild() { @@ -1650,6 +1694,13 @@ BOOL LLIncomingCallDialog::postBuild() LLSD caller_id = mPayload["caller_id"]; std::string caller_name = mPayload["caller_name"].asString(); + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + std::string call_type; if (gAgent.isInGroup(session_id)) { @@ -1687,6 +1738,16 @@ BOOL LLIncomingCallDialog::postBuild() childSetAction("Start IM", onStartIM, this); childSetFocus("Accept"); + if(mPayload["notify_box_type"] != "VoiceInviteGroup" && mPayload["notify_box_type"] != "VoiceInviteAdHoc") + { + // starting notification's timer for P2P and AVALINE invitations + mLifetimeTimer.start(); + } + else + { + mLifetimeTimer.stop(); + } + return TRUE; } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 92caf0af9a..d0ac819161 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -489,6 +489,14 @@ public: virtual BOOL postBuild(); protected: + // lifetime timer for a notification + LLTimer mLifetimeTimer; + // notification's lifetime in seconds + S32 mLifetime; + static const S32 DEFAULT_LIFETIME = 5; + virtual bool lifetimeHasExpired() {return false;}; + virtual void onLifetimeExpired() {}; + virtual void getAllowedRect(LLRect& rect); LLSD mPayload; }; @@ -501,11 +509,16 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + // check timer state + /*virtual*/ void draw(); + static void onAccept(void* user_data); static void onReject(void* user_data); static void onStartIM(void* user_data); private: + /*virtual*/ bool lifetimeHasExpired(); + /*virtual*/ void onLifetimeExpired(); void processCallResponse(S32 response); }; @@ -524,15 +537,10 @@ public: /*virtual*/ void draw(); private: - // hide all text boxes void hideAllText(); - // lifetime timer for NO_ANSWER notification - LLTimer mLifetimeTimer; - // lifetime duration for NO_ANSWER notification - static const S32 LIFETIME = 5; - bool lifetimeHasExpired(); - void onLifetimeExpired(); + /*virtual*/ bool lifetimeHasExpired(); + /*virtual*/ void onLifetimeExpired(); }; // Globals diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index 81c54ae55e..b9ce11600f 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -10,6 +10,10 @@ help_topic="incoming_call" title="UNKNOWN PERSON IS CALLING" width="410"> + + 5 + Nearby Voice Chat diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index c6bc093c6c..104ac2143f 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -10,6 +10,10 @@ help_topic="outgoing_call" title="CALLING" width="410"> + + 5 + Nearby Voice Chat -- cgit v1.2.3 From d741d040bc0f06f573b4a2507fba2b245191c36d Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 17:47:22 +0200 Subject: fixed win build --HG-- branch : product-engine --- indra/newview/llpanelteleporthistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 3eb90e919c..03b616d280 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -243,7 +243,7 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem ( const std::string &hl) { LLTeleportHistoryFlatItem* item = NULL; - if ( cur_item_index < mItems.size() ) + if ( cur_item_index < (S32) mItems.size() ) { item = mItems[cur_item_index].get(); if (item->getParent() == NULL) -- cgit v1.2.3 From dd20b16ed084b936d2e6c11a48aa34d83828aab5 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 23 Dec 2009 18:13:57 +0200 Subject: no ticket. HACK !!!. HACK code to fix inventory root folder for some broken accounts code executed only once and takes O(N) where N - number of inventory items. --HG-- branch : product-engine --- indra/newview/llinventorymodel.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 1eb8d1bc2c..711114173c 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2654,6 +2654,33 @@ void LLInventoryModel::buildParentChildMap() cat_array_t* catsp = get_ptr_in_map(mParentChildCategoryTree, agent_inv_root_id); if(catsp) { + // *HACK - fix root inventory folder + // some accounts has pbroken inventory root folders + + std::string name = "My Inventory"; + LLUUID prev_root_id = mRootFolderID; + for (parent_cat_map_t::const_iterator it = mParentChildCategoryTree.begin(), + it_end = mParentChildCategoryTree.end(); it != it_end; ++it) + { + cat_array_t* cat_array = it->second; + for (cat_array_t::const_iterator cat_it = cat_array->begin(), + cat_it_end = cat_array->end(); cat_it != cat_it_end; ++cat_it) + { + LLPointer category = *cat_it; + + if(category && category->getPreferredType() != LLFolderType::FT_ROOT_INVENTORY) + continue; + if ( category && 0 == LLStringUtil::compareInsensitive(name, category->getName()) ) + { + if(category->getUUID()!=mRootFolderID) + { + LLUUID& new_inv_root_folder_id = const_cast(mRootFolderID); + new_inv_root_folder_id = category->getUUID(); + } + } + } + } + // 'My Inventory', // root of the agent's inv found. // The inv tree is built. -- cgit v1.2.3 From 40b8a7a3284daa90d3b0e278e8afb5b80b544d0d Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 23 Dec 2009 18:26:21 +0200 Subject: Fixed normal bug EXT-3628 ("Connecting to.." popup appears behind voice control panel while calling), removed temporary workaround. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 9 --------- indra/newview/llspeakbutton.cpp | 2 +- indra/newview/llvoicechannel.cpp | 11 +++++++++++ indra/newview/llvoicechannel.h | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c222ced98f..29f37a04b4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -291,15 +291,6 @@ void LLCallFloater::updateSession() if (show_me) { setVisible(true); - // Workaround(EM): Set current call dialog to front most because - // connect/leaving popups should appear on top of VCP. - // See bug EXT-3628. - LLOutgoingCallDialog* instance = - LLFloaterReg::findTypedInstance("outgoing_call", LLOutgoingCallDialog::OCD_KEY); - if(instance && instance->getVisible()) - { - instance->setFrontmost(); - } } } } diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 90214a1bd7..8f2c877c7a 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -123,7 +123,7 @@ LLSpeakButton::LLSpeakButton(const Params& p) mOutputMonitor->setIsAgentControl(true); //*TODO find a better place to do that - LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1)); + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true); } LLSpeakButton::~LLSpeakButton() diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 69d2458217..993853b9a6 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -446,6 +446,17 @@ void LLVoiceChannel::resume() } } +boost::signals2::connection LLVoiceChannel::setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front) +{ + if (at_front) + { + return sCurrentVoiceChannelChangedSignal.connect(cb, boost::signals2::at_front); + } + else + { + return sCurrentVoiceChannelChangedSignal.connect(cb); + } +} // // LLVoiceChannelGroup diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 77801142cb..cb86671305 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -64,7 +64,7 @@ public: typedef boost::function channel_changed_callback_t; typedef boost::signals2::signal channel_changed_signal_t; static channel_changed_signal_t sCurrentVoiceChannelChangedSignal; - static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb) { return sCurrentVoiceChannelChangedSignal.connect(cb); } + static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false); LLVoiceChannel(const LLUUID& session_id, const std::string& session_name); -- cgit v1.2.3 From 425fd9c6e0f68630191078a34a05bed518156efb Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 18:35:27 +0200 Subject: Fixed normal bug EXT-3299 "Can't drag and drop landmarks into an empty favorites folder through landmarksSP" - Added drag and drop for empty inventory panel. Dropped item gets to the root folder. - Fixed issue with empty "Landmarks" inventory panel not displaying "No matching items..." message. - Removed accordion updating and hiding in idle routine. This invalidates EXT-2346 "My Landmarks accordion panels shouldn't be displayed if there are no landmarks in respective folders" --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 7 +++ indra/newview/llinventorypanel.cpp | 8 +++- indra/newview/llpanellandmarks.cpp | 95 +++++++++++++++----------------------- indra/newview/llpanellandmarks.h | 18 +++----- 4 files changed, 56 insertions(+), 72 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 9cca1b07db..474d2ca21f 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1822,6 +1822,13 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + // When there are no visible children drag and drop is handled + // by the folder which is the hierarchy root. + if (!handled && !hasVisibleChildren()) + { + handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); + } + if (handled) { lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderView" << llendl; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 082b7a9468..164e72e621 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -628,9 +628,15 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + // If folder view is empty the (x, y) point won't be in its rect + // so the handler must be called explicitly. + if (!mFolders->hasVisibleChildren()) + { + handled = mFolders->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } + if (handled) { mFolders->setDragAndDropThisFrame(); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index e16bac2098..c627c60940 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -68,12 +68,13 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn"; // helper functions static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string); static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list); +static bool category_has_descendents(LLInventorySubTreePanel* inventory_list); /** - * Bridge to support knowing when the inventory has changed to update folder (open/close) state + * Bridge to support knowing when the inventory has changed to update folder (open/close) state * for landmarks panels. * - * Due to Inventory data are loaded in background we need to save folder state each time + * Due to Inventory data are loaded in background we need to save folder state each time * next level is loaded. See EXT-3094. */ class LLLandmarksPanelObserver : public LLInventoryObserver @@ -90,6 +91,7 @@ private: void LLLandmarksPanelObserver::changed(U32 mask) { mLP->saveFolderStateIfNoFilter(); + mLP->updateShowFolderState(); } LLLandmarksPanel::LLLandmarksPanel() @@ -134,22 +136,12 @@ BOOL LLLandmarksPanel::postBuild() getChild("tab_favorites")->setDisplayChildren(true); getChild("tab_landmarks")->setDisplayChildren(true); - gIdleCallbacks.addFunction(LLLandmarksPanel::doIdle, this); return TRUE; } // virtual void LLLandmarksPanel::onSearchEdit(const std::string& string) { - // show all folders in Landmarks Accordion for empty filter - if (mLandmarksInventoryPanel->getFilter()) - { - mLandmarksInventoryPanel->setShowFolderState(string.empty() ? - LLInventoryFilter::SHOW_ALL_FOLDERS : - LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS - ); - } - // give FolderView a chance to be refreshed. So, made all accordions visible for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { @@ -173,6 +165,10 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string) if (sFilterSubString != string) sFilterSubString = string; + + // show all folders in Landmarks Accordion for empty filter + // only if Landmarks inventory folder is not empty + updateShowFolderState(); } // virtual @@ -262,6 +258,23 @@ void LLLandmarksPanel::saveFolderStateIfNoFilter() save_folder_state_if_no_filter(mLibraryInventoryPanel); } +void LLLandmarksPanel::updateShowFolderState() +{ + if (!mLandmarksInventoryPanel->getFilter()) + return; + + bool show_all_folders = mLandmarksInventoryPanel->getRootFolder()->getFilterSubString().empty(); + if (show_all_folders) + { + show_all_folders = category_has_descendents(mLandmarksInventoryPanel); + } + + mLandmarksInventoryPanel->setShowFolderState(show_all_folders ? + LLInventoryFilter::SHOW_ALL_FOLDERS : + LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS + ); +} + ////////////////////////////////////////////////////////////////////////// // PROTECTED METHODS ////////////////////////////////////////////////////////////////////////// @@ -778,46 +791,6 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata) } } -void LLLandmarksPanel::updateFilteredAccordions() -{ - LLInventoryPanel* inventory_list = NULL; - LLAccordionCtrlTab* accordion_tab = NULL; - bool needs_arrange = false; - - for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) - { - accordion_tab = *iter; - - accordion_tab->setVisible(TRUE); - - inventory_list = dynamic_cast (accordion_tab->getAccordionView()); - if (NULL == inventory_list) continue; - - // This doesn't seem to work correctly. Disabling for now. -Seraph - // Enabled to show/hide accordions with/without landmarks. See EXT-2346. (Seth PE) - LLFolderView* fv = inventory_list->getRootFolder(); - - // arrange folder view contents to draw its descendants if it has any - fv->arrangeFromRoot(); - - bool has_descendants = fv->hasFilteredDescendants(); - if (!has_descendants) - needs_arrange = true; - - accordion_tab->setVisible(has_descendants); - - //accordion_tab->setVisible(TRUE); - } - - // we have to arrange accordion tabs for cases when filter string is less restrictive but - // all items are still filtered. - if (needs_arrange) - { - static LLAccordionCtrl* accordion = getChild("landmarks_accordion"); - accordion->arrange(); - } -} - /* Processes such actions: cut/rename/delete/paste actions @@ -926,13 +899,6 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg return true; } -// static -void LLLandmarksPanel::doIdle(void* landmarks_panel) -{ - LLLandmarksPanel* panel = (LLLandmarksPanel* ) landmarks_panel; - panel->updateFilteredAccordions(); -} - void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark) { LLVector3d landmark_global_pos; @@ -1067,4 +1033,15 @@ static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_li // inventory_list->saveFolderState(); // *TODO: commented out to fix build } } + +static bool category_has_descendents(LLInventorySubTreePanel* inventory_list) +{ + LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getStartFolderID()); + if (category) + { + return category->getDescendentCount() > 0; + } + + return false; +} // EOF diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index b0e537f647..590fa395b6 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -72,6 +72,12 @@ public: */ void saveFolderStateIfNoFilter(); + /** + * Update filter ShowFolderState setting to show empty folder message + * if Landmarks inventory folder is empty. + */ + void updateShowFolderState(); + protected: /** * @return true - if current selected panel is not null and selected item is a landmark @@ -111,13 +117,6 @@ private: bool isActionEnabled(const LLSD& command_name) const; void onCustomAction(const LLSD& command_name); - /** - * Updates accordions according to filtered items in lists. - * - * It hides accordion for empty lists - */ - void updateFilteredAccordions(); - /** * Determines if selected item can be modified via context/gear menu. * @@ -132,11 +131,6 @@ private: */ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); - /** - * Static callback for gIdleCallbacks to perform actions out of drawing - */ - static void doIdle(void* landmarks_panel); - /** * Landmark actions callbacks. Fire when a landmark is loaded from the list. */ -- cgit v1.2.3 From 75f6bdb469c01fbfb4b26603864d6616b70374f0 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 18:46:28 +0200 Subject: No ticket. Removed obsolete code for saving Places/My Landmarks folders state. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 27 +++------------------------ indra/newview/llpanellandmarks.h | 5 ----- 2 files changed, 3 insertions(+), 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index c627c60940..7b64f7e221 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -67,15 +67,12 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn"; // helper functions static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string); -static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list); static bool category_has_descendents(LLInventorySubTreePanel* inventory_list); /** - * Bridge to support knowing when the inventory has changed to update folder (open/close) state - * for landmarks panels. - * - * Due to Inventory data are loaded in background we need to save folder state each time - * next level is loaded. See EXT-3094. + * Bridge to support knowing when the inventory has changed to update Landmarks tab + * ShowFolderState filter setting to show all folders when the filter string is empty and + * empty folder message when Landmarks inventory category has no children. */ class LLLandmarksPanelObserver : public LLInventoryObserver { @@ -90,7 +87,6 @@ private: void LLLandmarksPanelObserver::changed(U32 mask) { - mLP->saveFolderStateIfNoFilter(); mLP->updateShowFolderState(); } @@ -250,14 +246,6 @@ void LLLandmarksPanel::onSelectorButtonClicked() } } -void LLLandmarksPanel::saveFolderStateIfNoFilter() -{ - save_folder_state_if_no_filter(mFavoritesInventoryPanel); - save_folder_state_if_no_filter(mLandmarksInventoryPanel); - save_folder_state_if_no_filter(mMyInventoryPanel); - save_folder_state_if_no_filter(mLibraryInventoryPanel); -} - void LLLandmarksPanel::updateShowFolderState() { if (!mLandmarksInventoryPanel->getFilter()) @@ -1025,15 +1013,6 @@ static void filter_list(LLInventorySubTreePanel* inventory_list, const std::stri } -static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list) -{ - // save current folder open state if no filter currently applied - if (inventory_list->getRootFolder() && inventory_list->getRootFolder()->getFilterSubString().empty()) - { - // inventory_list->saveFolderState(); // *TODO: commented out to fix build - } -} - static bool category_has_descendents(LLInventorySubTreePanel* inventory_list) { LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getStartFolderID()); diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 590fa395b6..9b02f73afa 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -67,11 +67,6 @@ public: mCurrentSelectedList = inventory_list; } - /** - * Saves folder state for all Inventory Panels if there are no applied filter. - */ - void saveFolderStateIfNoFilter(); - /** * Update filter ShowFolderState setting to show empty folder message * if Landmarks inventory folder is empty. -- cgit v1.2.3 From 798ba45606b4e4affcfde157ec64e877dd39e91c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 18:55:35 +0200 Subject: Fixed EXT-3348 "State of all folders (expanded/collapsed) in "My Landmarks" tab isn't saved after switching to "Teleport History" tab and back" - Disabled restoring folder state when empty filter is not changed. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 7b64f7e221..6a98210830 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -985,7 +985,7 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark) static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string) { // When search is cleared, restore the old folder state. - if (string == "") + if (!inventory_list->getRootFolder()->getFilterSubString().empty() && string == "") { inventory_list->setFilterSubString(LLStringUtil::null); // Re-open folders that were open before @@ -1010,7 +1010,6 @@ static void filter_list(LLInventorySubTreePanel* inventory_list, const std::stri // Set new filter string inventory_list->setFilterSubString(string); - } static bool category_has_descendents(LLInventorySubTreePanel* inventory_list) -- cgit v1.2.3 From 46948d9fcc9149c3c416167f166aff6ce8fa88d5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 23 Dec 2009 20:00:48 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- made Avatar Item Voice States xml driven. Added fake xml panel file with one textbox per style. Style of the appropriate textbox is applied to avatar item's name -- It was necessary to change visibility of the LLTExtBase::getDefaultStyle() to public. --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 65 +++++++++++++++++++++++++++++--------- indra/newview/llavatarlistitem.h | 12 ++++++- indra/newview/llcallfloater.cpp | 19 ++--------- 3 files changed, 64 insertions(+), 32 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index c8544bc3fb..d70e3c61b9 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -183,28 +183,21 @@ void LLAvatarListItem::setHighlight(const std::string& highlight) setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight); } -void LLAvatarListItem::setStyle(const LLStyle::Params& new_style) +void LLAvatarListItem::setStyle(EItemStyle voice_state) { -// LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle = new_style); + voice_state_map_t mVoiceStateMap = getItemStylesParams(); - // Active group should be bold. - LLFontDescriptor new_desc(mAvatarName->getDefaultFont()->getFontDesc()); - - new_desc.setStyle(new_style.font()->getFontDesc().getStyle()); - // *NOTE dzaporozhan - // On Windows LLFontGL::NORMAL will not remove LLFontGL::BOLD if font - // is predefined as bold (SansSerifSmallBold, for example) -// new_desc.setStyle(active ? LLFontGL::BOLD : LLFontGL::NORMAL); - LLFontGL* new_font = LLFontGL::getFont(new_desc); - -// - mAvatarNameStyle.font = new_font; + mAvatarNameStyle = mVoiceStateMap[voice_state]; // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. - mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle/* = new_style*/); + mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle); + + // *TODO: move icon colors into colors.xml + mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke); } + void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) { if (mAvatarId.notNull()) @@ -418,3 +411,45 @@ std::string LLAvatarListItem::formatSeconds(U32 secs) args["[COUNT]"] = llformat("%u", count); return getString(fmt, args); } + +// static +LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() +{ + static voice_state_map_t item_styles_params_map; + if (!item_styles_params_map.empty()) return item_styles_params_map; + + LLPanel::Params params = LLUICtrlFactory::getDefaultParams(); + LLPanel* params_panel = LLUICtrlFactory::create(params); + + BOOL sucsess = LLUICtrlFactory::instance().buildPanel(params_panel, "panel_avatar_list_item_params.xml"); + + if (sucsess) + { + + item_styles_params_map.insert( + std::make_pair(IS_DEFAULT, + params_panel->getChild("default_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_VOICE_INVITED, + params_panel->getChild("voice_call_invited_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_VOICE_JOINED, + params_panel->getChild("voice_call_joined_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_VOICE_LEFT, + params_panel->getChild("voice_call_left_style")->getDefaultStyle())); + } + else + { + item_styles_params_map.insert(std::make_pair(IS_DEFAULT, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params())); + } + if (params_panel) params_panel->die(); + + return item_styles_params_map; +} diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 0e058f75db..d544ed459e 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -46,6 +46,13 @@ class LLAvatarIconCtrl; class LLAvatarListItem : public LLPanel, public LLFriendObserver { public: + typedef enum e_item_style_type { + IS_DEFAULT, + IS_VOICE_INVITED, + IS_VOICE_JOINED, + IS_VOICE_LEFT, + } EItemStyle; + class ContextMenu { public: @@ -73,7 +80,7 @@ public: void setOnline(bool online); void setName(const std::string& name); void setHighlight(const std::string& highlight); - void setStyle(const LLStyle::Params& new_style); + void setStyle(EItemStyle voice_state); void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly @@ -118,6 +125,9 @@ private: std::string formatSeconds(U32 secs); + typedef std::map voice_state_map_t; + static voice_state_map_t getItemStylesParams(); + LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; LLTextBox* mLastInteractionTime; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index a02a30a710..1c65eaba9c 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -597,38 +597,25 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) setState(item->getAvatarId(), state); - LLStyle::Params speaker_style; - LLFontDescriptor new_desc(speaker_style.font()->getFontDesc()); - switch (state) { case STATE_INVITED: - new_desc.setStyle(LLFontGL::NORMAL); + item->setStyle(LLAvatarListItem::IS_VOICE_INVITED); break; case STATE_JOINED: removeVoiceRemoveTimer(item->getAvatarId()); - new_desc.setStyle(LLFontGL::NORMAL); + item->setStyle(LLAvatarListItem::IS_VOICE_JOINED); break; case STATE_LEFT: { setVoiceRemoveTimer(item->getAvatarId()); - new_desc.setStyle(LLFontGL::ITALIC); + item->setStyle(LLAvatarListItem::IS_VOICE_LEFT); } break; default: llwarns << "Unrecognized avatar panel state (" << state << ")" << llendl; break; } - - LLFontGL* new_font = LLFontGL::getFont(new_desc); - speaker_style.font = new_font; - item->setStyle(speaker_style); - -// if () - { - // found speaker is in voice, mark him as online - item->setOnline(STATE_JOINED == state); - } } void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) -- cgit v1.2.3 From de485d96a45e53b14a853696c92b4b70b5778879 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 23 Dec 2009 20:15:48 +0200 Subject: Fixed spelling and a wrong doxygen tag. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 4 ++-- indra/newview/llcallfloater.h | 4 ++-- indra/newview/llparticipantlist.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c222ced98f..18dfc43220 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -280,7 +280,7 @@ void LLCallFloater::updateSession() bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; childSetVisible("leave_call_btn", !is_local_chat); - refreshPartisipantList(); + refreshParticipantList(); updateAgentModeratorState(); //show floater for voice calls @@ -304,7 +304,7 @@ void LLCallFloater::updateSession() } } -void LLCallFloater::refreshPartisipantList() +void LLCallFloater::refreshParticipantList() { // lets forget states from the previous session // for timers... diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 537c57f671..558f02d97e 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -114,7 +114,7 @@ private: /** * Refreshes participant list according to current Voice Channel */ - void refreshPartisipantList(); + void refreshParticipantList(); /** * Handles event on avatar list is refreshed after it was marked dirty. @@ -133,7 +133,7 @@ private: /** * Sets initial participants voice states in avatar list (Invited, Joined, Has Left). * - * @see refreshPartisipantList() + * @see refreshParticipantList() * @see onAvatarListRefreshed() * @see mInitParticipantsVoiceState */ diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 7d5944ea2b..424843d432 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -353,7 +353,7 @@ bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointergetValue().asUUID(); LLPointer speaker = mParent.mSpeakerMgr->findSpeaker(speaker_id); -- cgit v1.2.3 From def2fe77ce1608997696d7703887b30ca688d23c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 21:10:00 +0200 Subject: Fixed normal bug EXT-3689 "Places/My Landmarks: "Collapse all folders" from gear menu closes root folder in landmarks accordions" - Added reopening root folder after all folders are collapsed. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 6a98210830..716a914306 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -661,7 +661,12 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) } else if ("collapse_all" == command_name) { - root_folder->closeAllFolders(); + root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + + // The top level folder is invisible, it must be open to + // display its sub-folders. + root_folder->openTopLevelFolders(); + root_folder->arrangeAll(); } else if ( "sort_by_date" == command_name) { -- cgit v1.2.3 From 2773a3bb7b864f61064543b4bdbb61dd40bdb298 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 24 Dec 2009 13:13:49 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- added possibility to set avatar item online/offline styles via xml. -- commited fake xml panel file with styles missed in previous commit. --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 15 ++++++++++++--- indra/newview/llavatarlistitem.h | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index d70e3c61b9..76e2f2191a 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -166,8 +166,7 @@ void LLAvatarListItem::setOnline(bool online) mOnlineStatus = (EOnlineStatus) online; // Change avatar name font style depending on the new online status. - mAvatarNameStyle.color = online ? LLColor4::white : LLColor4::grey; - setNameInternal(mAvatarName->getText(), mHighlihtSubstring); + setStyle(online ? IS_ONLINE : IS_OFFLINE); // Make the icon fade if the avatar goes offline. mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke); @@ -192,7 +191,7 @@ void LLAvatarListItem::setStyle(EItemStyle voice_state) // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. - mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle); + setNameInternal(mAvatarName->getText(), mHighlihtSubstring); // *TODO: move icon colors into colors.xml mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke); @@ -441,6 +440,14 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() item_styles_params_map.insert( std::make_pair(IS_VOICE_LEFT, params_panel->getChild("voice_call_left_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_ONLINE, + params_panel->getChild("online_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_OFFLINE, + params_panel->getChild("offline_style")->getDefaultStyle())); } else { @@ -448,6 +455,8 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_ONLINE, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_OFFLINE, LLStyle::Params())); } if (params_panel) params_panel->die(); diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index d544ed459e..628061b033 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -51,6 +51,8 @@ public: IS_VOICE_INVITED, IS_VOICE_JOINED, IS_VOICE_LEFT, + IS_ONLINE, + IS_OFFLINE, } EItemStyle; class ContextMenu -- cgit v1.2.3 From d75ba371a2fbbd5af981168dffe86079357ef719 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 24 Dec 2009 14:24:09 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- made Avatar List Item icon color xml-driven. --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 43 +++++++++++++++++++++++++++++----- indra/newview/llavatarlistitem.h | 3 +++ indra/newview/skins/default/colors.xml | 18 ++++++++++++++ 3 files changed, 58 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 76e2f2191a..61361d78e6 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -158,7 +158,6 @@ void LLAvatarListItem::changed(U32 mask) void LLAvatarListItem::setOnline(bool online) { // *FIX: setName() overrides font style set by setOnline(). Not an issue ATM. - // *TODO: Make the colors configurable via XUI. if (mOnlineStatus != E_UNKNOWN && (bool) mOnlineStatus == online) return; @@ -167,9 +166,6 @@ void LLAvatarListItem::setOnline(bool online) // Change avatar name font style depending on the new online status. setStyle(online ? IS_ONLINE : IS_OFFLINE); - - // Make the icon fade if the avatar goes offline. - mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke); } void LLAvatarListItem::setName(const std::string& name) @@ -193,8 +189,8 @@ void LLAvatarListItem::setStyle(EItemStyle voice_state) // hyperlinks, as their styles will be wrong. setNameInternal(mAvatarName->getText(), mHighlihtSubstring); - // *TODO: move icon colors into colors.xml - mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke); + icon_color_map_t item_icon_color_map = getItemIconColorMap(); + mAvatarIcon->setColor(item_icon_color_map[voice_state]); } void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) @@ -462,3 +458,38 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() return item_styles_params_map; } + +// static +LLAvatarListItem::icon_color_map_t LLAvatarListItem::getItemIconColorMap() +{ + static icon_color_map_t item_icon_color_map; + if (!item_icon_color_map.empty()) return item_icon_color_map; + + item_icon_color_map.insert( + std::make_pair(IS_DEFAULT, + LLUIColorTable::instance().getColor("AvatarListItemIconDefaultColor", LLColor4::white))); + + item_icon_color_map.insert( + std::make_pair(IS_VOICE_INVITED, + LLUIColorTable::instance().getColor("AvatarListItemIconVoiceInvitedColor", LLColor4::white))); + + item_icon_color_map.insert( + std::make_pair(IS_VOICE_JOINED, + LLUIColorTable::instance().getColor("AvatarListItemIconVoiceJoinedColor", LLColor4::white))); + + item_icon_color_map.insert( + std::make_pair(IS_VOICE_LEFT, + LLUIColorTable::instance().getColor("AvatarListItemIconVoiceLeftColor", LLColor4::white))); + + item_icon_color_map.insert( + std::make_pair(IS_ONLINE, + LLUIColorTable::instance().getColor("AvatarListItemIconOnlineColor", LLColor4::white))); + + item_icon_color_map.insert( + std::make_pair(IS_OFFLINE, + LLUIColorTable::instance().getColor("AvatarListItemIconOfflineColor", LLColor4::white))); + + return item_icon_color_map; +} + +// EOF diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 628061b033..ed556fbcb4 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -130,6 +130,9 @@ private: typedef std::map voice_state_map_t; static voice_state_map_t getItemStylesParams(); + typedef std::map icon_color_map_t; + static icon_color_map_t getItemIconColorMap(); + LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; LLTextBox* mLastInteractionTime; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 706245a479..cb511c2f0b 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -101,6 +101,24 @@ + + + + + + -- cgit v1.2.3 From 8f81b5dbe4ff0a0d6486e5325250650986f6a81e Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 24 Dec 2009 14:31:48 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- Code cleaned up: renamed variables related to item styles, -- changed signature of LLAvatarListItem::getItemStylesParams & LLAvatarListItem::getItemIconColorMap to return a reference to avoid calling of plural copy constructors. --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 16 ++++++++-------- indra/newview/llavatarlistitem.h | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 61361d78e6..8bc11b0c1c 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -178,19 +178,19 @@ void LLAvatarListItem::setHighlight(const std::string& highlight) setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight); } -void LLAvatarListItem::setStyle(EItemStyle voice_state) +void LLAvatarListItem::setStyle(EItemStyle item_style) { - voice_state_map_t mVoiceStateMap = getItemStylesParams(); + item_style_map_t& item_styles_params_map = getItemStylesParams(); - mAvatarNameStyle = mVoiceStateMap[voice_state]; + mAvatarNameStyle = item_styles_params_map[item_style]; // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. setNameInternal(mAvatarName->getText(), mHighlihtSubstring); - icon_color_map_t item_icon_color_map = getItemIconColorMap(); - mAvatarIcon->setColor(item_icon_color_map[voice_state]); + icon_color_map_t& item_icon_color_map = getItemIconColorMap(); + mAvatarIcon->setColor(item_icon_color_map[item_style]); } void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) @@ -408,9 +408,9 @@ std::string LLAvatarListItem::formatSeconds(U32 secs) } // static -LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() +LLAvatarListItem::item_style_map_t& LLAvatarListItem::getItemStylesParams() { - static voice_state_map_t item_styles_params_map; + static item_style_map_t item_styles_params_map; if (!item_styles_params_map.empty()) return item_styles_params_map; LLPanel::Params params = LLUICtrlFactory::getDefaultParams(); @@ -460,7 +460,7 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() } // static -LLAvatarListItem::icon_color_map_t LLAvatarListItem::getItemIconColorMap() +LLAvatarListItem::icon_color_map_t& LLAvatarListItem::getItemIconColorMap() { static icon_color_map_t item_icon_color_map; if (!item_icon_color_map.empty()) return item_icon_color_map; diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index ed556fbcb4..8e359f16b3 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -82,7 +82,7 @@ public: void setOnline(bool online); void setName(const std::string& name); void setHighlight(const std::string& highlight); - void setStyle(EItemStyle voice_state); + void setStyle(EItemStyle item_style); void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly @@ -127,11 +127,11 @@ private: std::string formatSeconds(U32 secs); - typedef std::map voice_state_map_t; - static voice_state_map_t getItemStylesParams(); + typedef std::map item_style_map_t; + static item_style_map_t& getItemStylesParams(); typedef std::map icon_color_map_t; - static icon_color_map_t getItemIconColorMap(); + static icon_color_map_t& getItemIconColorMap(); LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; -- cgit v1.2.3 From a1528c45594e5fc57eb956c853126f9d9f3fc387 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 24 Dec 2009 15:06:48 +0200 Subject: Fixed normal bug EXT-3678 ( IM well button becomes "unlit" after starting voice session) -- do nothing in Wells in case the same count of unread messages comes. --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index e6f56d89f7..154a711431 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -173,6 +173,9 @@ LLSysWellChiclet::~LLSysWellChiclet() void LLSysWellChiclet::setCounter(S32 counter) { + // do nothing if the same counter is coming. EXT-3678. + if (counter == mCounter) return; + // note same code in LLChicletNotificationCounterCtrl::setCounter(S32 counter) std::string s_count; if(counter != 0) -- cgit v1.2.3 From 404f164b5cfb48f3b6974e078d6d0817b7b7ff4d Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Thu, 24 Dec 2009 16:29:38 +0200 Subject: implemented normal task (EXT-2211) Add textual indication (IM messages) about incoming voice calls and reactions on them (All types of IMs) - added textual indications about call starters for Group and AdHoc calls --HG-- branch : product-engine --- indra/newview/llimview.cpp | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e2e3524f74..8c33c94bbe 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -248,7 +248,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(mSessionType) { case AVALINE_SESSION: - // *TODO: test avaline calls (EXT-2211) + // no text notifications + break; case P2P_SESSION: gCacheName->getFullName(mOtherParticipantID, other_avatar_name); @@ -283,28 +284,14 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } - - // Update speakers list when connected - if (LLVoiceChannel::STATE_CONNECTED == new_state) - { - mSpeakers->update(true); - } - break; case GROUP_SESSION: case ADHOC_SESSION: - // *TODO: determine call starter's name "other_avatar_name" (EXT-2211) - // decide how to show notifications for a group/adhoc chat already opened - // for now there is no notification from voice channel for this case if(direction == LLVoiceChannel::INCOMING_CALL) { switch(new_state) { - case LLVoiceChannel::STATE_CALL_STARTED : - message = other_avatar_name + " " + started_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); - break; case LLVoiceChannel::STATE_CONNECTED : message = you + " " + joined_call; LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); @@ -324,13 +311,11 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } - - // Update speakers list when connected - if (LLVoiceChannel::STATE_CONNECTED == new_state) - { - mSpeakers->update(true); - } - break; + } + // Update speakers list when connected + if (LLVoiceChannel::STATE_CONNECTED == new_state) + { + mSpeakers->update(true); } } @@ -1878,6 +1863,14 @@ void LLIncomingCallDialog::processCallResponse(S32 response) new LLViewerChatterBoxInvitationAcceptResponder( session_id, inv_type)); + + // send notification message to the corresponding chat + if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc") + { + std::string started_call = LLTrans::getString("started_call"); + std::string message = mPayload["caller_name"].asString() + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message); + } } } if (voice) -- cgit v1.2.3 From a778ecc6c0c15c4d30c4b4a301fa21bdbeb4969b Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 24 Dec 2009 16:33:38 +0200 Subject: EXT-2881 Enough space to place 5 chiclets without arrows in bottom bar when voice indicator isn't shown but bug description has nothing to do with bug... --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 5ae808581d..2b5e7240f2 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -248,7 +248,7 @@ top="0" name="chiclet_list_panel" width="189" - min_width="180" + min_width="100" user_resize="false" auto_resize="true">