From 33d76f152ee1df7600f157c627ce5f78a681778d Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 22 Dec 2009 15:35:06 +0200 Subject: Fixed low bug EXT-3430(Accept/reject voice call dialog appears in wrong place for several moments) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 19 ++++++++++++++----- indra/newview/llimview.h | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..403883ad99 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1403,11 +1403,20 @@ void LLCallDialog::getAllowedRect(LLRect& rect) rect = gViewerWindow->getWorldViewRectScaled(); } -void LLCallDialog::onOpen(const LLSD& key) +BOOL LLCallDialog::postBuild() { + if (!LLDockableFloater::postBuild()) + return FALSE; + // dock the dialog to the Speak Button, where other sys messages appear - setDockControl(new LLDockControl(LLBottomTray::getInstance()->getChild("speak_panel"), - this, getDockTongue(), LLDockControl::TOP, boost::bind(&LLCallDialog::getAllowedRect, this, _1))); + LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_panel"); + + setDockControl(new LLDockControl( + anchor_panel, this, + getDockTongue(), LLDockControl::TOP, + boost::bind(&LLCallDialog::getAllowedRect, this, _1))); + + return TRUE; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1551,7 +1560,7 @@ void LLOutgoingCallDialog::onCancel(void* user_data) BOOL LLOutgoingCallDialog::postBuild() { - BOOL success = LLDockableFloater::postBuild(); + BOOL success = LLCallDialog::postBuild(); childSetAction("Cancel", onCancel, this); @@ -1570,7 +1579,7 @@ LLCallDialog(payload) BOOL LLIncomingCallDialog::postBuild() { - LLDockableFloater::postBuild(); + LLCallDialog::postBuild(); LLUUID session_id = mPayload["session_id"].asUUID(); LLSD caller_id = mPayload["caller_id"]; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 09f0c9df71..909fdaa37f 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -476,7 +476,7 @@ public: LLCallDialog(const LLSD& payload); ~LLCallDialog() {} - virtual void onOpen(const LLSD& key); + virtual BOOL postBuild(); protected: virtual void getAllowedRect(LLRect& rect); -- cgit v1.3 From c4ad806164e5d01bd95e46bd47dafc0eb8d95874 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 22 Dec 2009 15:51:28 +0200 Subject: Related to EXT-3581: removed unnecessary code from LLParticipantList::updateRecentSpeakersOrder method. --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 5941487c7d..7d5944ea2b 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -213,7 +213,6 @@ void LLParticipantList::updateRecentSpeakersOrder() if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder()) { // Resort avatar list - mAvatarList->setDirty(true); sort(); } } -- cgit v1.3 From 29ac4cf97ddbf7ee311092b75c8f3688019a5503 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Tue, 22 Dec 2009 16:10:10 +0200 Subject: fixed normal bug (EXT-3587) Notifications overflow toast cannot be dismissed during spam - reduced to minimum number of show/hide cycles for the Overflow toast, so it is easier now to click the (x) button - the Overflow toast is now created once for a channel --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index bd256ec9c2..c18fe8ad7e 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -217,7 +217,10 @@ void LLScreenChannel::addToast(const LLToast::Params& p) ToastElem new_toast_elem(p); + // reset HIDDEN flags for the Overflow Toast mOverflowToastHidden = false; + if(mOverflowToastPanel) + mOverflowToastPanel->setIsHidden(false); new_toast_elem.toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, _1)); new_toast_elem.toast->setOnToastDestroyedCallback(boost::bind(&LLScreenChannel::onToastDestroyed, this, _1)); @@ -459,8 +462,6 @@ void LLScreenChannel::showToastsBottom() S32 toast_margin = 0; std::vector::reverse_iterator it; - closeOverflowToastPanel(); - for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) { if(it != mToastList.rbegin()) @@ -513,7 +514,11 @@ void LLScreenChannel::showToastsBottom() mHiddenToastsNum++; } createOverflowToast(bottom, gSavedSettings.getS32("NotificationTipToastLifeTime")); - } + } + else + { + closeOverflowToastPanel(); + } } //-------------------------------------------------------------------------- @@ -544,11 +549,14 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) LLRect toast_rect; LLToast::Params p; p.lifetime_secs = timer; - mOverflowToastPanel = new LLToast(p); + + if(!mOverflowToastPanel) + mOverflowToastPanel = new LLToast(p); if(!mOverflowToastPanel) return; + mOverflowToastPanel->startFading(); mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this)); LLTextBox* text_box = mOverflowToastPanel->getChild("toast_text"); @@ -606,8 +614,8 @@ void LLScreenChannel::closeOverflowToastPanel() { if(mOverflowToastPanel != NULL) { - mOverflowToastPanel->closeFloater(); - mOverflowToastPanel = NULL; + mOverflowToastPanel->setVisible(FALSE); + mOverflowToastPanel->stopFading(); } } -- cgit v1.3 From 304e321f89e9a517ba90d6b41999a65591639ad9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 22 Dec 2009 16:39:56 +0200 Subject: implemented EXT-3515 Click on IM button for multiple selected Avatars each time creates new IM session --HG-- branch : product-engine --- indra/newview/llavataractions.cpp | 1 - indra/newview/llgroupactions.cpp | 7 +---- indra/newview/llimview.cpp | 64 +++++++++++++++++++++++++++++++++++++-- indra/newview/llimview.h | 8 +++++ 4 files changed, 71 insertions(+), 9 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index c5a1ffdcb3..9f7a36e209 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -243,7 +243,6 @@ void LLAvatarActions::startAdhocCall(const std::vector& ids) return; } - // start the call once the session has fully initialized gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 22658b4d65..7dd8ea694e 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -138,12 +138,7 @@ void LLGroupActions::startCall(const LLUUID& group_id) } // start the call - // *TODO: move this to LLIMMgr? - LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); - if (session && session->mSessionInitialized) - gIMMgr->startCall(session_id); - else - gIMMgr->autoStartCallOnStartup(session_id); + gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..85880af923 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -429,6 +429,50 @@ LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const (LLIMModel::LLIMSession*) NULL); } +//*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code +LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector& ids) +{ + S32 num = ids.size(); + if (!num) return NULL; + + if (mId2SessionMap.empty()) return NULL; + + std::map::const_iterator it = mId2SessionMap.begin(); + for (; it != mId2SessionMap.end(); ++it) + { + LLIMSession* session = (*it).second; + + if (!session->isAdHoc()) continue; + if (session->mInitialTargetIDs.size() != num) continue; + + std::list tmp_list(session->mInitialTargetIDs.begin(), session->mInitialTargetIDs.end()); + + std::vector::const_iterator iter = ids.begin(); + while (iter != ids.end()) + { + tmp_list.remove(*iter); + ++iter; + + if (tmp_list.empty()) + { + break; + } + } + + if (tmp_list.empty() && iter == ids.end()) + { + return session; + } + } + + return NULL; +} + +bool LLIMModel::LLIMSession::isAdHoc() +{ + return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); +} + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { LLIMSession* session = findIMSession(old_session_id); @@ -2097,7 +2141,13 @@ BOOL LLIMMgr::getIMReceived() const void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id) { LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id); - if (session) + if (!session) return; + + if (session->mSessionInitialized) + { + startCall(session_id); + } + else { session->mStartCallOnInitialize = true; } @@ -2159,12 +2209,22 @@ LLUUID LLIMMgr::addSession( bool new_session = !LLIMModel::getInstance()->findIMSession(session_id); + //works only for outgoing ad-hoc sessions + if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size()) + { + LLIMModel::LLIMSession* ad_hoc_found = LLIMModel::getInstance()->findAdHocIMSession(ids); + if (ad_hoc_found) + { + new_session = false; + session_id = ad_hoc_found->mSessionID; + } + } + if (new_session) { LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice); } - //*TODO remove this "floater" thing when Communicate Floater's gone LLFloaterIMPanel* floater = findFloaterBySession(session_id); if(!floater) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 09f0c9df71..c928546219 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -74,6 +74,8 @@ public: void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); + bool isAdHoc(); + LLUUID mSessionID; std::string mName; EInstantMessage mType; @@ -133,6 +135,12 @@ public: */ LLIMSession* findIMSession(const LLUUID& session_id) const; + /** + * Find an Ad-Hoc IM Session with specified participants + * @return first found Ad-Hoc session or NULL if the session does not exist + */ + LLIMSession* findAdHocIMSession(const std::vector& ids); + /** * Rebind session data to a new session id. */ -- cgit v1.3 From 754801f66942b0e9ec5ab4278dacb034fd23a0dd Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 22 Dec 2009 17:32:30 +0200 Subject: fixed minor bug EXT-3627 'Loading..' is shown over second life icon in view profile panel --HG-- branch : product-engine --- indra/newview/lltexturectrl.cpp | 1 + indra/newview/lltexturectrl.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 5f7c2f5080..25e5e23e6f 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1237,6 +1237,7 @@ void LLTextureCtrl::draw() // Using the discard level, do not show the string if the texture is almost but not // fully loaded. if ( mTexturep.notNull() && + (!mTexturep->isFullyLoaded()) && (mShowLoadingPlaceholder == TRUE) && (mTexturep->getDiscardLevel() != 1) && (mTexturep->getDiscardLevel() != 0)) diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 0b232da62b..fb1d591e32 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -45,7 +45,7 @@ class LLButton; class LLFloaterTexturePicker; class LLInventoryItem; -class LLViewerTexture; +class LLViewerFetchedTexture; // used for setting drag & drop callbacks. typedef boost::function drag_n_drop_callback; @@ -189,7 +189,7 @@ private: drag_n_drop_callback mDropCallback; commit_callback_t mOnCancelCallback; commit_callback_t mOnSelectCallback; - LLPointer mTexturep; + LLPointer mTexturep; LLUIColor mBorderColor; LLUUID mImageItemID; LLUUID mImageAssetID; -- cgit v1.3 From 45e0b59524fbdc44051bb1b23b7958e357823de2 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 22 Dec 2009 18:37:32 +0200 Subject: fixed minor bug EXT-3462 Voice Chat vs Voice Call --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index acdf3d1bf7..32eae9d11d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2904,13 +2904,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Joined the voice call - Joining Voice Chat... + Joining voice call... Connected, click End Call to hang up - Left Voice Chat + Left voice call Connecting... -- cgit v1.3 From 34b684c49e3e25002b34cf20466a5aeed3ee1f82 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 13:09:34 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- added doxygen comments in header -- replaced collecting of voice participants' uuids, added helpful & removed unused code comments in cpp --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 43 ++++++++++++----------------------------- indra/newview/llcallfloater.h | 30 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index fe4f0c5525..683cde7bee 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -482,28 +482,10 @@ void LLCallFloater::updateParticipantsVoiceState() std::vector speakers_list; // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *map = gVoiceClient->getParticipantList(); - if (!map) return; - - for (LLVoiceClient::participantMap::const_iterator iter = map->begin(); - iter != map->end(); ++iter) - { - LLUUID id = (*iter).second->mAvatarID; -// if ( id != gAgent.getID() ) - { - speakers_list.push_back(id); -/* - LLAvatarListItem* item = dynamic_cast (mAvatarList->getItemByValue(id)); - if (item) - { - setState(item, STATE_JOINED); - } -*/ - - } - } + std::vector speakers_uuids; + get_voice_participants_uuids(speakers_uuids); - // Updating the status for each participant. + // Updating the status for each participant already in list. std::vector items; mAvatarList->getItems(items); std::vector::const_iterator @@ -518,14 +500,14 @@ void LLCallFloater::updateParticipantsVoiceState() const LLUUID participant_id = item->getAvatarId(); bool found = false; - std::vector::iterator speakers_iter = std::find(speakers_list.begin(), speakers_list.end(), participant_id); + std::vector::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl; // If an avatarID assigned to a panel is found in a speakers list // obtained from VoiceClient we assign the JOINED status to the owner // of this avatarID. - if (speakers_iter != speakers_list.end()) + if (speakers_iter != speakers_uuids.end()) { setState(item, STATE_JOINED); @@ -534,15 +516,15 @@ void LLCallFloater::updateParticipantsVoiceState() continue; speaker->mHasLeftCurrentCall = FALSE; - speakers_list.erase(speakers_iter); + speakers_uuids.erase(speakers_iter); found = true; } - // If an avatarID is not found in a speakers list from VoiceClient and - // a panel with this ID has a JOINED status this means that this person - // HAS LEFT the call. if (!found) { + // If an avatarID is not found in a speakers list from VoiceClient and + // a panel with this ID has a JOINED status this means that this person + // HAS LEFT the call. if ((getState(participant_id) == STATE_JOINED)) { setState(item, STATE_LEFT); @@ -553,6 +535,9 @@ void LLCallFloater::updateParticipantsVoiceState() speaker->mHasLeftCurrentCall = TRUE; } + // If an avatarID is not found in a speakers list from VoiceClient and + // a panel with this ID has a LEFT status this means that this person + // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status else if ((getState(participant_id) != STATE_LEFT)) { setState(item, STATE_INVITED); @@ -592,18 +577,14 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) switch (state) { case STATE_INVITED: -// status_str = "INVITED"; // *TODO: localize new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_JOINED: -// status_str = "JOINED"; // *TODO: localize new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_LEFT: { - // status_str = "HAS LEFT CALL"; // *TODO: localize new_desc.setStyle(LLFontGL::ITALIC); - } break; default: diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 21fba433c6..1e64066647 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -106,6 +106,13 @@ private: * Refreshes participant list according to current Voice Channel */ void refreshPartisipantList(); + + /** + * Handles event on avatar list is refreshed after it was marked dirty. + * + * It sets initial participants voice states (once after the first refreshing) + * and updates voice states each time anybody is joined/left voice chat in session. + */ void onAvatarListRefreshed(); @@ -114,7 +121,21 @@ private: void setModeratorMutedVoice(bool moderator_muted); void updateAgentModeratorState(); + /** + * Sets initial participants voice states in avatar list (Invited, Joined, Has Left). + * + * @see refreshPartisipantList() + * @see onAvatarListRefreshed() + * @see mInitParticipantsVoiceState + */ void initParticipantsVoiceState(); + + /** + * Updates participants voice states in avatar list (Invited, Joined, Has Left). + * + * @see onAvatarListRefreshed() + * @see onChanged() + */ void updateParticipantsVoiceState(); void setState(LLAvatarListItem* item, ESpeakerState state); @@ -141,6 +162,15 @@ private: LLOutputMonitorCtrl* mSpeakingIndicator; bool mIsModeratorMutedVoice; + /** + * Flag indicated that participants voice states should be initialized. + * + * It is used due to Avatar List has delayed refreshing after it content is changed. + * Real initializing is performed when Avatar List is first time refreshed. + * + * @see onAvatarListRefreshed() + * @see initParticipantsVoiceState() + */ bool mInitParticipantsVoiceState; boost::signals2::connection mAvatarListRefreshConnection; -- cgit v1.3 From c6e24e53a1041ab12b74469e335281f416af5b75 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 14:45:49 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- implemented removing of participant who has left voice chat from the list (after hardcoded 10 seconds) -- added struct params to be set from the xml --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 109 ++++++++++++++++++++++++++++++++-------- indra/newview/llcallfloater.h | 63 +++++++++++++++++++++++ 2 files changed, 152 insertions(+), 20 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 683cde7bee..33253c2781 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -79,6 +79,28 @@ static void* create_non_avatar_caller(void*) return new LLNonAvatarCaller; } +LLCallFloater::LLAvatarListItemRemoveTimer::LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id) +: LLEventTimer(period) +, mRemoveCallback(remove_cb) +, mSpeakerId(speaker_id) +{ +} + +BOOL LLCallFloater::LLAvatarListItemRemoveTimer::tick() +{ + if (mRemoveCallback) + { + mRemoveCallback(mSpeakerId); + } + 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) @@ -90,6 +112,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) , mInitParticipantsVoiceState(false) +, mVoiceLeftRemoveDelay(10) // TODO: mantipov: make xml driven { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); @@ -98,6 +121,8 @@ LLCallFloater::LLCallFloater(const LLSD& key) LLCallFloater::~LLCallFloater() { + resetVoiceRemoveTimers(); + delete mPaticipants; mPaticipants = NULL; @@ -268,6 +293,8 @@ void LLCallFloater::updateSession() void LLCallFloater::refreshPartisipantList() { + resetVoiceRemoveTimers(); + delete mPaticipants; mPaticipants = NULL; mAvatarList->clear(); @@ -542,26 +569,6 @@ void LLCallFloater::updateParticipantsVoiceState() { setState(item, STATE_INVITED); } - -/* - // If there is already a started timer for the current panel don't do anything. - bool no_timer_for_current_panel = true; - if (mTimersMap.size() > 0) - { - timers_map::iterator found_it = mTimersMap.find(participant_id); - if (found_it != mTimersMap.end()) - { - no_timer_for_current_panel = false; - } - } - - if (no_timer_for_current_panel) - { - // Starting a timer to remove an avatar row panel after timeout - // *TODO Make the timeout period adjustable - mTimersMap.insert(timer_pair(participant_id, new LLAvatarRowRemoveTimer(this->getHandle(), 10, participant_id))); - } -*/ } } @@ -580,10 +587,12 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_JOINED: + removeVoiceRemoveTimer(item->getAvatarId()); new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_LEFT: { + setVoiceRemoveTimer(item->getAvatarId()); new_desc.setStyle(LLFontGL::ITALIC); } break; @@ -603,4 +612,64 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) } } +void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) +{ + + // If there is already a started timer for the current panel don't do anything. + bool no_timer_for_current_panel = true; + if (mVoiceLeftTimersMap.size() > 0) + { + timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); + if (found_it != mVoiceLeftTimersMap.end()) + { + no_timer_for_current_panel = false; + } + } + + if (no_timer_for_current_panel) + { + // Starting a timer to remove an avatar row panel after timeout + mVoiceLeftTimersMap.insert(timer_pair(voice_speaker_id, + new LLAvatarListItemRemoveTimer(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), mVoiceLeftRemoveDelay, voice_speaker_id))); + } +} + +void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) +{ + if (mVoiceLeftTimersMap.size() > 0) + { + mVoiceLeftTimersMap.erase(mVoiceLeftTimersMap.find(voice_speaker_id)); + } + + mAvatarList->removeItemByUUID(voice_speaker_id); +} + + +void LLCallFloater::resetVoiceRemoveTimers() +{ + if (mVoiceLeftTimersMap.size() > 0) + { + for (timers_map::iterator iter = mVoiceLeftTimersMap.begin(); + iter != mVoiceLeftTimersMap.end(); ++iter) + { + delete iter->second; + } + } + mVoiceLeftTimersMap.clear(); +} + +void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id) +{ + // Remove the timer if it has been already started + if (mVoiceLeftTimersMap.size() > 0) + { + timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); + if (found_it != mVoiceLeftTimersMap.end()) + { + delete found_it->second; + mVoiceLeftTimersMap.erase(found_it); + } + } +} + //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 1e64066647..537c57f671 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -57,6 +57,15 @@ class LLSpeakerMgr; class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver { public: + struct Params : public LLInitParam::Block + { + Optional voice_left_remove_delay; + + Params(); + }; + + LOG_CLASS(LLCallFloater); + LLCallFloater(const LLSD& key); ~LLCallFloater(); @@ -151,6 +160,34 @@ private: return mSpeakerStateMap[speaker_id]; } + + /** + * Instantiates new LLAvatarListItemRemoveTimer and adds it into the map if it is not already created. + * + * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list when timer expires. + */ + void setVoiceRemoveTimer(const LLUUID& voice_speaker_id); + + /** + * Removes specified by UUID Avatar List item. + * + * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list. + */ + void removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); + + /** + * Deletes all timers from the list to prevent started timers from ticking after destruction + * and after switching on another voice channel. + */ + void resetVoiceRemoveTimers(); + + /** + * Removes specified by UUID timer from the map. + * + * @param voice_speaker_id LLUUID of Avatar List item whose timer should be removed from the map. + */ + void removeVoiceRemoveTimer(const LLUUID& voice_speaker_id); + private: speaker_state_map_t mSpeakerStateMap; LLSpeakerMgr* mSpeakerManager; @@ -175,6 +212,32 @@ private: boost::signals2::connection mAvatarListRefreshConnection; + /** + * class LLAvatarListItemRemoveTimer + * + * Implements a timer that removes avatar list item of a participant + * who has left the call. + */ + class LLAvatarListItemRemoveTimer : public LLEventTimer + { + public: + typedef boost::function callback_t; + + LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id); + virtual ~LLAvatarListItemRemoveTimer() {}; + + virtual BOOL tick(); + + private: + callback_t mRemoveCallback; + LLUUID mSpeakerId; + }; + + typedef std::pair timer_pair; + typedef std::map timers_map; + + timers_map mVoiceLeftTimersMap; + S32 mVoiceLeftRemoveDelay; }; -- cgit v1.3 From 2094847b1f0b6abff25112f7161752819a8ff5d1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 16:09:31 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- commented out updating participants voice states from draw() -- improved removing of HAS LEFT participant (now it is removed via LLAvatarList approach instead of LLFlatListView) --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 33253c2781..98ee085687 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -174,7 +174,11 @@ void LLCallFloater::draw() // It should be done only when she joins or leaves voice chat. // But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement. // *TODO: mantipov: remove from draw() - onChange(); + + // NOTE: it looks like calling onChange() here is not necessary, + // but sometime it is not called properly from the observable object. + // Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent) +// onChange(); bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); @@ -641,7 +645,13 @@ void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) mVoiceLeftTimersMap.erase(mVoiceLeftTimersMap.find(voice_speaker_id)); } - mAvatarList->removeItemByUUID(voice_speaker_id); + LLAvatarList::uuid_vector_t& speaker_uuids = mAvatarList->getIDs(); + LLAvatarList::uuid_vector_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); + if(pos != speaker_uuids.end()) + { + speaker_uuids.erase(pos); + mAvatarList->setDirty(); + } } -- cgit v1.3 From 3b1ead667ce0d23532426320525024a136967fc2 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 17:10:15 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- implemented workaround not to set agent in HAS LEFT state --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 98ee085687..29f37a04b4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -297,8 +297,13 @@ void LLCallFloater::updateSession() void LLCallFloater::refreshPartisipantList() { + // lets forget states from the previous session + // for timers... resetVoiceRemoveTimers(); + // ...and for speaker state + mSpeakerStateMap.clear(); + delete mPaticipants; mPaticipants = NULL; mAvatarList->clear(); @@ -580,6 +585,19 @@ void LLCallFloater::updateParticipantsVoiceState() void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) { + // *HACK: mantipov: sometimes such situation is possible while switching to voice channel: +/* + - voice channel is switched to the one user is joining + - participant list is initialized with voice states: agent is in voice + - than such log messages were found (with agent UUID) + - LLVivoxProtocolParser::process_impl: parsing: 00912Audio + - LLVoiceClient::sessionState::removeParticipant: participant "sip:x2pwNkMbpR_mK4rtB_awASA==@bhr.vivox.com" (da9c0d90-c6e9-47f9-8ae2-bb41fdac0048) removed. + - and than while updating participants voice states agent is marked as HAS LEFT + - next updating of LLVoiceClient state makes agent JOINED + So, lets skip HAS LEFT state for agent's avatar +*/ + if (STATE_LEFT == state && item->getAvatarId() == gAgentID) return; + setState(item->getAvatarId(), state); LLStyle::Params speaker_style; -- cgit v1.3 From 8077f1990de23b10d73034c919027d0f220abe48 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Dec 2009 12:22:33 -0500 Subject: Intercept notifications as filter rather than as a peer listener. --- indra/llui/llnotificationslistener.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 629964c322..ee6ec0f88f 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -188,9 +188,10 @@ public: LLNotificationChannelPtr channelptr(llnotifications.getChannel(channel)); if (channelptr) { - // Try connecting at the front of the 'changed' signal. That way - // we shouldn't get starved by preceding listeners. - channelptr->connectAtFrontChanged(boost::bind(&Forwarder::handle, this, _1)); + // Insert our processing as a "passed filter" listener. This way + // we get to run before all the "changed" listeners, and we get to + // swipe it (hide it from the other listeners) if desired. + channelptr->connectPassedFilter(boost::bind(&Forwarder::handle, this, _1)); } } @@ -251,6 +252,7 @@ bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const if (notification["sigtype"].asString() == "delete") { LL_INFOS("LLNotificationsListener") << "ignoring delete" << LL_ENDL; + // let other listeners see the "delete" operation return false; } LLNotificationPtr note(mNotifications.find(notification["id"])); @@ -262,6 +264,8 @@ bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const if (! matchType(mTypes, note->getType())) { LL_INFOS("LLNotificationsListener") << "didn't match types " << mTypes << LL_ENDL; + // We're not supposed to intercept this particular notification. Let + // other listeners process it. return false; } LL_INFOS("LLNotificationsListener") << "sending via '" << mPumpName << "'" << LL_ENDL; @@ -282,7 +286,11 @@ bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const mNotifications.cancel(note); } } - return false; // let other listeners get same notification + // If we've auto-responded to this notification, then it's going to be + // deleted. Other listeners would get the change operation, try to look it + // up and be baffled by lookup failure. So when we auto-respond, suppress + // this notification: don't pass it to other listeners. + return mRespond; } bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std::string& type) const @@ -314,7 +322,7 @@ bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std LLSD LLNotificationsListener::asLLSD(LLNotificationPtr note) { LLSD notificationInfo(note->asLLSD()); - // For some reason the following aren't included in asLLSD(). + // For some reason the following aren't included in LLNotification::asLLSD(). notificationInfo["summary"] = note->summarize(); notificationInfo["id"] = note->id(); notificationInfo["type"] = note->getType(); -- cgit v1.3 From 65557cde7071eba78f2cce310a113863cee8a69b Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 22 Dec 2009 20:03:10 +0200 Subject: Made the control panel in P2P IM sessions non-resizable (EXT-3470). --HG-- branch : product-engine --- indra/llui/lllayoutstack.cpp | 10 ++++++++++ indra/llui/lllayoutstack.h | 1 + indra/newview/llimfloater.cpp | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 7d8c102750..1aaba88c49 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -414,6 +414,16 @@ void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL au } } +void LLLayoutStack::setPanelUserResize(const std::string& panel_name, BOOL user_resize) +{ + LayoutPanel* panel = findEmbeddedPanelByName(panel_name); + + if (panel) + { + panel->mUserResize = user_resize; + } +} + bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp) { LayoutPanel* panel = findEmbeddedPanelByName(panel_name); diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index c1af428674..cde383b047 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -80,6 +80,7 @@ public: S32 getNumPanels() { return mPanels.size(); } void updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize); + void setPanelUserResize(const std::string& panel_name, BOOL user_resize); /** * Gets minimal width and/or height of the specified by name panel. diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index acaa6076f8..f61af716b6 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -45,6 +45,7 @@ #include "llfloaterchat.h" #include "llfloaterreg.h" #include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container +#include "lllayoutstack.h" #include "lllineeditor.h" #include "lllogchat.h" #include "llpanelimcontrolpanel.h" @@ -220,6 +221,12 @@ LLIMFloater::~LLIMFloater() //virtual BOOL LLIMFloater::postBuild() { + // User-resizable control panels in P2P sessions look ugly (EXT-3470). + if (mDialog == IM_NOTHING_SPECIAL || mDialog == IM_SESSION_P2P_INVITE) + { + getChild("im_panels")->setPanelUserResize("panel_im_control_panel", FALSE); + } + const LLUUID& other_party_id = LLIMModel::getInstance()->getOtherParticipantID(mSessionID); if (other_party_id.notNull()) { -- cgit v1.3 From c7b69713b794b9c326a79aad6cdee542c57ada4d Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 22 Dec 2009 20:14:51 +0200 Subject: fixed EXT-3564 “Docked windows hide when clicking on sidetray tabs”, added sidetray tab buttons panel to transient manager control list, added right padding to the docking rect area to avoid overlapping docked IM floaters with sidetray buttons; MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index acaa6076f8..d511e6cd64 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -56,6 +56,7 @@ #include "llvoicechannel.h" #include "lltransientfloatermgr.h" #include "llinventorymodel.h" +#include "llrootview.h" @@ -437,6 +438,16 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) void LLIMFloater::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectRaw(); + static S32 right_padding = 0; + if (right_padding == 0) + { + LLPanel* side_bar_tabs = + gViewerWindow->getRootView()->getChild ( + "side_bar_tabs"); + right_padding = side_bar_tabs->getRect().getWidth(); + LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs); + } + rect.mRight -= right_padding; } void LLIMFloater::setDocked(bool docked, bool pop_on_undock) -- cgit v1.3 From 0a98034641267ea57360fdd369acb8b94ff9bc20 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 22 Dec 2009 20:17:47 +0200 Subject: Related to EXT-3628("Connecting to.." popup appears behind voice control panel while calling): Added workaround which sets current call dialog to front most. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 29f37a04b4..c222ced98f 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -291,6 +291,15 @@ 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(); + } } } } -- cgit v1.3 From 6f2b14c716f1c91b3631fc6eeae2fd4bf4013e75 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 22 Dec 2009 11:36:35 -0800 Subject: EXT-3593 Fixed up llkdu and tcmalloc dependencies for the viewer build. --- indra/newview/CMakeLists.txt | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f3d399c616..7d8e9268e5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1397,12 +1397,29 @@ if (WINDOWS) # be met. I'm looking forward to a source-code split-up project next year that will address this kind of thing. # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py # and have the build deps get tracked *please* tell me about it. + + if(LLKDU_LIBRARY) + # Configure a var for llkdu which may not exist for all builds. + set(LLKDU_DLL_SOURCE ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll) + endif(LLKDU_LIBRARY) + + if(USE_GOOGLE_PERFTOOLS) + # Configure a var for tcmalloc location, if used. + # Note the need to specify multiple names explicitly. + set(GOOGLE_PERF_TOOLS_SOURCE + ${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll + ${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll + ) + endif(USE_GOOGLE_PERFTOOLS) + + set(COPY_INPUT_DEPENDECIES # The following commented dependencies are determined at variably at build time. Can't do this here. - #llkdu.dll => llkdu.dll #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg + ${LLKDU_DLL_SOURCE} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll @@ -1426,6 +1443,7 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/zlib1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxplatform.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll + ${GOOGLE_PERF_TOOLS_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll @@ -1501,7 +1519,7 @@ if (WINDOWS) if(LLKDU_LIBRARY) # kdu may not exist! - add_dependencies(${VIEWER_BINARY_NAME} llkdu) + add_dependencies(copy_w_viewer_manifest llkdu) endif(LLKDU_LIBRARY) if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) -- cgit v1.3 From 8f8e5c850a0574f30f9be1e3164531751139d2c5 Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Tue, 22 Dec 2009 14:06:25 -0600 Subject: EXT-3640 We support the eaglelake chipset No code changed --- indra/newview/gpu_table.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 5c5c4e5b3c..cc8f6780e3 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -157,7 +157,7 @@ Intel Bear Lake .*Intel.*Bear Lake.* 0 0 Intel Broadwater .*Intel.*Broadwater.* 0 0 Intel Brookdale .*Intel.*Brookdale.* 0 0 Intel Cantiga .*Intel.*Cantiga.* 0 0 -Intel Eaglelake .*Intel.*Eaglelake.* 0 0 +Intel Eaglelake .*Intel.*Eaglelake.* 0 1 Intel Montara .*Intel.*Montara.* 0 0 Intel Springdale .*Intel.*Springdale.* 0 0 Matrox .*Matrox.* 0 0 -- cgit v1.3 From 5a1e07002a8851e9227cf85171c1af497c94f0cf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Dec 2009 19:17:14 -0500 Subject: Add lleventhost queries to list LLEventAPIs or describe one. Add LLEventDispatcher::getDispatchKey() to retrieve a previously- inaccessible value. --- indra/llcommon/lleventdispatcher.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h index c8c4fe0c3c..1e625bcee8 100644 --- a/indra/llcommon/lleventdispatcher.h +++ b/indra/llcommon/lleventdispatcher.h @@ -139,6 +139,9 @@ public: /// Get information about a specific Callable LLSD getMetadata(const std::string& name) const; + /// Retrieve the LLSD key we use for one-arg operator() method + std::string getDispatchKey() const { return mKey; } + private: template void addMethod(const std::string& name, const std::string& desc, -- cgit v1.3 From 3e8e3b85d9d84ef2386bb36beed4ade677c5a5e1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Dec 2009 16:47:50 -0800 Subject: DEV-44607 ugly/broken font used for region labels in world map view --- indra/newview/llworldmapview.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index e6857ea780..1940d65ae4 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -334,7 +334,6 @@ void LLWorldMapView::draw() gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setColorMask(true, true); -#if 1 // Draw the image tiles drawMipmap(width, height); gGL.flush(); @@ -452,7 +451,7 @@ void LLWorldMapView::draw() // Draw the region name in the lower left corner if (sMapScale >= DRAW_TEXT_THRESHOLD) { - LLFontGL* font = LLFontGL::getFontSansSerifSmall(); + LLFontGL* font = LLFontGL::getFont(LLFontDescriptor("SansSerif", "Small", LLFontGL::BOLD)); std::string mesg; if (info->isDown()) { @@ -468,14 +467,13 @@ void LLWorldMapView::draw() mesg, 0, llfloor(left + 3), llfloor(bottom + 2), LLColor4::white, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW); } } } - #endif - #if 1 + // Draw background rectangle LLGLSUIDefault gls_ui; { @@ -566,7 +564,7 @@ void LLWorldMapView::draw() drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("Loading"), ""); } } - #endif + // turn off the scissor LLGLDisable no_scissor(GL_SCISSOR_TEST); -- cgit v1.3 From e3211c4ac1830d5f480cc8206aad932fd0505e21 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 23 Dec 2009 17:14:27 +0000 Subject: EXT-3679: Send Session, Region, and Parcel IDs to Search. These IDs are sent as the following query parameters to the search server: sid=, rid=, pid=, for the Session ID, Region ID, and Parcel ID respectively. For some reason, Parcel ID always seems to be NULL though. I'll file a separate JIRA for that. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llweb.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 455c3587ff..ff7c2b1f5e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3585,7 +3585,7 @@ Type String Value - http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE] + http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID] HighResSnapshot diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index f8bb7336db..7866f735c5 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,10 +38,12 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() +#include "llagent.h" #include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" #include "lllogininstance.h" +#include "llparcel.h" #include "llsd.h" #include "lltoastalertpanel.h" #include "llui.h" @@ -49,6 +51,8 @@ #include "llversioninfo.h" #include "llviewercontrol.h" #include "llviewernetwork.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" #include "llviewerwindow.h" class URLLoader : public LLToastAlertPanel::URLLoader @@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + substitution["SESSION_ID"] = gAgent.getSessionID(); + // find the region ID + LLUUID region_id; + LLViewerRegion *region = gAgent.getRegion(); + if (region) + { + region_id = region->getRegionID(); + } + substitution["REGION_ID"] = region_id; + + // find the parcel ID + LLUUID parcel_id; + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (parcel) + { + parcel_id = parcel->getID(); + } + substitution["PARCEL_ID"] = parcel_id; + + // expand all of the substitution strings and escape the url std::string expanded_url = url; LLStringUtil::format(expanded_url, substitution); -- cgit v1.3 From 069b410a884a5ee565d1cc09a2280b2b8b19ce1d Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Wed, 23 Dec 2009 11:24:43 -0800 Subject: Fix for world map textures not loading with HTTP Texture changes. --- indra/newview/lltexturefetch.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 3f489544b4..a75f631769 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -842,10 +842,10 @@ bool LLTextureFetchWorker::doWork(S32 param) mLoaded = FALSE; mGetStatus = 0; mGetReason.clear(); - lldebugs << "HTTP GET: " << mID << " Offset: " << offset - << " Bytes: " << mRequestedSize - << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth - << llendl; + LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << offset + << " Bytes: " << mRequestedSize + << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth + << LL_ENDL; setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); mState = WAIT_HTTP_REQ; @@ -1257,7 +1257,7 @@ void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, gTextureList.sTextureBits += data_size * 8; // Approximate - does not include header bits - //llinfos << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << llendl; + LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL; if (data_size > 0) { // *TODO: set the formatted image data here directly to avoid the copy @@ -1450,8 +1450,9 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C)) { // Only do partial requests for J2C at the moment - //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl; + //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl; desired_size = MAX_IMAGE_DATA_SIZE; + desired_discard = 0; } else if (desired_discard == 0) { -- cgit v1.3 From 183c991402a49caa5b29b85864b3ff9ef7a2fd53 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 23 Dec 2009 11:29:13 -0800 Subject: DEV-44614 ugly/broken font and formatting used for IM toast emotes fix bug, also fix some comments/typos/enumparams in this code area. --- indra/llrender/llfontgl.cpp | 2 +- indra/llui/lltextbase.cpp | 52 ++++++++++++++++++++-------------------- indra/newview/lltoastimpanel.cpp | 17 +++++++++---- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 7ad5f9608f..37a28ac721 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -135,7 +135,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons S32 scaled_max_pixels = max_pixels == S32_MAX ? S32_MAX : llceil((F32)max_pixels * sScaleX); - // determine which style flags need to be added programmatically by striping off the + // determine which style flags need to be added programmatically by stripping off the // style bits that are drawn by the underlying Freetype font U8 style_to_add = (style | mFontDescriptor.getStyle()) & ~mFontFreetype->getStyle(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e54032ac5e..7447a984ac 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -842,7 +842,7 @@ BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask) { // Did we just click on a link? if (cur_segment->getStyle() - && cur_segment->getStyle()->isLink()) + && cur_segment->getStyle()->isLink()) { // *TODO: send URL here? mURLClickSignal(this, LLSD() ); @@ -1477,7 +1477,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) } } -void LLTextBase::setText(const LLStringExplicit &utf8str ,const LLStyle::Params& input_params) +void LLTextBase::setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params) { // clear out the existing text and segments getViewModel()->setDisplay(LLWStringUtil::null); @@ -2320,14 +2320,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele S32 end = llmin( selection_start, seg_end ); S32 length = end - start; font->render(text, start, - rect.mLeft, rect.mTop, - color, - LLFontGL::LEFT, LLFontGL::TOP, - 0, - mStyle->getShadowType(), - length, rect.getWidth(), - &right_x, - mEditor.getUseEllipses()); + rect.mLeft, rect.mTop, + color, + LLFontGL::LEFT, LLFontGL::TOP, + LLFontGL::NORMAL, + mStyle->getShadowType(), + length, rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); } rect.mLeft = (S32)ceil(right_x); @@ -2339,14 +2339,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele S32 length = end - start; font->render(text, start, - rect.mLeft, rect.mTop, - LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ), - LLFontGL::LEFT, LLFontGL::TOP, - 0, - LLFontGL::NO_SHADOW, - length, rect.getWidth(), - &right_x, - mEditor.getUseEllipses()); + rect.mLeft, rect.mTop, + LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ), + LLFontGL::LEFT, LLFontGL::TOP, + LLFontGL::NORMAL, + LLFontGL::NO_SHADOW, + length, rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); } rect.mLeft = (S32)ceil(right_x); if( selection_end < seg_end ) @@ -2356,14 +2356,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele S32 end = seg_end; S32 length = end - start; font->render(text, start, - rect.mLeft, rect.mTop, - color, - LLFontGL::LEFT, LLFontGL::TOP, - 0, - mStyle->getShadowType(), - length, rect.getWidth(), - &right_x, - mEditor.getUseEllipses()); + rect.mLeft, rect.mTop, + color, + LLFontGL::LEFT, LLFontGL::TOP, + LLFontGL::NORMAL, + mStyle->getShadowType(), + length, rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); } return right_x; } diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index b7add03e0e..d62017cc2f 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -35,13 +35,14 @@ #include "llnotifications.h" #include "llinstantmessage.h" +#include "llviewerchat.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; //-------------------------------------------------------------------------- LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification), - mAvatar(NULL), mUserName(NULL), - mTime(NULL), mMessage(NULL) + mAvatar(NULL), mUserName(NULL), + mTime(NULL), mMessage(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml"); @@ -52,8 +53,11 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage = getChild("message"); LLStyle::Params style_params; - style_params.font.name(LLFontGL::nameFromFont(style_params.font)); - style_params.font.size(LLFontGL::sizeFromFont(style_params.font)); + LLFontGL* fontp = LLViewerChat::getChatFont(); + std::string font_name = LLFontGL::nameFromFont(fontp); + std::string font_size = LLFontGL::sizeFromFont(fontp); + style_params.font.name(font_name); + style_params.font.size(font_size); style_params.font.style = "UNDERLINE"; //Handle IRC styled /me messages. @@ -63,13 +67,16 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage->clear(); style_params.font.style ="ITALIC"; - mMessage->appendText(p.from + " ", FALSE, style_params); + mMessage->appendText(p.from, FALSE, style_params); style_params.font.style = "ITALIC"; mMessage->appendText(p.message.substr(3), FALSE, style_params); } else + { mMessage->setValue(p.message); + } + mUserName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; -- cgit v1.3