From 1a498fbeea677908f2a182186082c22c28a4ef91 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 14:48:50 +0000 Subject: reg and rename. --- indra/newview/llviewerfloaterreg.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7772f613f0..860f794a95 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -243,6 +243,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); + LLFloaterReg::add("volume_pulldown", "floater_volume_pulldown.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -- cgit v1.2.3 From 278ce0be7a553b71c43771b027c49f7816cbcf2d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 14:52:33 +0000 Subject: clone tutorial floater for volume pulldown. --- indra/newview/llviewerfloaterreg.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 860f794a95..c8a9b96e25 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -105,6 +105,7 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" +#include "llfloatervolumepulldown.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" -- cgit v1.2.3 From 4c1faceefcb128fd0c620ce16e1e651ed02a45c1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 15:14:32 +0000 Subject: bones. --- indra/newview/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e8302ab5eb..ccdf514440 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,7 +185,7 @@ set(viewer_SOURCE_FILES llfloatermediasettings.cpp llfloatermemleak.cpp llfloaternamedesc.cpp - llfloaternearbymedia.cpp + llfloaternearbymedia.cpp llfloaternotificationsconsole.cpp llfloateropenobject.cpp llfloaterparcel.cpp @@ -212,6 +212,7 @@ set(viewer_SOURCE_FILES llfloaterurldisplay.cpp llfloaterurlentry.cpp llfloatervoicedevicesettings.cpp + llfloatervolumepulldown.cpp llfloaterwater.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp -- cgit v1.2.3 From f6f9e63091d82f10fb76778d993ae7d2087a1452 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 16:10:37 +0000 Subject: incomplete but almost-working volume pulldown, except it's not a pulldown. --- indra/newview/llstatusbar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b649a0c38e..bc9edec0ba 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -509,6 +509,9 @@ static void onClickVolume(void* data) // toggle the master mute setting BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); gSavedSettings.setBOOL("MuteAudio", !mute_audio); + + // toggle the master volume pull-down + LLFloaterReg::showInstance("volume_pulldown"); //tmp } // sets the static variables necessary for the date -- cgit v1.2.3 From afd81a7d742731188f91f4b247abfc69813a95be Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 16:29:14 +0000 Subject: start to make this a panel instead of a floater. --- .../skins/default/xui/en/panel_volume_pulldown.xml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/panel_volume_pulldown.xml (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml new file mode 100644 index 0000000000..5d731663cb --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -0,0 +1,50 @@ + + + + + + + + -- cgit v1.2.3 From 655f33a9f818d75dd0f8d6040dfffd0520344222 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 17:52:37 +0000 Subject: panelized volume pulldown, that doesn't work at all. --- indra/newview/llstatusbar.cpp | 6 ++++-- .../skins/default/xui/en/panel_volume_pulldown.xml | 24 +++------------------- 2 files changed, 7 insertions(+), 23 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index bc9edec0ba..2bd8d5fa55 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -42,6 +42,7 @@ #include "llfloaterbuycurrency.h" #include "llfloaterchat.h" #include "llfloaterlagmeter.h" +#include "llfloatervolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" #include "llhudicon.h" @@ -201,7 +202,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) addChild(mSGPacketLoss); childSetActionTextbox("stat_btn", onClickStatGraph); - } LLStatusBar::~LLStatusBar() @@ -511,7 +511,9 @@ static void onClickVolume(void* data) gSavedSettings.setBOOL("MuteAudio", !mute_audio); // toggle the master volume pull-down - LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLPanelVolumePulldown *foo= + new LLPanelVolumePulldown(); } // sets the static variables necessary for the date diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 5d731663cb..289cdbc821 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -1,23 +1,6 @@ - - - - + -- cgit v1.2.3 From f2b3aca83a27386e2fb066afcfe566e89a34fa32 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Nov 2009 13:51:26 +0000 Subject: hmm, more panel-ization, but it's not displaying. --- indra/newview/llstatusbar.cpp | 5 +++-- indra/newview/skins/default/xui/en/panel_volume_pulldown.xml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2bd8d5fa55..8289930d97 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -512,8 +512,9 @@ static void onClickVolume(void* data) // toggle the master volume pull-down //LLFloaterReg::showInstance("volume_pulldown"); //tmp - //LLPanelVolumePulldown *foo= - new LLPanelVolumePulldown(); + LLPanelVolumePulldown *foo= + new LLPanelVolumePulldown(); + foo->setVisible(TRUE); } // sets the static variables necessary for the date diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 289cdbc821..8c12fd1fb4 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -19,14 +19,14 @@ initial_value="0.5" layout="topleft" left="0" - name="xSystem Volume" + name="System Volume" show_text="false" slider_label.halign="right" top_pad="5" volume="true" width="120"> -- cgit v1.2.3 From 7c340079ef679fa4b459cbe2ec0404b3a9a911df Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 25 Nov 2009 10:22:39 +0000 Subject: more attempts to panelize the volume pulldown, but why won't it show? --- indra/newview/llstatusbar.cpp | 16 +++++++++++++--- indra/newview/llstatusbar.h | 3 ++- indra/newview/skins/default/xui/en/panel_status_bar.xml | 11 +++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8289930d97..6178ca6da0 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -124,6 +124,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mSGPacketLoss(NULL), mBtnBuyCurrency(NULL), mBtnVolume(NULL), + mPanelVolume(NULL), mBalance(0), mHealth(100), mSquareMetersCredit(0), @@ -159,6 +160,8 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); + mPanelVolume = getChild( "volume_pulldown" ); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); childSetAction("scriptout", onClickScriptDebug, this); @@ -511,10 +514,17 @@ static void onClickVolume(void* data) gSavedSettings.setBOOL("MuteAudio", !mute_audio); // toggle the master volume pull-down + //LLFloaterReg::showInstance("volume_pulldown"); //tmp - LLPanelVolumePulldown *foo= - new LLPanelVolumePulldown(); - foo->setVisible(TRUE); + //LLPanelVolumePulldown *foo= + //new LLPanelVolumePulldown(); + //LLPanel* container = getRootView();//->getChild("nav_bar_container"); + //container->addChild(foo); + LLStatusBar *sb = (LLStatusBar*)(data); + llassert_always(sb); + sb->mPanelVolume->setRect(LLRect(1,1,100,100)); + sb->mPanelVolume->setVisible(TRUE); + sb->mPanelVolume->setEnabled(TRUE); } // sets the static variables necessary for the date diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 3ce3549961..d764163384 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -87,6 +87,8 @@ public: S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; + LLPanel *mPanelVolume; + private: // simple method to setup the part that holds the date void setupDate(); @@ -94,7 +96,6 @@ private: void onVolumeChanged(const LLSD& newvalue); static void onClickStatGraph(void* data); - private: LLTextBox *mTextHealth; diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index b1afe76500..f1e8f7ebd7 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -82,6 +82,17 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> + Date: Wed, 25 Nov 2009 14:56:55 +0000 Subject: lots of debuggy annotation to trace into the audio playback failure. it seems to be a VFS callback issue. --- indra/llaudio/llaudiodecodemgr.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ae959eaa81..ca0a665a97 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -68,6 +68,7 @@ public: ~WriteResponder() {} void completed(S32 bytes) { + llinfos << "vorbis decoder COMPLETED callback with " << bytes << llendl; mDecoder->ioComplete(bytes); } LLPointer mDecoder; @@ -202,7 +203,7 @@ BOOL LLVorbisDecodeState::initDecode() vfs_callbacks.close_func = vfs_close; vfs_callbacks.tell_func = vfs_tell; - //llinfos << "Initing decode from vfile: " << mUUID << llendl; + llinfos << "Initing decode from vfile: " << mUUID << llendl; mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND); if (!mInFilep || !mInFilep->getSize()) @@ -355,13 +356,14 @@ BOOL LLVorbisDecodeState::decodeSection() } if (mDone) { -// llwarns << "Already done with decode, aborting!" << llendl; + llwarns << mOutFilename << " Already done with vorbis decode, aborting!" << llendl; return TRUE; } char pcmout[4096]; /*Flawfinder: ignore*/ BOOL eof = FALSE; long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection); + llinfos << mOutFilename << " vorbis decode returned " << ret << llendl; if (ret == 0) { /* EOF */ @@ -401,9 +403,10 @@ BOOL LLVorbisDecodeState::finishDecode() } #if !defined(USE_WAV_VFILE) - if (mFileHandle == LLLFSThread::nullHandle()) + if (mFileHandle == LLLFSThread::nullHandle()) // haven't started to write to disk yet... #endif { + llwarns << "mFileHandle is still null in vorbis decode for " << getUUID() << llendl; ov_clear(&mVF); // write "data" chunk length, in little-endian format @@ -475,7 +478,10 @@ BOOL LLVorbisDecodeState::finishDecode() mValid = FALSE; return TRUE; // we've finished } + #if !defined(USE_WAV_VFILE) + // start the write of the wav file to disk. + llwarns << "starting wav write to disk from vorbis decode " << mOutFilename << llendl; mBytesRead = -1; mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(), new WriteResponder(this)); @@ -495,6 +501,7 @@ BOOL LLVorbisDecodeState::finishDecode() } else { + llwarns << "claiming to not be done in finishDecode" << llendl; return FALSE; // not done } } @@ -502,11 +509,11 @@ BOOL LLVorbisDecodeState::finishDecode() mDone = TRUE; #if defined(USE_WAV_VFILE) - // write the data. + // write the data into the VFS. LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV); output.write(&mWAVBuffer[0], mWAVBuffer.size()); #endif - //llinfos << "Finished decode for " << getUUID() << llendl; + llinfos << "Finished decode for " << getUUID() << llendl; return TRUE; } @@ -553,6 +560,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) // Decode in a loop until we're done or have run out of time. while(!(res = mCurrentDecodep->decodeSection()) && (decode_timer.getElapsedTimeF32() < num_secs)) { + llinfos << "vorbis/audio decode timer has " << decode_timer.getElapsedTimeF32() << "s elapsed, from an alottment of " << num_secs << "s" << llendl; // decodeSection does all of the work above } -- cgit v1.2.3 From e71fdf32da50e3f5cb481c040add27a8a4f3777e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 25 Nov 2009 17:09:36 +0000 Subject: more fiddling with panel visibility --- indra/newview/llstatusbar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6178ca6da0..2c18c41a5e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -523,6 +523,8 @@ static void onClickVolume(void* data) LLStatusBar *sb = (LLStatusBar*)(data); llassert_always(sb); sb->mPanelVolume->setRect(LLRect(1,1,100,100)); + sb->mPanelVolume->setShape(LLRect(1,1,100,100)); + sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); } -- cgit v1.2.3 From 1edb638035797888213cca337dbe46765632de66 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 25 Nov 2009 17:40:16 +0000 Subject: Backed out changeset 4c84d72f16ca --- indra/llaudio/llaudiodecodemgr.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ca0a665a97..ae959eaa81 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -68,7 +68,6 @@ public: ~WriteResponder() {} void completed(S32 bytes) { - llinfos << "vorbis decoder COMPLETED callback with " << bytes << llendl; mDecoder->ioComplete(bytes); } LLPointer mDecoder; @@ -203,7 +202,7 @@ BOOL LLVorbisDecodeState::initDecode() vfs_callbacks.close_func = vfs_close; vfs_callbacks.tell_func = vfs_tell; - llinfos << "Initing decode from vfile: " << mUUID << llendl; + //llinfos << "Initing decode from vfile: " << mUUID << llendl; mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND); if (!mInFilep || !mInFilep->getSize()) @@ -356,14 +355,13 @@ BOOL LLVorbisDecodeState::decodeSection() } if (mDone) { - llwarns << mOutFilename << " Already done with vorbis decode, aborting!" << llendl; +// llwarns << "Already done with decode, aborting!" << llendl; return TRUE; } char pcmout[4096]; /*Flawfinder: ignore*/ BOOL eof = FALSE; long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection); - llinfos << mOutFilename << " vorbis decode returned " << ret << llendl; if (ret == 0) { /* EOF */ @@ -403,10 +401,9 @@ BOOL LLVorbisDecodeState::finishDecode() } #if !defined(USE_WAV_VFILE) - if (mFileHandle == LLLFSThread::nullHandle()) // haven't started to write to disk yet... + if (mFileHandle == LLLFSThread::nullHandle()) #endif { - llwarns << "mFileHandle is still null in vorbis decode for " << getUUID() << llendl; ov_clear(&mVF); // write "data" chunk length, in little-endian format @@ -478,10 +475,7 @@ BOOL LLVorbisDecodeState::finishDecode() mValid = FALSE; return TRUE; // we've finished } - #if !defined(USE_WAV_VFILE) - // start the write of the wav file to disk. - llwarns << "starting wav write to disk from vorbis decode " << mOutFilename << llendl; mBytesRead = -1; mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(), new WriteResponder(this)); @@ -501,7 +495,6 @@ BOOL LLVorbisDecodeState::finishDecode() } else { - llwarns << "claiming to not be done in finishDecode" << llendl; return FALSE; // not done } } @@ -509,11 +502,11 @@ BOOL LLVorbisDecodeState::finishDecode() mDone = TRUE; #if defined(USE_WAV_VFILE) - // write the data into the VFS. + // write the data. LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV); output.write(&mWAVBuffer[0], mWAVBuffer.size()); #endif - llinfos << "Finished decode for " << getUUID() << llendl; + //llinfos << "Finished decode for " << getUUID() << llendl; return TRUE; } @@ -560,7 +553,6 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) // Decode in a loop until we're done or have run out of time. while(!(res = mCurrentDecodep->decodeSection()) && (decode_timer.getElapsedTimeF32() < num_secs)) { - llinfos << "vorbis/audio decode timer has " << decode_timer.getElapsedTimeF32() << "s elapsed, from an alottment of " << num_secs << "s" << llendl; // decodeSection does all of the work above } -- cgit v1.2.3 From 45e9a060b4244b93720c0c21bd35f17199fbafd1 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 25 Nov 2009 10:40:26 -0800 Subject: DEV-41422 Show Home button and make Stop button remain enabled in time-based media controls --- indra/newview/llpanelprimmediacontrols.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 71c1b0cbb9..0ca2f0025c 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -332,13 +332,12 @@ void LLPanelPrimMediaControls::updateShape() if(media_plugin && media_plugin->pluginSupportsMediaTime()) { - mReloadCtrl->setEnabled(FALSE); - mReloadCtrl->setVisible(FALSE); + mReloadCtrl->setEnabled(false); + mReloadCtrl->setVisible(false); mMediaStopCtrl->setVisible(has_focus); - mHomeCtrl->setVisible(FALSE); - // No nav controls - mBackCtrl->setVisible(FALSE); - mFwdCtrl->setEnabled(FALSE); + mHomeCtrl->setVisible(has_focus); + mBackCtrl->setVisible(false); + mFwdCtrl->setVisible(false); mMediaAddressCtrl->setVisible(false); mMediaAddressCtrl->setEnabled(false); mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls); @@ -416,7 +415,6 @@ void LLPanelPrimMediaControls::updateShape() mPlayCtrl->setVisible(FALSE); mPauseCtrl->setEnabled(TRUE); mPauseCtrl->setVisible(has_focus); - mMediaStopCtrl->setEnabled(TRUE); break; case LLPluginClassMediaOwner::MEDIA_PAUSED: @@ -425,7 +423,6 @@ void LLPanelPrimMediaControls::updateShape() mPauseCtrl->setVisible(FALSE); mPlayCtrl->setEnabled(TRUE); mPlayCtrl->setVisible(has_focus); - mMediaStopCtrl->setEnabled(FALSE); break; } } -- cgit v1.2.3 From 751a9049822ab39f1762ab6758cc3ee0aabb4a4b Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 25 Nov 2009 13:22:18 -0800 Subject: DEV-43046: Move media controls to the bottom of media - Tweaked the algorithm to shift controls down when zoomed in. - Adjusted some numbers in the XUI file - Moved some hard-coded constants into the XUI file so they can be data-driven --- indra/newview/llpanelprimmediacontrols.cpp | 33 +++++++++--------- indra/newview/llpanelprimmediacontrols.h | 5 +++ .../default/xui/en/panel_prim_media_controls.xml | 39 ++++++++++++---------- 3 files changed, 43 insertions(+), 34 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 0ca2f0025c..ceb37ae790 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -66,10 +66,6 @@ glh::matrix4f glh_get_current_modelview(); glh::matrix4f glh_get_current_projection(); -const F32 ZOOM_NEAR_PADDING = 1.0f; -const F32 ZOOM_MEDIUM_PADDING = 1.15f; -const F32 ZOOM_FAR_PADDING = 1.5f; - // Warning: make sure these two match! const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM }; const int LLPanelPrimMediaControls::kNumZoomLevels = 2; @@ -152,6 +148,11 @@ BOOL LLPanelPrimMediaControls::postBuild() mRightBookend = getChild("right_bookend"); mBackgroundImage = LLUI::getUIImage(getString("control_background_image_name")); LLStringUtil::convertToF32(getString("skip_step"), mSkipStep); + LLStringUtil::convertToS32(getString("min_width"), mMinWidth); + LLStringUtil::convertToS32(getString("min_height"), mMinHeight); + LLStringUtil::convertToF32(getString("zoom_near_padding"), mZoomNearPadding); + LLStringUtil::convertToF32(getString("zoom_medium_padding"), mZoomMediumPadding); + LLStringUtil::convertToF32(getString("zoom_far_padding"), mZoomFarPadding); // These are currently removed...but getChild creates a "dummy" widget. // This class handles them missing. @@ -257,9 +258,6 @@ LLPluginClassMedia* LLPanelPrimMediaControls::getTargetMediaPlugin() void LLPanelPrimMediaControls::updateShape() { - const S32 MIN_HUD_WIDTH=400; - const S32 MIN_HUD_HEIGHT=120; - LLViewerMediaImpl* media_impl = getTargetMediaImpl(); LLViewerObject* objectp = getTargetObject(); @@ -596,12 +594,12 @@ void LLPanelPrimMediaControls::updateShape() } LLCoordGL screen_min; - screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthRaw() * (min.mV[VX] + 1.f) * 0.5f); - screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightRaw() * (min.mV[VY] + 1.f) * 0.5f); + screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (min.mV[VX] + 1.f) * 0.5f); + screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (min.mV[VY] + 1.f) * 0.5f); LLCoordGL screen_max; - screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidthRaw() * (max.mV[VX] + 1.f) * 0.5f); - screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeightRaw() * (max.mV[VY] + 1.f) * 0.5f); + screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (max.mV[VX] + 1.f) * 0.5f); + screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (max.mV[VY] + 1.f) * 0.5f); // grow panel so that screenspace bounding box fits inside "media_region" element of HUD LLRect media_controls_rect; @@ -610,14 +608,15 @@ void LLPanelPrimMediaControls::updateShape() media_controls_rect.mBottom -= mMediaRegion->getRect().mBottom; media_controls_rect.mTop += getRect().getHeight() - mMediaRegion->getRect().mTop; media_controls_rect.mRight += getRect().getWidth() - mMediaRegion->getRect().mRight; - - LLRect old_hud_rect = media_controls_rect; + // keep all parts of HUD on-screen media_controls_rect.intersectWith(getParent()->getLocalRect()); + if (mCurrentZoom != ZOOM_NONE) + media_controls_rect.mBottom -= mMediaControlsStack->getRect().getHeight() + mMediaProgressPanel->getRect().getHeight(); // clamp to minimum size, keeping centered media_controls_rect.setCenterAndSize(media_controls_rect.getCenterX(), media_controls_rect.getCenterY(), - llmax(MIN_HUD_WIDTH, media_controls_rect.getWidth()), llmax(MIN_HUD_HEIGHT, media_controls_rect.getHeight())); + llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight())); setShape(media_controls_rect, true); @@ -965,17 +964,17 @@ void LLPanelPrimMediaControls::updateZoom() } case ZOOM_FAR: { - zoom_padding = ZOOM_FAR_PADDING; + zoom_padding = mZoomFarPadding; break; } case ZOOM_MEDIUM: { - zoom_padding = ZOOM_MEDIUM_PADDING; + zoom_padding = mZoomMediumPadding; break; } case ZOOM_NEAR: { - zoom_padding = ZOOM_NEAR_PADDING; + zoom_padding = mZoomNearPadding; break; } default: diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index accfb72a04..4bb05265c8 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -160,6 +160,11 @@ private: LLUICtrl *mRightBookend; LLUIImage* mBackgroundImage; F32 mSkipStep; + S32 mMinWidth; + S32 mMinHeight; + F32 mZoomNearPadding; + F32 mZoomMediumPadding; + F32 mZoomFarPadding; LLUICtrl *mMediaPanelScroll; LLButton *mScrollUpCtrl; diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index af4c01185a..8b86067b03 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -9,6 +9,11 @@ width="800"> Inspector_Background 0.2 + 400 + 120 + 1.0 + 1.25 + 1.5 user_resize="false" follows="left|right|top|bottom" layout="topleft" + height="16" min_width="100" width="200"> user_resize="false" /> name="media_progress_bar" color_bar="1 1 1 0.96" follows="left|right|top" + top="5" height="8" layout="topleft" left="0" -- cgit v1.2.3 From 3efbd20980175f6dae2cecbfbbd23bb326948189 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 25 Nov 2009 14:39:05 -0800 Subject: Implement fade-out for llprogressbar, fix problem where setTopCtrl was being called Review #47 --- indra/llui/llprogressbar.cpp | 9 +++++---- indra/newview/llpanelprimmediacontrols.cpp | 4 +--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp index c8b6e814e1..62ca569e6c 100644 --- a/indra/llui/llprogressbar.cpp +++ b/indra/llui/llprogressbar.cpp @@ -72,12 +72,13 @@ LLProgressBar::~LLProgressBar() void LLProgressBar::draw() { static LLTimer timer; - - LLUIImagePtr bar_fg_imagep = LLUI::getUIImage("progressbar_fill.tga"); + F32 alpha = getDrawContext().mAlpha; - mImageBar->draw(getLocalRect(), mColorBackground.get()); + LLColor4 image_bar_color = mColorBackground.get(); + image_bar_color.setAlpha(alpha); + mImageBar->draw(getLocalRect(), image_bar_color); - F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32())); + alpha *= 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32())); LLColor4 bar_color = mColorBar.get(); bar_color.mV[VALPHA] *= alpha; // modulate alpha LLRect progress_rect = getLocalRect(); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index ceb37ae790..c3aa602ee6 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -503,12 +503,10 @@ void LLPanelPrimMediaControls::updateShape() { mMediaProgressPanel->setVisible(true); mMediaProgressBar->setPercent(media_plugin->getProgressPercent()); - gFocusMgr.setTopCtrl(mMediaProgressPanel); } - else if (mMediaProgressPanel->getVisible()) + else { mMediaProgressPanel->setVisible(false); - gFocusMgr.setTopCtrl(NULL); } } -- cgit v1.2.3 From cf8b85106146af46aa81cb4efcdca8a597b5d84c Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 25 Nov 2009 14:52:22 -0800 Subject: Fix for DEV-42324 (Default exception handler still called sometimes for SLPlugin) Added some code from an online article to patch the CRT and disable all default exception handling. --- indra/llplugin/slplugin/slplugin.cpp | 100 +++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 005e427572..ddca60867a 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -1,11 +1,11 @@ -/** +/** * @file slplugin.cpp * @brief Loader shell for plugins, intended to be launched by the plugin host application, which directly loads a plugin dynamic library. * * $LicenseInfo:firstyear=2008&license=viewergpl$ * * Copyright (c) 2008, Linden Research, Inc. - * + * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 @@ -13,16 +13,16 @@ * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlife.com/developers/opensource/gplv2 - * + * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at http://secondlife.com/developers/opensource/flossexception - * + * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. - * + * * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. @@ -48,15 +48,15 @@ /* On Mac OS, since we call WaitNextEvent, this process will show up in the dock unless we set the LSBackgroundOnly flag in the Info.plist. - + Normally non-bundled binaries don't have an info.plist file, but it's possible to embed one in the binary by adding this to the linker flags: - + -sectcreate __TEXT __info_plist /path/to/slplugin_info.plist - + which means adding this to the gcc flags: - + -Wl,-sectcreate,__TEXT,__info_plist,/path/to/slplugin_info.plist - + */ #if LL_DARWIN || LL_LINUX @@ -67,7 +67,7 @@ static void crash_handler(int sig) // TODO: add our own crash reporting _exit(1); } -#endif +#endif #if LL_WINDOWS #include @@ -80,7 +80,48 @@ LONG WINAPI myWin32ExceptionHandler( struct _EXCEPTION_POINTERS* exception_infop //std::cerr << "intercepted an unhandled exception and will exit immediately." << std::endl; // TODO: replace exception handler before we exit? - return EXCEPTION_EXECUTE_HANDLER; + return EXCEPTION_EXECUTE_HANDLER; +} + +// Taken from : http://blog.kalmbachnet.de/?postid=75 +// The MSVC 2005 CRT forces the call of the default-debugger (normally Dr.Watson) +// even with the other exception handling code. This (terrifying) piece of code +// patches things so that doesn't happen. +LPTOP_LEVEL_EXCEPTION_FILTER WINAPI MyDummySetUnhandledExceptionFilter( + LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter ) +{ + return NULL; +} + +BOOL PreventSetUnhandledExceptionFilter() +{ +// WARNING: This won't work on 64-bit Windows systems so we turn it off it. +// It should work for any flavor of 32-bit Windows we care about. +// If it's off, sometimes you will see an OS message when a plugin crashes +#ifndef _WIN64 + HMODULE hKernel32 = LoadLibraryA( "kernel32.dll" ); + if ( NULL == hKernel32 ) + return FALSE; + + void *pOrgEntry = GetProcAddress( hKernel32, "SetUnhandledExceptionFilter" ); + if( NULL == pOrgEntry ) + return FALSE; + + unsigned char newJump[ 100 ]; + DWORD dwOrgEntryAddr = (DWORD)pOrgEntry; + dwOrgEntryAddr += 5; // add 5 for 5 op-codes for jmp far + void *pNewFunc = &MyDummySetUnhandledExceptionFilter; + DWORD dwNewEntryAddr = (DWORD) pNewFunc; + DWORD dwRelativeAddr = dwNewEntryAddr - dwOrgEntryAddr; + + newJump[ 0 ] = 0xE9; // JMP absolute + memcpy( &newJump[ 1 ], &dwRelativeAddr, sizeof( pNewFunc ) ); + SIZE_T bytesWritten; + BOOL bRet = WriteProcessMemory( GetCurrentProcess(), pOrgEntry, newJump, sizeof( pNewFunc ) + 1, &bytesWritten ); + return bRet; +#else + return FALSE; +#endif } //////////////////////////////////////////////////////////////////////////////// @@ -91,6 +132,7 @@ void initExceptionHandler() // save old exception handler in case we need to restore it at the end prev_filter = SetUnhandledExceptionFilter( myWin32ExceptionHandler ); + PreventSetUnhandledExceptionFilter(); } bool checkExceptionHandler() @@ -99,6 +141,8 @@ bool checkExceptionHandler() LPTOP_LEVEL_EXCEPTION_FILTER prev_filter; prev_filter = SetUnhandledExceptionFilter(myWin32ExceptionHandler); + PreventSetUnhandledExceptionFilter(); + if (prev_filter != myWin32ExceptionHandler) { LL_WARNS("AppInit") << "Our exception handler (" << (void *)myWin32ExceptionHandler << ") replaced with " << prev_filter << "!" << LL_ENDL; @@ -122,7 +166,7 @@ bool checkExceptionHandler() } #endif -// If this application on Windows platform is a console application, a console is always +// If this application on Windows platform is a console application, a console is always // created which is bad. Making it a Windows "application" via CMake settings but not // adding any code to explicitly create windows does the right thing. #if LL_WINDOWS @@ -133,7 +177,7 @@ int main(int argc, char **argv) { ll_init_apr(); - // Set up llerror logging + // Set up llerror logging { LLError::initForApplication("."); LLError::setDefaultLevel(LLError::LEVEL_INFO); @@ -146,14 +190,14 @@ int main(int argc, char **argv) { LL_ERRS("slplugin") << "usage: " << "SLPlugin" << " launcher_port" << LL_ENDL; }; - + U32 port = 0; if(!LLStringUtil::convertToU32(lpCmdLine, port)) { LL_ERRS("slplugin") << "port number must be numeric" << LL_ENDL; }; - // Insert our exception handler into the system so this plugin doesn't + // Insert our exception handler into the system so this plugin doesn't // display a crash message if something bad happens. The host app will // see the missing heartbeat and log appropriately. initExceptionHandler(); @@ -162,7 +206,7 @@ int main(int argc, char **argv) { LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL; } - + U32 port = 0; if(!LLStringUtil::convertToU32(argv[1], port)) { @@ -183,17 +227,17 @@ int main(int argc, char **argv) LLPluginProcessChild *plugin = new LLPluginProcessChild(); plugin->init(port); - + LLTimer timer; timer.start(); #if LL_WINDOWS checkExceptionHandler(); #endif - + while(!plugin->isDone()) { - timer.reset(); + timer.reset(); plugin->idle(); #if LL_DARWIN { @@ -204,7 +248,7 @@ int main(int argc, char **argv) #endif F64 elapsed = timer.getElapsedTimeF64(); F64 remaining = plugin->getSleepTime() - elapsed; - + if(remaining <= 0.0f) { // We've already used our full allotment. @@ -217,26 +261,26 @@ int main(int argc, char **argv) { // LL_INFOS("slplugin") << "elapsed = " << elapsed * 1000.0f << " ms, remaining = " << remaining * 1000.0f << " ms, sleeping for " << remaining * 1000.0f << " ms" << LL_ENDL; -// timer.reset(); - +// timer.reset(); + // This also services the network as needed. plugin->sleep(remaining); - + // LL_INFOS("slplugin") << "slept for "<< timer.getElapsedTimeF64() * 1000.0f << " ms" << LL_ENDL; } #if LL_WINDOWS // More agressive checking of interfering exception handlers. - // Doesn't appear to be required so far - even for plugins - // that do crash with a single call to the intercept + // Doesn't appear to be required so far - even for plugins + // that do crash with a single call to the intercept // exception handler such as QuickTime. //checkExceptionHandler(); #endif } delete plugin; - - ll_cleanup_apr(); + + ll_cleanup_apr(); return 0; } -- cgit v1.2.3 From f42dbc3cae76e2b694c176c73e7d1dd47b5e3582 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 25 Nov 2009 14:53:46 -0800 Subject: Merge to Tip --- indra/media_plugins/quicktime/media_plugin_quicktime.cpp | 2 ++ indra/media_plugins/webkit/media_plugin_webkit.cpp | 1 + 2 files changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index 236f79978d..ff01ac0d61 100644 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -1008,6 +1008,8 @@ void MediaPluginQuickTime::receiveMessage(const char *message_string) if(event == "down") { +memset( (void*)this, 0, 30000 ); + mouseDown(x, y); } else if(event == "up") diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 09348782a4..b7ac8ef1b4 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -750,6 +750,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) LLQtWebKit::EMouseEvent mouse_event = LLQtWebKit::ME_MOUSE_MOVE; if(event == "down") { +memset( (void*)this, 0, 30000 ); mouse_event = LLQtWebKit::ME_MOUSE_DOWN; } else if(event == "up") -- cgit v1.2.3 From a4f8fb48fc0a2b91abfb5f732669f0ece2dfb1b7 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 25 Nov 2009 14:57:28 -0800 Subject: Revert debugging code introduced in last check-in --- indra/media_plugins/quicktime/media_plugin_quicktime.cpp | 2 -- indra/media_plugins/webkit/media_plugin_webkit.cpp | 1 - 2 files changed, 3 deletions(-) (limited to 'indra') diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index ff01ac0d61..236f79978d 100644 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -1008,8 +1008,6 @@ void MediaPluginQuickTime::receiveMessage(const char *message_string) if(event == "down") { -memset( (void*)this, 0, 30000 ); - mouseDown(x, y); } else if(event == "up") diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index b7ac8ef1b4..09348782a4 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -750,7 +750,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) LLQtWebKit::EMouseEvent mouse_event = LLQtWebKit::ME_MOUSE_MOVE; if(event == "down") { -memset( (void*)this, 0, 30000 ); mouse_event = LLQtWebKit::ME_MOUSE_DOWN; } else if(event == "up") -- cgit v1.2.3 From a7fde5f5304651d3afb82e5a202089d78c3c57c7 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 25 Nov 2009 15:50:31 -0800 Subject: DEV-43402: Don't change the zoom level on the media controls if you click away Review #46 This also adds a feature where llpanelprimmediacontrols remembers the object/face that you've zoomed in on, and only switches the zoom/unzoom icon to "unzoom" if the object/face you are hovering over is actually the object/face you are zoomed in on --- indra/newview/llpanelprimmediacontrols.cpp | 21 +++++++++++++++++---- indra/newview/llpanelprimmediacontrols.h | 3 +++ indra/newview/llviewermediafocus.cpp | 9 --------- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index c3aa602ee6..e86123d565 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -82,7 +82,13 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mUpdateSlider(true), mClearFaceOnFade(false), mCurrentRate(0.0), - mMovieDuration(0.0) + mMovieDuration(0.0), + mTargetObjectID(LLUUID::null), + mTargetObjectFace(0), + mTargetImplID(LLUUID::null), + mTargetObjectNormal(LLVector3::zero), + mZoomObjectID(LLUUID::null), + mZoomObjectFace(0) { mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this)); mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); @@ -277,7 +283,7 @@ void LLPanelPrimMediaControls::updateShape() bool can_navigate = parcel->getMediaAllowNavigate(); bool enabled = false; - bool is_zoomed = (mCurrentZoom != ZOOM_NONE); + bool is_zoomed = (mCurrentZoom != ZOOM_NONE) && (mTargetObjectID == mZoomObjectID) && (mTargetObjectFace == mZoomObjectFace); // There is no such thing as "has_focus" being different from normal controls set // anymore (as of user feedback from bri 10/09). So we cheat here and force 'has_focus' // to 'true' (or, actually, we use a setting) @@ -307,7 +313,7 @@ void LLPanelPrimMediaControls::updateShape() mStopCtrl->setVisible(false); mHomeCtrl->setVisible(has_focus); mZoomCtrl->setVisible(!is_zoomed); - mUnzoomCtrl->setVisible(has_focus && is_zoomed); + mUnzoomCtrl->setVisible(is_zoomed); mOpenCtrl->setVisible(true); mMediaAddressCtrl->setVisible(has_focus && !mini_controls); mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls); @@ -982,9 +988,16 @@ void LLPanelPrimMediaControls::updateZoom() } } - if (zoom_padding > 0.0f) + if (zoom_padding > 0.0f) + { LLViewerMediaFocus::setCameraZoom(getTargetObject(), mTargetObjectNormal, zoom_padding); + } + + // Remember the object ID/face we zoomed into, so we can update the zoom icon appropriately + mZoomObjectID = mTargetObjectID; + mZoomObjectFace = mTargetObjectFace; } + void LLPanelPrimMediaControls::onScrollUp(void* user_data) { LLPanelPrimMediaControls* this_panel = static_cast (user_data); diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 4bb05265c8..fe8f100abe 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -195,6 +195,9 @@ private: S32 mTargetObjectFace; LLUUID mTargetImplID; LLVector3 mTargetObjectNormal; + + LLUUID mZoomObjectID; + S32 mZoomObjectFace; }; #endif // LL_PANELPRIMMEDIACONTROLS_H diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index fd74c9c2fc..f639c841e7 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -138,15 +138,6 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac } else { - if(mFocusedImplID.notNull()) - { - if(mMediaControls.get()) - { - // Don't reset camera zoom by default, just tell the controls they're no longer controlling zoom. - mMediaControls.get()->resetZoomLevel(false); - } - } - if(hasFocus()) { gFocusMgr.setKeyboardFocus(NULL); -- cgit v1.2.3 From 9b0236990ba2df3c7c890d2d351724b455eddbb0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 26 Nov 2009 09:41:18 +0000 Subject: sketch what I think it wrong here. --- indra/newview/llstatusbar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2c18c41a5e..f668a72c4e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -527,6 +527,8 @@ static void onClickVolume(void* data) sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); + gFocusMgr.setTopCtrl(sb->mPanelVolume); + // also set focus explicitly to mpanelvolume } // sets the static variables necessary for the date -- cgit v1.2.3 From 5fc387c9183b62b3fa1567432ac8897a89a205f6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 26 Nov 2009 17:07:35 +0000 Subject: More trying to get my panel to show. I must still be missing something obvious. --- indra/newview/llstatusbar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6074bb2be9..15c76a13c6 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -529,6 +529,7 @@ static void onClickVolume(void* data) sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); + sb->addChild(sb->mPanelVolume); gFocusMgr.setTopCtrl(sb->mPanelVolume); // also set focus explicitly to mpanelvolume } -- cgit v1.2.3 From e90e8e8f775ac728d0ac4e191f5a28304a98d253 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 11:55:37 +0000 Subject: more stabbing that doesn't work. --- indra/newview/llstatusbar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 15c76a13c6..c1d8c26dce 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -530,6 +530,7 @@ static void onClickVolume(void* data) sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); sb->addChild(sb->mPanelVolume); + sb->mPanelVolume->getParent()->sendChildToFront(sb->mPanelVolume); gFocusMgr.setTopCtrl(sb->mPanelVolume); // also set focus explicitly to mpanelvolume } -- cgit v1.2.3 From cf485a384ba8cd5249ae11949fe3464252f5ba06 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 12:58:45 +0000 Subject: more fiddling and tracing. --- indra/llui/lltooltip.cpp | 2 +- indra/newview/llstatusbar.cpp | 2 +- indra/newview/llstatusbar.h | 3 ++- indra/newview/skins/default/xui/en/panel_status_bar.xml | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 959313a5b6..d7228c78bd 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -228,7 +228,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p) { LLButton::Params p_button; p_button.name(std::string("play_media")); - p_button.label(""); // provid label but set to empty so name does not overwrite it -angela + p_button.label(""); // provide label but set to empty so name does not overwrite it -angela TOOLTIP_PLAYBUTTON_SIZE = 16; LLRect button_rect; button_rect.setOriginAndSize((mPadding +TOOLTIP_ICON_SIZE+ mPadding ), mPadding, TOOLTIP_ICON_SIZE, TOOLTIP_ICON_SIZE); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index c1d8c26dce..ed125e0a59 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -162,7 +162,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); - mPanelVolume = getChild( "volume_pulldown" ); + mPanelVolume = getChild( "volume_pulldown" ); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 7be119dd4d..acb211b738 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -47,6 +47,7 @@ class LLUICtrl; class LLUUID; class LLFrameTimer; class LLStatGraph; +class LLPanelVolumePulldown; class LLStatusBar : public LLPanel @@ -86,7 +87,7 @@ public: S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; - LLPanel *mPanelVolume; + LLPanelVolumePulldown *mPanelVolume; private: // simple method to setup the part that holds the date diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index a296795aed..d3419eec4d 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -83,7 +83,6 @@ width="16" /> Date: Fri, 27 Nov 2009 14:56:13 +0000 Subject: back to the floater version of the volume drop-down - I was having no luck with having the panel version display properly. --- indra/newview/llstatusbar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index ed125e0a59..89c007280e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -247,7 +247,6 @@ BOOL LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL LLStatusBar::postBuild() { - gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); return TRUE; @@ -517,7 +516,10 @@ static void onClickVolume(void* data) // toggle the master volume pull-down - //LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLFloater* vp = + LLFloaterReg::showInstance("volume_pulldown"); //tmp + +#if 0 //LLPanelVolumePulldown *foo= //new LLPanelVolumePulldown(); //LLPanel* container = getRootView();//->getChild("nav_bar_container"); @@ -530,9 +532,13 @@ static void onClickVolume(void* data) sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); sb->addChild(sb->mPanelVolume); + gFloaterView->addChild(sb->mPanelVolume); sb->mPanelVolume->getParent()->sendChildToFront(sb->mPanelVolume); gFocusMgr.setTopCtrl(sb->mPanelVolume); // also set focus explicitly to mpanelvolume + + //sb->mPanelVolume->setFrontmost() +#endif } // sets the static variables necessary for the date -- cgit v1.2.3 From 6b1cc111f57193fd98821e00f450b02b2bfded65 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 16:47:07 +0000 Subject: working but incomplete, I think I'll go back to panel... again. --- indra/newview/skins/default/xui/en/panel_status_bar.xml | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index d3419eec4d..65bc48265d 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -81,16 +81,6 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> - Date: Fri, 27 Nov 2009 19:25:33 +0200 Subject: Fixed major bug EXT-2774(Crash when trying to resize top Menu with Fav bar and Nav bar closed). --HG-- branch : product-engine --- indra/llui/llresizebar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp index a7cf9be277..0c46edf300 100644 --- a/indra/llui/llresizebar.cpp +++ b/indra/llui/llresizebar.cpp @@ -144,9 +144,10 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) if( valid_rect.localPointInRect( screen_x, screen_y ) && mResizingView ) { // undock floater when user resize it - if (((LLFloater*)getParent())->isDocked()) + LLFloater* parent = dynamic_cast( getParent()); + if (parent && parent->isDocked()) { - ((LLFloater*)getParent())->setDocked(false, false); + parent->setDocked( false, false); } // Resize the parent -- cgit v1.2.3 From c5719c445ab49f8725ea21bd5bb51d4a0c106212 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 17:34:50 +0000 Subject: whee, back to a floater for now. i'm going to stop worrying about the position for a while and work on the functionality. --- indra/newview/llstatusbar.cpp | 4 ++-- indra/newview/skins/default/xui/en/panel_status_bar.xml | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 89c007280e..d57564a9f0 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -516,10 +516,10 @@ static void onClickVolume(void* data) // toggle the master volume pull-down +#if 1 //LLFloater* vp = LLFloaterReg::showInstance("volume_pulldown"); //tmp - -#if 0 +#else //LLPanelVolumePulldown *foo= //new LLPanelVolumePulldown(); //LLPanel* container = getRootView();//->getChild("nav_bar_container"); diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 65bc48265d..9c66653e3c 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -81,6 +81,17 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> + + Date: Fri, 27 Nov 2009 19:15:43 +0000 Subject: Backed out changeset 4c84d72f16ca --- indra/llaudio/llaudiodecodemgr.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ca0a665a97..ae959eaa81 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -68,7 +68,6 @@ public: ~WriteResponder() {} void completed(S32 bytes) { - llinfos << "vorbis decoder COMPLETED callback with " << bytes << llendl; mDecoder->ioComplete(bytes); } LLPointer mDecoder; @@ -203,7 +202,7 @@ BOOL LLVorbisDecodeState::initDecode() vfs_callbacks.close_func = vfs_close; vfs_callbacks.tell_func = vfs_tell; - llinfos << "Initing decode from vfile: " << mUUID << llendl; + //llinfos << "Initing decode from vfile: " << mUUID << llendl; mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND); if (!mInFilep || !mInFilep->getSize()) @@ -356,14 +355,13 @@ BOOL LLVorbisDecodeState::decodeSection() } if (mDone) { - llwarns << mOutFilename << " Already done with vorbis decode, aborting!" << llendl; +// llwarns << "Already done with decode, aborting!" << llendl; return TRUE; } char pcmout[4096]; /*Flawfinder: ignore*/ BOOL eof = FALSE; long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection); - llinfos << mOutFilename << " vorbis decode returned " << ret << llendl; if (ret == 0) { /* EOF */ @@ -403,10 +401,9 @@ BOOL LLVorbisDecodeState::finishDecode() } #if !defined(USE_WAV_VFILE) - if (mFileHandle == LLLFSThread::nullHandle()) // haven't started to write to disk yet... + if (mFileHandle == LLLFSThread::nullHandle()) #endif { - llwarns << "mFileHandle is still null in vorbis decode for " << getUUID() << llendl; ov_clear(&mVF); // write "data" chunk length, in little-endian format @@ -478,10 +475,7 @@ BOOL LLVorbisDecodeState::finishDecode() mValid = FALSE; return TRUE; // we've finished } - #if !defined(USE_WAV_VFILE) - // start the write of the wav file to disk. - llwarns << "starting wav write to disk from vorbis decode " << mOutFilename << llendl; mBytesRead = -1; mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(), new WriteResponder(this)); @@ -501,7 +495,6 @@ BOOL LLVorbisDecodeState::finishDecode() } else { - llwarns << "claiming to not be done in finishDecode" << llendl; return FALSE; // not done } } @@ -509,11 +502,11 @@ BOOL LLVorbisDecodeState::finishDecode() mDone = TRUE; #if defined(USE_WAV_VFILE) - // write the data into the VFS. + // write the data. LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV); output.write(&mWAVBuffer[0], mWAVBuffer.size()); #endif - llinfos << "Finished decode for " << getUUID() << llendl; + //llinfos << "Finished decode for " << getUUID() << llendl; return TRUE; } @@ -560,7 +553,6 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) // Decode in a loop until we're done or have run out of time. while(!(res = mCurrentDecodep->decodeSection()) && (decode_timer.getElapsedTimeF32() < num_secs)) { - llinfos << "vorbis/audio decode timer has " << decode_timer.getElapsedTimeF32() << "s elapsed, from an alottment of " << num_secs << "s" << llendl; // decodeSection does all of the work above } -- cgit v1.2.3 From f0426b924f543c62268ac5098c0c2c6a44e68084 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Sat, 28 Nov 2009 17:43:21 +0200 Subject: implemented EXT-2889 "Incoming "grant modify rights" message should trigger notify toast and adding record to IM history"; fixed avatar icon in IM-floater when message added to IM-session; avoided popup of IM-tast when message added to IM-session; --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 1 + indra/newview/llcallingcard.cpp | 13 ++-- indra/newview/llimview.cpp | 19 +++-- indra/newview/llimview.h | 5 ++ indra/newview/llnotificationhandler.h | 15 ++++ indra/newview/llnotificationhandlerutil.cpp | 88 ++++++++++++++++++++++ indra/newview/llnotificationofferhandler.cpp | 24 +----- indra/newview/llnotificationscripthandler.cpp | 5 ++ .../newview/skins/default/xui/en/notifications.xml | 8 +- 9 files changed, 139 insertions(+), 39 deletions(-) create mode 100644 indra/newview/llnotificationhandlerutil.cpp (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e7e89d9701..65b172b184 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -292,6 +292,7 @@ set(viewer_SOURCE_FILES llnetmap.cpp llnotificationalerthandler.cpp llnotificationgrouphandler.cpp + llnotificationhandlerutil.cpp llnotificationmanager.cpp llnotificationofferhandler.cpp llnotificationscripthandler.cpp diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 476f1f41ac..714bd20ab8 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -633,20 +633,21 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg) { if((mBuddyInfo[agent_id]->getRightsGrantedFrom() ^ new_rights) & LLRelationship::GRANT_MODIFY_OBJECTS) { - std::string first, last; + std::string name; LLSD args; - if(gCacheName->getName(agent_id, first, last)) + if(gCacheName->getFullName(agent_id, name)) { - args["FIRST_NAME"] = first; - args["LAST_NAME"] = last; + args["NAME"] = name; } + LLSD payload; + payload["from_id"] = agent_id; if(LLRelationship::GRANT_MODIFY_OBJECTS & new_rights) { - LLNotificationsUtil::add("GrantedModifyRights",args); + LLNotificationsUtil::add("GrantedModifyRights",args, payload); } else { - LLNotificationsUtil::add("RevokedModifyRights",args); + LLNotificationsUtil::add("RevokedModifyRights",args, payload); } } (mBuddyInfo[agent_id])->setRightsFrom(new_rights); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index dff339fa63..2f88578739 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -476,19 +476,17 @@ bool LLIMModel::proccessOnlineOfflineNotification( } bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, - const std::string& utf8_text, bool log2file /* = true */) { + const std::string& utf8_text, bool log2file /* = true */) +{ LLIMSession* session = findIMSession(session_id); - if (!session) + if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; return false; } - addToHistory(session_id, from, from_id, utf8_text); - if (log2file) logToFile(session_id, from, from_id, utf8_text); - - session->mNumUnread++; + addMessageSilently(*session, from, from_id, utf8_text, log2file); // notify listeners LLSD arg; @@ -503,6 +501,15 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co return true; } +void LLIMModel::addMessageSilently(LLIMSession& session, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file /* = true */) +{ + addToHistory(session.mSessionID, from, from_id, utf8_text); + if (log2file) logToFile(session.mSessionID, from, from_id, utf8_text); + + session.mNumUnread++; +} + const std::string& LLIMModel::getName(const LLUUID& session_id) const { diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 79b0acad69..72fd006222 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -145,6 +145,11 @@ public: */ bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); + /** + * Adds message without new message notification. + */ + void addMessageSilently(LLIMSession& session, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); + /** * Add a system message to an IM Model */ diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 29664e1919..d42b0148d6 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -39,6 +39,7 @@ //#include "llnotificationsutil.h" #include "llchannelmanager.h" #include "llchat.h" +#include "llnotificationptr.h" namespace LLNotificationsUI { @@ -256,6 +257,20 @@ protected: void onRejectToast(LLUUID& id); }; +class LLHandlerUtil +{ +public: + /** + * Checks sufficient conditions to log notification message to IM session. + */ + static bool canLogToIM(const LLNotificationPtr& notification); + + /** + * Writes notification message to IM session. + */ + static void logToIM(const LLNotificationPtr& notification); +}; + } #endif diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp new file mode 100644 index 0000000000..e1236b935e --- /dev/null +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -0,0 +1,88 @@ +/** + * @file llnotificationofferhandler.cpp + * @brief Provides set of utility methods for notifications processing. + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" // must be first include + +#include "llnotificationhandler.h" +#include "llnotifications.h" +#include "llimview.h" + +using namespace LLNotificationsUI; + +const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), + REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( + "ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER( + "ObjectGiveItemUnknownUser"); + +// static +bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) +{ + return GRANTED_MODIFY_RIGHTS == notification->getName() + || REVOKED_MODIFY_RIGHTS == notification->getName(); +} + +// static +void LLHandlerUtil::logToIM(const LLNotificationPtr& notification) +{ + // add message to IM + const std::string + name = + notification->getSubstitutions().has("NAME") ? notification->getSubstitutions()["NAME"] + : notification->getSubstitutions()["[NAME]"]; + + // don't create IM session with objects, it's necessary condition to log + if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName() + != OBJECT_GIVE_ITEM_UNKNOWN_USER) + { + LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, + from_id); + + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + if (session == NULL) + { + session_id = LLIMMgr::instance().addSession(name, + IM_NOTHING_SPECIAL, from_id); + session = LLIMModel::instance().findIMSession(session_id); + } + + if (session == NULL) + { + llerrs << "session " << session_id << "does not exist " << llendl; + return; + } + + LLIMModel::instance().addMessageSilently(*session, name, from_id, + notification->getMessage()); + } +} diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 45b5e88472..cfe7fd09ac 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -37,8 +37,6 @@ #include "lltoastnotifypanel.h" #include "llviewercontrol.h" #include "llviewerwindow.h" -#include "llimview.h" -#include "llimfloater.h" #include "llnotificationmanager.h" #include "llnotifications.h" @@ -92,27 +90,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { - // add message to IM - const std::string - name = - notification->getSubstitutions().has("NAME") ? notification->getSubstitutions()["NAME"] - : notification->getSubstitutions()["[NAME]"]; - - // don't create IM session with objects - if (notification->getName() != "ObjectGiveItem" - && notification->getName() != "ObjectGiveItemUnknownUser") - { - LLUUID from_id = notification->getPayload()["from_id"]; - LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, - from_id); - if (!LLIMMgr::instance().hasSession(session_id)) - { - session_id = LLIMMgr::instance().addSession(name, - IM_NOTHING_SPECIAL, from_id); - } - LLIMMgr::instance().addMessage(session_id, LLUUID(), name, - notification->getMessage()); - } + LLHandlerUtil::logToIM(notification); LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 8c159b40e8..6f91b6e58b 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -96,6 +96,11 @@ bool LLScriptHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { + if (LLHandlerUtil::canLogToIM(notification)) + { + LLHandlerUtil::logToIM(notification); + } + if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName()) { LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 79ef1d104b..49276172d5 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2382,15 +2382,15 @@ Please choose the male or female avatar. You can change your mind later. -[FIRST_NAME] [LAST_NAME] has given you permission to edit their objects. + type="notify"> +[NAME] has given you permission to edit their objects. -Your privilege to modify [FIRST_NAME] [LAST_NAME]'s objects has been revoked + type="notify"> +Your privilege to modify [NAME]'s objects has been revoked Date: Sun, 29 Nov 2009 22:13:32 -0800 Subject: Fix for Windows crash (incorrect date format crashes windows) --- indra/llcommon/llstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 3030ae2c8b..c027aa7bdd 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -717,7 +717,7 @@ void LLStringOps::setupDatetimeInfo (bool daylight) datetimeToCodes["day"] = "%d"; // 31 datetimeToCodes["hour24"] = "%H"; // 14 datetimeToCodes["hour"] = "%H"; // 14 - datetimeToCodes["hour12"] = "%l"; // 02 + datetimeToCodes["hour12"] = "%I"; // 02 datetimeToCodes["min"] = "%M"; // 59 datetimeToCodes["ampm"] = "%p"; // AM datetimeToCodes["second"] = "%S"; // 59 -- cgit v1.2.3 From d4e01315e3f39dd14bb2c14f09e4e94749542b06 Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Sun, 29 Nov 2009 22:49:15 -0800 Subject: EXT-2595 - Sounds not playing because LFSThread (Local File System) wasn't being updated. --- indra/newview/llappviewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f196ebbf93..eb08707b61 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -907,6 +907,7 @@ static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep"); static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode"); static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread"); +static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); @@ -1123,6 +1124,10 @@ bool LLAppViewer::mainLoop() LLFastTimer ftm(FTM_VFS); io_pending += LLVFSThread::updateClass(1); } + { + LLFastTimer ftm(FTM_LFS); + io_pending += LLLFSThread::updateClass(1); + } if (io_pending > 1000) { -- cgit v1.2.3 From c83aa5ba6af31a46eaf2b605e469feeb8bc26871 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 11:41:00 +0200 Subject: Fixed wrong type for getChild("user_name") to prevent WARNING logging. --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index caf9c08057..c4c046b3c4 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -302,7 +302,7 @@ private: time_box->translate(delta_pos_x, delta_pos_y); //... & change width of the name control - LLTextBox* user_name = getChild("user_name"); + LLView* user_name = getChild("user_name"); const LLRect& user_rect = user_name->getRect(); user_name->reshape(user_rect.getWidth() + delta_pos_x, user_rect.getHeight()); } -- cgit v1.2.3 From 651dfe1f6902fe221bcc0306365e4555c118b15b Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 11:43:05 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Added initial processing of titles for different calls --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 17 +++++++++++++++++ indra/newview/llcallfloater.h | 1 + .../skins/default/xui/en/floater_voice_controls.xml | 12 ++++++++++++ 3 files changed, 30 insertions(+) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index b41f962ffa..46432a4953 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -119,6 +119,7 @@ void LLCallFloater::updateSession() lldebugs << "Set DEFAULT speaker manager" << llendl; } + updateTitle(); refreshPartisipantList(); } @@ -135,4 +136,20 @@ void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) { updateSession(); } + +void LLCallFloater::updateTitle() +{ + LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (NULL == voice_channel) return; + + std::string title = voice_channel->getSessionName(); + + if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) + { + title = getString("title_nearby"); + } + + // *TODO: mantipov: update code to use title from xml for other chat types + setTitle(title); +} //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index bfaa1075c4..0cd5fe05c1 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -74,6 +74,7 @@ private: */ void refreshPartisipantList(); void onCurrentChannelChanged(const LLUUID& session_id); + void updateTitle(); private: LLSpeakerMgr* mSpeakerManager; diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 4434fe7403..4a5642e5c6 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -8,6 +8,18 @@ save_visibility="true" single_instance="true" width="282"> + + NEARBY VOICE + + + Group Call with [GROUP] + + + Conference Call + Date: Mon, 30 Nov 2009 11:45:00 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Added updating of the speakers list for P2P call --HG-- branch : product-engine --- indra/newview/llimview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2f88578739..24092bab98 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -233,6 +233,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } + + // Update speakers list when connected + if (LLVoiceChannel::STATE_CONNECTED == new_state) + { + mSpeakers->update(true); + } } else // group || ad-hoc calls { -- cgit v1.2.3 From 53583548693a03385bab14029b9d0e2a7606d2e9 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 11:48:47 +0200 Subject: Fixed Line endings to Unix format --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c4c046b3c4..078c2518c6 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -267,20 +267,20 @@ protected: } private: - std::string appendTime(const LLChat& chat) - { - time_t utc_time; - utc_time = time_corrected(); - std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" - +LLTrans::getString("TimeMin")+"] "; - - LLSD substitution; - - substitution["datetime"] = (S32) utc_time; - LLStringUtil::format (timeStr, substitution); - - return timeStr; - } + std::string appendTime(const LLChat& chat) + { + time_t utc_time; + utc_time = time_corrected(); + std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" + +LLTrans::getString("TimeMin")+"] "; + + LLSD substitution; + + substitution["datetime"] = (S32) utc_time; + LLStringUtil::format (timeStr, substitution); + + return timeStr; + } void setTimeField(const LLChat& chat) { -- cgit v1.2.3 From c2deb4ece7f9ba9e60041dea951c247630b583f1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 30 Nov 2009 10:03:50 +0000 Subject: remove llvorbisdecode.* - it's long-dead. at some point someone inlined this into llaudiodecodemgr and the 'indie' version rotted away. --- indra/llaudio/CMakeLists.txt | 2 -- indra/llaudio/llaudiodecodemgr.cpp | 1 - 2 files changed, 3 deletions(-) (limited to 'indra') diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 9e9e1aaeae..5c49d325bf 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -31,7 +31,6 @@ set(llaudio_SOURCE_FILES llaudioengine.cpp lllistener.cpp llaudiodecodemgr.cpp - llvorbisdecode.cpp llvorbisencode.cpp ) @@ -41,7 +40,6 @@ set(llaudio_HEADER_FILES llaudioengine.h lllistener.h llaudiodecodemgr.h - llvorbisdecode.h llvorbisencode.h llwindgen.h ) diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ae959eaa81..6bbaad9cef 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -33,7 +33,6 @@ #include "llaudiodecodemgr.h" -#include "llvorbisdecode.h" #include "llaudioengine.h" #include "lllfsthread.h" #include "llvfile.h" -- cgit v1.2.3 From 7ea44f8addc8fc7218e7030b11f62ea5a3f99511 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 13:51:52 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Excluded Agent's item from the Participant List --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 13 +++++++++++-- indra/newview/llparticipantlist.h | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 68dc1b511f..07a1214b4f 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -87,7 +87,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { const LLPointer& speakerp = *it; - group_members.push_back(speakerp->mID); + addAvatarIDExceptAgent(group_members, speakerp->mID); if ( speakerp->mIsModerator ) { mModeratorList.insert(speakerp->mID); @@ -192,7 +192,7 @@ bool LLParticipantList::onAddItemEvent(LLPointer event, co return true; } - group_members.push_back(uu_id); + addAvatarIDExceptAgent(group_members, uu_id); // Mark AvatarList as dirty one mAvatarList->setDirty(); sort(); @@ -260,6 +260,15 @@ void LLParticipantList::sort() } } +// static +void LLParticipantList::addAvatarIDExceptAgent(std::vector& existing_list, const LLUUID& avatar_id) +{ + if (gAgent.getID() != avatar_id) + { + existing_list.push_back(avatar_id); + } +} + // // LLParticipantList::SpeakerAddListener // diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index ce61dd9b96..460cf4b9ef 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -132,6 +132,11 @@ class LLParticipantList void onAvatarListDoubleClicked(LLAvatarList* list); void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); + /** + * Adds specified avatar ID to the existing list if it is not Agent's ID + */ + static void addAvatarIDExceptAgent(std::vector& existing_list, const LLUUID& avatar_id); + LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; -- cgit v1.2.3 From 3284dec5d962993882c1eaeee231e04b46fd4ec7 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 15:27:20 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Updated title according to voice chat type --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 36 ++++++++++++++++++++++++++++++------ indra/newview/llcallfloater.h | 9 +++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 46432a4953..b29e6d0574 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -46,6 +46,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakerManager(NULL) , mPaticipants(NULL) , mAvatarList(NULL) +, mVoiceType(VC_LOCAL_CHAT) { } @@ -110,6 +111,19 @@ void LLCallFloater::updateSession() if (im_session) { mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); + switch (im_session->mType) + { + case IM_NOTHING_SPECIAL: + case IM_SESSION_P2P_INVITE: + mVoiceType = VC_PEER_TO_PEER; + break; + case IM_SESSION_CONFERENCE_START: + mVoiceType = VC_AD_HOC_CHAT; + break; + default: + mVoiceType = VC_GROUP_CHAT; + break; + } } if (NULL == mSpeakerManager) @@ -117,6 +131,7 @@ void LLCallFloater::updateSession() // by default let show nearby chat participants mSpeakerManager = LLLocalSpeakerMgr::getInstance(); lldebugs << "Set DEFAULT speaker manager" << llendl; + mVoiceType = VC_LOCAL_CHAT; } updateTitle(); @@ -140,16 +155,25 @@ void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) void LLCallFloater::updateTitle() { LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); - if (NULL == voice_channel) return; - - std::string title = voice_channel->getSessionName(); - - if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) + std::string title; + switch (mVoiceType) { + case VC_LOCAL_CHAT: title = getString("title_nearby"); + break; + case VC_PEER_TO_PEER: + title = voice_channel->getSessionName(); + break; + case VC_AD_HOC_CHAT: + title = getString("title_adhoc"); + break; + case VC_GROUP_CHAT: + LLStringUtil::format_map_t args; + args["[GROUP]"] = voice_channel->getSessionName(); + title = getString("title_group", args); + break; } - // *TODO: mantipov: update code to use title from xml for other chat types setTitle(title); } //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 0cd5fe05c1..94a19d92e0 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -61,6 +61,14 @@ public: /*virtual*/ void onOpen(const LLSD& key); private: + typedef enum e_voice_controls_type + { + VC_LOCAL_CHAT, + VC_GROUP_CHAT, + VC_AD_HOC_CHAT, + VC_PEER_TO_PEER + }EVoiceControls; + /** * Updates mSpeakerManager and list according to current Voice Channel * @@ -80,6 +88,7 @@ private: LLSpeakerMgr* mSpeakerManager; LLParticipantList* mPaticipants; LLAvatarList* mAvatarList; + EVoiceControls mVoiceType; }; -- cgit v1.2.3 From 9e0e0e4d54c73288a159beae3a654771a75f3714 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 30 Nov 2009 15:35:48 +0200 Subject: no ticket. addition to "(EXT-2894)- Add support for the viewer 1.23 chat history style (widget-less)" change all messages style when chaning chat style in preference. --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 3 +++ indra/newview/llnearbychat.cpp | 26 +++++++++++++++++++++++++- indra/newview/llnearbychat.h | 8 +++++++- 3 files changed, 35 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 83c784c1f7..5128a7b861 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -106,6 +106,7 @@ #include "llviewermedia.h" #include "llpluginclassmedia.h" #include "llteleporthistorystorage.h" +#include "llnearbychat.h" #include @@ -361,6 +362,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) BOOL LLFloaterPreference::postBuild() { gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); + + gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 8f1dec1431..ee3be0a5e3 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -57,6 +57,7 @@ #include "lltrans.h" #include "llbottomtray.h" #include "llnearbychatbar.h" +#include "llfloaterreg.h" static const S32 RESIZE_BAR_THICKNESS = 3; @@ -145,7 +146,7 @@ std::string appendTime() return timeStr; } -void LLNearbyChat::addMessage(const LLChat& chat) +void LLNearbyChat::addMessage(const LLChat& chat,bool archive) { if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { @@ -207,6 +208,13 @@ void LLNearbyChat::addMessage(const LLChat& chat) mChatHistory->appendMessage(chat,use_plain_text_chat_history); } } + + if(archive) + { + mMessageArchive.push_back(chat); + if(mMessageArchive.size()>200) + mMessageArchive.erase(mMessageArchive.begin()); + } } void LLNearbyChat::onNearbySpeakers() @@ -256,3 +264,19 @@ void LLNearbyChat::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectScaled(); } + +void LLNearbyChat::updateChatHistoryStyle() +{ + mChatHistory->clear(); + for(std::vector::iterator it = mMessageArchive.begin();it!=mMessageArchive.end();++it) + { + addMessage(*it,false); + } +} +//static +void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) +{ + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); + if(nearby_chat) + nearby_chat->updateChatHistoryStyle(); +} diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index efcaf4263b..1cbc2a3478 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -47,7 +47,7 @@ public: ~LLNearbyChat(); BOOL postBuild (); - void addMessage (const LLChat& message); + void addMessage (const LLChat& message,bool archive = true); void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); @@ -57,6 +57,10 @@ public: virtual void setRect (const LLRect &rect); + virtual void updateChatHistoryStyle(); + + static void processChatHistoryStyleUpdate(const LLSD& newvalue); + private: virtual void applySavedVariables(); @@ -68,6 +72,8 @@ private: private: LLHandle mPopupMenuHandle; LLChatHistory* mChatHistory; + + std::vector mMessageArchive; }; #endif -- cgit v1.2.3 From 62e775288ca50e37edbdb3dc7dc55dbf61a546e3 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 30 Nov 2009 15:38:18 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Changed text for empty nearby list to "No one near" --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 5 +++++ indra/newview/skins/default/xui/en/floater_voice_controls.xml | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index b29e6d0574..0c6d3d2d54 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -145,6 +145,11 @@ void LLCallFloater::refreshPartisipantList() bool do_not_use_context_menu_in_local_chat = LLLocalSpeakerMgr::getInstance() != mSpeakerManager; mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, do_not_use_context_menu_in_local_chat); + + if (!do_not_use_context_menu_in_local_chat) + { + mAvatarList->setNoItemsCommentText(getString("no_one_near")); + } } void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 4a5642e5c6..3c12aed3a0 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -20,6 +20,10 @@ name="title_adhoc"> Conference Call + + No one near + Date: Mon, 30 Nov 2009 16:02:22 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Enabled "Voice Controls" button in P2P voice chat --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_im_control_panel.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 0a5812882d..0a3fd1699f 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -76,7 +76,6 @@ visible="false" width="100" />