From 6220ce33700d011be5831b1bb480c81dec98665e Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Mon, 5 Nov 2012 15:18:53 +0200 Subject: [PATCH 1/6] CHUI-450 (Your own name does not appear in nearby chat participant list if voice chat disabled) --- indra/newview/llvoicevivox.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index f1bf4a6d75..f236123ef1 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -394,7 +394,15 @@ const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion() void LLVivoxVoiceClient::updateSettings() { - setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); + if(!mAudioSession) + { + // If audio module is not initialized, pretend that voice is enabled, thus letting state machine to take a full cycle + setVoiceEnabled(true); + } + else + { + setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); + } setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); @@ -1478,6 +1486,9 @@ void LLVivoxVoiceClient::stateMachine() mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); sendPositionalUpdate(); } + + // Now that audio module is fully initialized, check for actual mVoiceEnabled value + updateSettings(); } break; From 990a8c6085b43cb0290a631b664b3160938b0536 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Tue, 6 Nov 2012 22:44:22 +0200 Subject: [PATCH 2/6] CHUI-462 (Torn-off Nearby Chat can't be closed) --- indra/newview/llimconversation.cpp | 4 ---- indra/newview/llimfloatercontainer.cpp | 7 +++++++ indra/newview/llimfloatercontainer.h | 2 ++ indra/newview/llnearbychat.cpp | 22 +++++++++++++++++++++- indra/newview/llnearbychat.h | 2 ++ 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index b687e18cae..44cf300930 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -202,10 +202,6 @@ BOOL LLIMConversation::postBuild() if (isChatMultiTab()) { - if (mIsNearbyChat) - { - setCanClose(FALSE); - } result = LLFloater::postBuild(); } else diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index f85aa9a353..c9cd013317 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -1475,4 +1475,11 @@ void LLIMFloaterContainer::openNearbyChat() } } +void LLIMFloaterContainer::onNearbyChatClosed() +{ + // If nearby chat is the only remaining conversation and it is closed, close whole conversation floater as well + if (mConversationsItems.size() == 1) + closeFloater(); +} + // EOF diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 05ea94019b..16218fc287 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -92,6 +92,8 @@ public: LLUUID getSelectedSession() { return mSelectedSession; } void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; } + void onNearbyChatClosed(); + private: typedef std::map avatarID_panel_map_t; avatarID_panel_map_t mSessions; diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index d1c7c6bfd7..cf42fcb91a 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -293,7 +293,7 @@ void LLNearbyChat::setVisible(BOOL visible) setFocus(visible); } - +// virtual void LLNearbyChat::onTearOffClicked() { LLIMConversation::onTearOffClicked(); @@ -311,6 +311,26 @@ void LLNearbyChat::onOpen(const LLSD& key) showTranslationCheckbox(LLTranslate::isTranslationConfigured()); } +// virtual +void LLNearbyChat::onClose(bool app_quitting) +{ + // Override LLIMConversation::onClose() so that Nearby Chat is not removed from the conversation floater +} + +// virtual +void LLNearbyChat::onClickCloseBtn() +{ + if (!isTornOff()) + return; + onTearOffClicked(); + + LLIMFloaterContainer *im_box = LLIMFloaterContainer::findInstance(); + if (im_box) + { + im_box->onNearbyChatClosed(); + } +} + void LLNearbyChat::onChatFontChange(LLFontGL* fontp) { // Update things with the new font whohoo diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index b155fd3c26..a6c4439b1d 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -52,6 +52,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void setFocus(BOOL focusFlag); /*virtual*/ void setVisible(BOOL visible); @@ -96,6 +97,7 @@ protected: void onChatFontChange(LLFontGL* fontp); /*virtual*/ void onTearOffClicked(); + /*virtual*/ void onClickCloseBtn(); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); EChatType processChatTypeTriggers(EChatType type, std::string &str); From 4ec5ee63e28a427d88dfc0329151eacaf375fdb6 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Wed, 7 Nov 2012 12:07:52 +0200 Subject: [PATCH 3/6] CHUI-450 (Your own name does not appear in nearby chat participant list if voice chat disabled) Added audio module initialization without faking mVoiceEnabled value --- indra/newview/llspeakers.cpp | 2 +- indra/newview/llvoicevivox.cpp | 42 ++++++++++++++-------------------- indra/newview/llvoicevivox.h | 2 ++ 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 46fd8c1290..726199b7aa 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -504,7 +504,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) void LLSpeakerMgr::updateSpeakerList() { // are we bound to the currently active voice channel? - if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) + if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel)) { std::set participants; LLVoiceClient::getInstance()->getParticipantList(participants); diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index f236123ef1..839de395a7 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -291,6 +291,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mCaptureDeviceDirty(false), mRenderDeviceDirty(false), mSpatialCoordsDirty(false), + mIsInitialized(false), mMuteMic(false), mMuteMicDirty(false), @@ -394,15 +395,7 @@ const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion() void LLVivoxVoiceClient::updateSettings() { - if(!mAudioSession) - { - // If audio module is not initialized, pretend that voice is enabled, thus letting state machine to take a full cycle - setVoiceEnabled(true); - } - else - { - setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); - } + setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); @@ -528,7 +521,7 @@ void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries) { LLViewerRegion *region = gAgent.getRegion(); - if ( region && mVoiceEnabled ) + if ( region && (mVoiceEnabled || !mIsInitialized)) { std::string url = region->getCapability("ProvisionVoiceAccountRequest"); @@ -699,7 +692,7 @@ void LLVivoxVoiceClient::stateMachine() setVoiceEnabled(false); } - if(mVoiceEnabled) + if(mVoiceEnabled || !mIsInitialized) { updatePosition(); } @@ -744,7 +737,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateDisabled case stateDisabled: - if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) + if(mTuningMode || ((mVoiceEnabled || !mIsInitialized) && !mAccountName.empty())) { setState(stateStart); } @@ -899,7 +892,7 @@ void LLVivoxVoiceClient::stateMachine() mTuningExitState = stateIdle; setState(stateMicTuningStart); } - else if(!mVoiceEnabled) + else if(!mVoiceEnabled && mIsInitialized) { // We never started up the connector. This will shut down the daemon. setState(stateConnectorStopped); @@ -1093,7 +1086,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateConnectorStart case stateConnectorStart: - if(!mVoiceEnabled) + if(!mVoiceEnabled && mIsInitialized) { // We were never logged in. This will shut down the connector. setState(stateLoggedOut); @@ -1111,7 +1104,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateConnectorStarted case stateConnectorStarted: // connector handle received - if(!mVoiceEnabled) + if(!mVoiceEnabled && mIsInitialized) { // We were never logged in. This will shut down the connector. setState(stateLoggedOut); @@ -1255,7 +1248,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateCreatingSessionGroup case stateCreatingSessionGroup: - if(mSessionTerminateRequested || !mVoiceEnabled) + if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) { // *TODO: Question: is this the right way out of this state setState(stateSessionTerminated); @@ -1271,7 +1264,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateRetrievingParcelVoiceInfo case stateRetrievingParcelVoiceInfo: // wait until parcel voice info is received. - if(mSessionTerminateRequested || !mVoiceEnabled) + if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) { // if a terminate request has been received, // bail and go to the stateSessionTerminated @@ -1291,7 +1284,7 @@ void LLVivoxVoiceClient::stateMachine() // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. sendFriendsListUpdates(); - if(mSessionTerminateRequested || !mVoiceEnabled) + if(mSessionTerminateRequested || !mVoiceEnabled && mIsInitialized) { // TODO: Question: Is this the right way out of this state? setState(stateSessionTerminated); @@ -1372,7 +1365,7 @@ void LLVivoxVoiceClient::stateMachine() } // joinedAudioSession() will transition from here to stateSessionJoined. - if(!mVoiceEnabled) + if(!mVoiceEnabled && mIsInitialized) { // User bailed out during connect -- jump straight to teardown. setState(stateSessionTerminated); @@ -1419,7 +1412,7 @@ void LLVivoxVoiceClient::stateMachine() notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); } - else if(!mVoiceEnabled) + else if(!mVoiceEnabled && mIsInitialized) { // User bailed out during connect -- jump straight to teardown. setState(stateSessionTerminated); @@ -1439,7 +1432,7 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateRunning case stateRunning: // steady state // Disabling voice or disconnect requested. - if(!mVoiceEnabled || mSessionTerminateRequested) + if(!mVoiceEnabled && mIsInitialized || mSessionTerminateRequested) { leaveAudioSession(); } @@ -1487,8 +1480,7 @@ void LLVivoxVoiceClient::stateMachine() sendPositionalUpdate(); } - // Now that audio module is fully initialized, check for actual mVoiceEnabled value - updateSettings(); + mIsInitialized = true; } break; @@ -1522,7 +1514,7 @@ void LLVivoxVoiceClient::stateMachine() // Always reset the terminate request flag when we get here. mSessionTerminateRequested = false; - if(mVoiceEnabled && !mRelogRequested) + if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested) { // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). setState(stateNoChannel); @@ -1550,7 +1542,7 @@ void LLVivoxVoiceClient::stateMachine() mAccountHandle.clear(); cleanUp(); - if(mVoiceEnabled && !mRelogRequested) + if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested) { // User was logged out, but wants to be logged in. Send a new login request. setState(stateNeedsLogin); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 1142a1a49c..f2a3a7d3dd 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -741,6 +741,8 @@ private: std::string mRenderDevice; bool mCaptureDeviceDirty; bool mRenderDeviceDirty; + + bool mIsInitialized; bool checkParcelChanged(bool update = false); From bfb22638f865c2270fad95c35eff273b134772e3 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Wed, 7 Nov 2012 14:12:58 -0800 Subject: [PATCH 4/6] CHUI-514: Updating to Leo's latest icon batch. --- .../textures/icons/Conv_toolbar_add_person.png | Bin 322 -> 373 bytes .../textures/icons/Conv_toolbar_arrow_ne.png | Bin 301 -> 215 bytes .../textures/icons/Conv_toolbar_arrow_sw.png | Bin 293 -> 211 bytes .../textures/icons/Conv_toolbar_close.png | Bin 262 -> 275 bytes .../textures/icons/Conv_toolbar_collapse.png | Bin 663 -> 345 bytes .../textures/icons/Conv_toolbar_expand.png | Bin 662 -> 342 bytes .../textures/icons/Conv_toolbar_hang_up.png | Bin 460 -> 459 bytes .../textures/icons/Conv_toolbar_open_call.png | Bin 485 -> 366 bytes .../textures/icons/Conv_toolbar_plus.png | Bin 195 -> 144 bytes .../textures/icons/Conv_toolbar_sort.png | Bin 196 -> 230 bytes .../default/textures/icons/nearby_chat_icon.png | Bin 553 -> 399 bytes 11 files changed, 0 insertions(+), 0 deletions(-) diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png index f024c733f34e1075e243b6cb64290b7407f3be6c..0631f16f3bffdbb399a3f0a8fb4294c860e5824e 100755 GIT binary patch delta 322 zcmV-I0logh0`&rr83+ad006M(MH7)BCw~DKNklOVVxI5G|&97EH&*K}ABnjo_d5&Ijvn<2gwn3Vv=+d^tag4(- zzBO zG(Gi2jB(|6k9Q13QFuMiGZ==k>o1EKg^m>h%mx0X`wFixw?fxNu>Ae}8&blkq{K>s z{DS{u0}PCp4m<&>DDiZ045_#^=fZ2Q1_hpKhle|7Muy!w`n~?DOqiZg$2tCk{*oF; zsy>``Z_YTjT-syi;r53`DaQ}bU2Q!j@rYkeRQ3ba-!2^{M@ diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png index a19e720d421a7f358234a8809ebd92f2d577825c..578482f5ed786c49c02e66f05a4e73dd1b4b1a8c 100755 GIT binary patch delta 162 zcmV;T0A2sB0@neM83+ad0036bj#rT(D1UiLL_t(|+G70w|33pY022e1z~D281&8!~XHuh| zBtvi+M6w~+3?j=A5MV^hv><~MfmoUpL$DbHGmIUGzmt+68HaB%0uW#TFTy33d=LMm QL;wH)07*qoM6N<$f?LNvDgXcg delta 248 zcmcc4xRz;xBnLAC14E)fUFt+dje3s&pAgqGXU^Ez*i4>0dEUHv8#Zh(G&Jn(?e+8X zb98hxH8tJ6d-u|%OA8AN_wU~y5D;KyX6Ehfy>jJBPft%PD=P~Ni;j+t)vH$n4c$N0 zrW8m?lmz(&|Hlp(&I;?j0;&o3ba4!+xRtu*f~Qb}0*}i@mn#jMEuQ={7k$K_IsMo4 z{Hs?Ftbd@qHd^+zP_MCvnxN3d4cc6xtR}OXrYzCmx;4keVtMe5ZUu01E&B M07*qoM6N<$g18Jj%K!iX delta 240 zcmcc2xRhyvBnLAC14E)fUFt+dje6GrpAgqGXUOTjBxJ*e4VyM? zI&tDee0==0Y18cN?A+bm3knK6Jv~!XQ>&}1_wV0tVPR2PT54uywsPf4poy2e)YyQO zcuA07@PDj;;hDp;IG~bXPZ!6Kid$^=~;qk9pXivrLL`2xkQNU<4!p$p_9G|UFXaX`$2MUDq5$A&J)IGXzj0)PMm Y02yRs?LO?%d;kCd07*qoM6N<$g7OAkfdBvi delta 209 zcmbQt)W$SHl7pFnfgw?#E_I@!M!i9RPl)S*0|&Nk+m@D=wr0(m!oosxbMu)qXL@;g zIXF0Ycz6^Q71`O@_4oJp_4UQZ#sW3_Yt3r}QUWDGe!>4y0mB33SV^E6j||ypExAPGppMt~lFDCCj~fR!FfzEV6}VWhcXtNRa0X9TKbLh*2~7a2uv~Ni diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png index 82baabde471104747028481346d268a9b51bc8fc..8d82960e28c9b103b5c36fad0718254759da3c51 100755 GIT binary patch delta 294 zcmV+>0oneS1=#|S83+ad0036bj#rT(Cw~C@Nkl;^tabtR^ zN`vDP*asJm)j-(p9j#bWQ3B-YC8Wpd`9K?Z?H=R=?C1+1NxubC`Ut3-7r7LlR%eLl s%IdxEEC+)03vjRs`v3lqUIGjN7Zb!bgCF)?l>h($07*qoM6N<$g8Sfx*#H0l literal 663 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+3?vf;>QaG}WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cMvefV5Lb0|bqx&-LqkJjV`D8XEgc=5!-o&6sj1o7*_oJ_ z*xTFJ*Vk)mYU=6f85tR=sHhw}cI?E76DLoeJbwK6kt0X+_4PwTLysOkI%m$Dj*bpx zW#wJFcAY(YR#jDX!-fs>=FK~F=ul2h&eW+>_wV1|)YPP_t2=AftSM8btX{o(<;s=Y zw{Jgq@Zjmwrxz_+)Y8%t5)z`QsJL$3I%{idPfyRaYuCoc#)gN7hlPbXI5?a+bEdVm zRa;xTqM~BQjvedQueY(WDJd!0w{Kr(XQ!j1aCiWT$c&z~`41~A0l-nDuNq#{a!{DS|} z1~632KEwgEKWxa<_B=kI<9!MgtdJ`@Vd&>g1NDM%v*dHOyXDHCQ;TYx|nyjpn-qu4aSYKL2h=J z)UFuy9O$h{dFmuncuYN2NmpUZ%3~2M#TlzIms*|7S4ryI9ooD}Ew$yr!H~{{-hy8= zR_m;oxA;`8d`XyS_|^?uo*lWiM*P#x+wNBR`&}n0ysQ7Zuv*}P;;cskd`=?YzjV&8 cVU=JA?ezNn@}}cIpl297UHx3vIVCg!0GjJc3IG5A diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png index 7d64abb042b7a5bf99a67014d936038aa669fb83..f718d3fc60580b56998b8c89965a19d962bb8881 100755 GIT binary patch delta 291 zcmV+;0o?wU1=a$P83+ad0036bj#rT(Cw~C=NklmB8RLhy{r) z3B=A&_B$ZnhGdyP5OYKM+o19|4SEj5>_BV=<^KfYy+HgAh;IRL4%ARNAnpREkJx3%C?4Lyn+1+h=1oo z*?dsLU_me!D$f9Ql{_i2#zb!Pive*ml>HfqXCeh`B2*p(mI3iYTn4cMaT*YFLSt(V z5PyKmc>u9Klzj|{kK%I?$ltP1_C_GS0cC4K(-H_ghPno4IuZxszd(E#h(7}H4kXLe pkX*0>8oMZfaWwZ61ONdB0G9PK2@nFFTU`JE002ovPDHLkV1nrFbL9X4 literal 662 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+3?vf;>QaG}WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cMvefV5Lb0|bqx&-LqkJjV`D8XEgc=5!-o&6sj1o7*_oJ_ z*xTFJ*Vk)mYU=6f85tR=sHhw}cI?E76DLoeJbwK6kt0X+_4PwTLysOkI%m$Dj*bpx zW#wJFcAY(YR#jDX!-fs>=FK~F=ul2h&eW+>_wV1|)YPP_t2=AftSM8btX{o(<;s=Y zw{Jgq@Zjmwrxz_+)Y8%t5)z`QsJL$3I%{idPfyRaYuCoc#)gN7hlPbXI5?a+bEdVm zRa;xTqM~BQjvedQueY(WDJd!0w{Kr(XQ!j1aCiWT$c&z~`41~A0l-nDuNq#{a!{DS|} z1~632KEwgE zAj5YXq0^^lT33FRZtLCEqL>r1HN(Y2u;|e2L+LGBo}G*eysRe2%W?G5L-WjHmNMM*2*S>}w3Tb}1-Z09;L?KX%}451HMyx<4>jSdkmnW0DwG(7Q54QE^{}-|?8+g=$q(h#i7_(w&uT|r|ru!NdGCqK5Eb4cA zI5rd4^{LYIo*sa>KWiD^)B`l8hpGNoAGa)i1sDKpgqnmiPa#AA0000^~BnLAC14G8|d-4+%)$18%2Ka=yUb}Yf+_`i8{r!gy9lCn;YG!8U>C>lo z?%a9m)TzUV568#HS5;N5Sg~T)u3g)=Z#OqL-?V8{KtMoJQqsYL2fMqw%gV}vgM*`^ zqql9_HgV!aA0Hn#H@B{?uFlTR#ful0mX-zu1$A_E*xA|b-MiP-)pgFCIcLtC@$>UL zTYvWKv17+}?AS4P?%etF=SM_DczJmxBqSU?deqX=66nqY>r+<&DdUnLzu^BQ1BSwR zd;5UeyF6VSLn>}1864u0m~i8b3P*9##?7A+xHi|XGA!~+G;F!*AiMfz+l{p@Cr)8ez?&N;;s`ztLr9+~i zn!t6cVH Tc|JgAF?h1O`njxgN@xNA!n4xT diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png index 0db001dcdb9a011d4f18d0023d8756d2d2fae259..732ab02a20cd8a99956bbda9a34547e4546d1a3f 100755 GIT binary patch delta 315 zcmV-B0mT001MUKl83+ad0036bj#rT(Cw~DDNklY~3u{0WFZ0C5l0i!hgxWDqhC1!6`d3&=Le5`T&P ziClv~QLcr=e?_iA`asM9WrM=$0l5Ytd+QN2Nf0y$Jy}Qsu^JNp5HTs66^JW%h}T2&m=BtTtAY3rAr~0|u^SNY2jb^I90J6=NSSme5MLrDEI@&{ z2^t33P;bJ(Q6OH2D<&90WeFC*3n+EXFK7z>2*kUwd5MrgBm;l|0{}#yWu|imfcO9a N002ovPDHLkV1ktmbhH2f delta 435 zcmaFI^ptsmBnLAC14E)fUFt+d^?HWY0X`wF2M!$AwQJY@{rmUr+ZP`nzh}=Le}Dg# zD_72)J9o#99eelgEhs2hv0{ato!!BM2b-Il8yXtY($f0-`!{XcG-b+^`uh5Qs%?%fp?6{}aTo-t#_q)C&uY}sONZrbS+r=;(*L%7+hE&|jxp1BDkO2?th1pB0H=oYpPR-X) z{{KI9kAf=S*U66VXXlLy0-s~85sor8r+rKm^L9WSnj!yJzUD~^G<2@!nwxt5H zUcaSsoHE50c)yp*O^g?fP12Npus|+~<@48|gr$F9bUGfrxLdoZ;-k=?zgH%8L>#mD oJ)uA$Z{Ggy=+D2dhBq)WR0vr~MYpFO0y>Pr)78&qol`;+0QTkSt^fc4 diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png index 0cf7edc2d467712a380f3a9d4fc58a401598f94f..25a32cb2ba94265a73a9a09342cba71f60dcfb95 100755 GIT binary patch delta 90 zcmV-g0Hy!K0gwTZ83+ad0036bj#rT(C`U3$L_t(|+G1cB1%n4{-n{ug2oqArL@f)c wW)LGT@8Hwq>+8!%GZzixz#av31ONdB09{ZJY&WT{uK)l507*qoM6N<$f_hsY2LJ#7 delta 141 zcmbQhc$jg5BnLAC14E)fUFt+djVhr4pAgqYixx>sOD|lwaPi{BGBPqi>D3yq*nt#V zNswRge-L2Uyno4lpopobi(^Q|t)zsb3_M!|k`fOJB&8h_NJ?-JO-e~gNnjB2aN-GQ pi09y#F~guo-LHe|9vg=N!~MOi2gSwrt^pdr;OXk;vd$@?2>=;_FKGY( diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png index a0c15a6d3e5785fe7f5b3311ca1a9e545b383667..08debeb91f58d0219054a58632e227ac4cfc6335 100755 GIT binary patch delta 177 zcmV;i08anJ0pyq1y`6hMt23ajBWX3PKw zF(s*jaryG)C;}ip&@x7NFK#};Xm$r6W{L{bkv p5>g9OTN7q<@s_m;Co_u#gZp3hlPsgTWr5fS zi22dP1%cQLh^28E$cV+uAjQ+5mOTgJG$hLxKn?u^#3?}hmKYZbBZ-69EKoKll8afO zau|RGi`XR~UIWB>Q2Gy4{3{Um0dW8jp9JDt#Cn-(k-`SV3TX0@K->?+n}K*T7JqpK zs6GrA3PLr2!sr4J*FxocfmjVm{R1G*g|eH0*Z_z>LdD)AyHE`&zzvYXRu0WYa!9^0 zfU^0KErl6)5r}U<*~k%b5zWB!Q2G~C9RpO~MPefbWP2twZGzI|Ol)b7Zn2DB}#m2I&J8bT8_2t*=95J@jIQGh%nV1AIbUPn|k-`t<4Y^78%r_uJXoiHeHOn>X*s zkt4fy?K*${yuH1>tE=m=W5*&RBlGj~v$L~z?%Zi^Zhqjv0b5&JFE6iaMP?mX;PhJ-vp8hSt{B-rnAhjt&nGkCKv-($dn} z+S=~!?#9N(`uh59+qUuZ^KaU;3FxDm$pR)o%CRKKFZe&PpdN=p27}Ny$APA;_jGX# zskqfL;W=NEgFwr73#%I|7DX^@{C@B5_j)ZwEz8b{KMhaTojjK!{-ON=|Ch&ClIOQ_ z3;79rSG;MsK}&OvLP3{`ae?g)*N%%K>vEPoTlVf-@!PG+=|*o=H_q8`AVtxrKSD5C zGiOWVm3H>_AfxOuhFyF4_w;iv-Ei_j_T4FrJi5{K-TQU6-kJGF%P{fC<_}BkCq?pp ysk}Hdx<9I8+QYdweWHD1w|39}vvxTHGeaxC&x0j Date: Wed, 7 Nov 2012 18:45:02 +0200 Subject: [PATCH 5/6] CHUI-473, CHUI-482 FIXED (Clicking on nearby chat toast to open Conversation floater does not show Nearby Chat conversation selected in list; Nearby chat conversation is not selected in list by default when it is the only conversation ): implement. new logic in LLIMFloaterContainer for the syncronous select the conv. list's item and corresponding convers. floater; removed floater selecting from conv. items; fixed bug with item select --- indra/llui/llfolderviewitem.cpp | 2 +- indra/newview/llconversationview.cpp | 76 ++++++++++---------------- indra/newview/llconversationview.h | 6 +- indra/newview/llimconversation.cpp | 23 +++++++- indra/newview/llimconversation.h | 2 + indra/newview/llimfloater.cpp | 13 ----- indra/newview/llimfloater.h | 3 +- indra/newview/llimfloatercontainer.cpp | 41 ++++++++++++++ indra/newview/llimfloatercontainer.h | 2 + indra/newview/llnearbychat.cpp | 18 ++---- indra/newview/llnearbychat.h | 1 - 11 files changed, 107 insertions(+), 80 deletions(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 7c63cad1b7..21fb9bff90 100755 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -410,8 +410,8 @@ void LLFolderViewItem::selectItem(void) { if (mIsSelected == FALSE) { - getViewModelItem()->selectItem(); mIsSelected = TRUE; + getViewModelItem()->selectItem(); } } diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 2d3a008bf4..34b5976e3e 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -203,6 +203,17 @@ void LLConversationViewSession::draw() LLView::draw(); } +BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + LLConversationItem* item = dynamic_cast(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + + (LLFloaterReg::getTypedInstance("im_container"))-> + selectConversationPair(session_id, false); + + return LLFolderViewFolder::handleMouseDown(x, y, mask); +} + // virtual S32 LLConversationViewSession::arrange(S32* width, S32* height) { @@ -233,29 +244,6 @@ void LLConversationViewSession::toggleOpen() } } -void LLConversationViewSession::selectItem() -{ - - LLConversationItem* item = dynamic_cast(mViewModelItem); - LLFloater* session_floater = LLIMConversation::getConversation(item->getUUID()); - LLMultiFloater* host_floater = session_floater->getHost(); - - if (host_floater == mContainer) - { - // Always expand the message pane if the panel is hosted by the container - mContainer->collapseMessagesPane(false); - // Switch to the conversation floater that is being selected - mContainer->selectFloater(session_floater); - } - - // Set the focus on the selected floater - session_floater->setFocus(TRUE); - // Store the active session - LLIMFloaterContainer::getInstance()->setSelectedSession(item->getUUID()); - - - LLFolderViewItem::selectItem(); -} void LLConversationViewSession::toggleMinimizedMode(bool is_minimized) { @@ -441,31 +429,6 @@ void LLConversationViewParticipant::draw() LLView::draw(); } -void LLConversationViewParticipant::selectItem() -{ - LLConversationItem* vmi = this->getParentFolder() ? static_cast(this->getParentFolder()->getViewModelItem()) : NULL; - LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance(); - LLFloater* session_floater; - - if(vmi) - { - session_floater = LLIMConversation::getConversation(vmi->getUUID()); - - //Only execute when switching floaters (conversations) - if(vmi->getUUID() != container->getSelectedSession()) - { - container->selectFloater(session_floater); - // Store the active session - container->setSelectedSession(vmi->getUUID()); - } - - //Redirect focus to the conversation floater - session_floater->setFocus(TRUE); - } - - LLFolderViewItem::selectItem(); -} - void LLConversationViewParticipant::refresh() { // Refresh the participant view from its model data @@ -514,6 +477,23 @@ void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask) LLFolderViewItem::onMouseLeave(x, y, mask); } +BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + LLConversationItem* item = NULL; + LLConversationViewSession* session_widget = + dynamic_cast(this->getParentFolder()); + if (session_widget) + { + item = dynamic_cast(session_widget->getViewModelItem()); + } + LLUUID session_id = item? item->getUUID() : LLUUID(); + + (LLFloaterReg::getTypedInstance("im_container"))-> + selectConversationPair(session_id, false); + + return LLFolderViewItem::handleMouseDown(x, y, mask); +} + S32 LLConversationViewParticipant::getLabelXPos() { return mAvatarIcon->getRect().mRight + mIconPad; diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index aeca747260..ac91d2d26f 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -60,10 +60,10 @@ protected: public: virtual ~LLConversationViewSession(); - virtual void selectItem(); /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); + /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ S32 arrange(S32* width, S32* height); @@ -117,11 +117,13 @@ public: }; virtual ~LLConversationViewParticipant( void ) { } - void selectItem(); + bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } virtual void refresh(); void addToFolder(LLFolderViewFolder* folder); + /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 833feff3c4..827059513f 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -128,6 +128,22 @@ void LLIMConversation::setVisible(BOOL visible) setFocus(visible); } +/*virtual*/ +void LLIMConversation::setFocus(BOOL focus) +{ + LLTransientDockableFloater::setFocus(focus); + + //Redirect focus to input editor + if (focus) + { + updateMessages(); + + if (mInputEditor) + { + mInputEditor->setFocus(TRUE); + } + } +} void LLIMConversation::addToHost(const LLUUID& session_id) @@ -247,7 +263,6 @@ void LLIMConversation::enableDisableCallBtn() && mSession->mCallBackEnabled); } - void LLIMConversation::onFocusReceived() { setBackgroundOpaque(true); @@ -258,6 +273,12 @@ void LLIMConversation::onFocusReceived() } LLTransientDockableFloater::onFocusReceived(); + + LLIMFloaterContainer* container = LLFloaterReg::getTypedInstance("im_container"); + if (container) + { + container->selectConversationPair(mSessionID, true); + } } void LLIMConversation::onFocusLost() diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h index bff4cb4a31..d1e2bfff55 100644 --- a/indra/newview/llimconversation.h +++ b/indra/newview/llimconversation.h @@ -79,7 +79,9 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setFocus(BOOL focus); + virtual void updateMessages() {} protected: diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 3545b8ff18..2ff883da67 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -671,19 +671,6 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock) } } -void LLIMFloater::setFocus(BOOL focusFlag) -{ - LLTransientDockableFloater::setFocus(focusFlag); - - //Redirect focus to input editor - if (focusFlag) - { - updateMessages(); - mInputEditor->setFocus(TRUE); - } - -} - void LLIMFloater::setVisible(BOOL visible) { LLNotificationsUI::LLScreenChannel* channel = static_cast diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 6c69ed3462..1fae3cff50 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -65,7 +65,6 @@ public: // LLView overrides /*virtual*/ BOOL postBuild(); - /*virtual*/ void setFocus(BOOL focusFlag); /*virtual*/ void setVisible(BOOL visible); /*virtual*/ BOOL getVisible(); // Check typing timeout timer. @@ -86,7 +85,7 @@ public: void sessionInitReplyReceived(const LLUUID& im_session_id); // get new messages from LLIMModel - void updateMessages(); + /*virtual*/ void updateMessages(); void reloadMessages(); static void onSendMsg(LLUICtrl*, void*); void sendMsgFromInputEditor(); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index af43b1ac38..c2ad94c423 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -1091,6 +1091,47 @@ void LLIMFloaterContainer::selectConversation(const LLUUID& session_id) } } +// Synchronous select the conversation item and the conversation floater +BOOL LLIMFloaterContainer::selectConversationPair(const LLUUID& session_id, bool select_widget) +{ + BOOL handled = TRUE; + + /* widget processing */ + if (select_widget) + { + LLFolderViewItem* widget = mConversationsWidgets[session_id]; + if (widget && widget->getParentFolder()) + { + widget->getParentFolder()->setSelection(widget, FALSE, FALSE); + } + } + + /* floater processing */ + + if (session_id != getSelectedSession()) + { + // Store the active session + setSelectedSession(session_id); + + LLIMConversation* session_floater = LLIMConversation::getConversation(session_id); + + if (session_floater->getHost()) + { + // Always expand the message pane if the panel is hosted by the container + collapseMessagesPane(false); + // Switch to the conversation floater that is being selected + selectFloater(session_floater); + } + + // Set the focus on the selected floater + if (!session_floater->hasFocus()) + { + session_floater->setFocus(TRUE); + } + } + + return handled; +} void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id) { diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 05ea94019b..25387fe83b 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -68,6 +68,8 @@ public: void showConversation(const LLUUID& session_id); void selectConversation(const LLUUID& session_id); + BOOL selectConversationPair(const LLUUID& session_id, bool select_widget); + /*virtual*/ void tabClose(); static LLFloater* getCurrentVoiceFloater(); diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index d1c7c6bfd7..a30d8b685e 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -195,8 +195,13 @@ BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) //background opaque. This all happenn since NearByChat is "chrome" and didn't process focus change. if(mChatHistory) + { mChatHistory->setFocus(TRUE); - return LLPanel::handleMouseDown(x, y, mask); + } + + BOOL handled = LLPanel::handleMouseDown(x, y, mask); + setFocus(handled); + return handled; } void LLNearbyChat::reloadMessages() @@ -270,17 +275,6 @@ void LLNearbyChat::removeScreenChat() } } -void LLNearbyChat::setFocus(BOOL focusFlag) -{ - LLTransientDockableFloater::setFocus(focusFlag); - - //Redirect focus to input editor - if (focusFlag) - { - mInputEditor->setFocus(TRUE); - } - -} void LLNearbyChat::setVisible(BOOL visible) { diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index b155fd3c26..11346a313c 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -52,7 +52,6 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void setFocus(BOOL focusFlag); /*virtual*/ void setVisible(BOOL visible); void loadHistory(); From 93f9c6991819f53ea03b36dff1af77bbd74ff43b Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 8 Nov 2012 17:00:42 +0200 Subject: [PATCH 6/6] CHUI-387 FIXED (Conversation toasts not shown for open conversations when conversation floater is in a minimized state or undocked conversation is minimized): added checking of the minimized state --- indra/newview/llimview.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d5f1e81933..11337c358f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -121,7 +121,14 @@ void toast_callback(const LLSD& msg){ // Skip toasting if we have open window of IM with this session id LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]); - if (open_im_floater && open_im_floater->isInVisibleChain() && open_im_floater->hasFocus()) + if ( + open_im_floater + && open_im_floater->isInVisibleChain() + && open_im_floater->hasFocus() + && !open_im_floater->isMinimized() + && !(open_im_floater->getHost() + && open_im_floater->getHost()->isMinimized()) + ) { return; }