From 40b8a7a3284daa90d3b0e278e8afb5b80b544d0d Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Wed, 23 Dec 2009 18:26:21 +0200
Subject: Fixed normal bug EXT-3628 ("Connecting to.." popup appears behind
 voice control panel while calling), removed temporary workaround.

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp  |  9 ---------
 indra/newview/llspeakbutton.cpp  |  2 +-
 indra/newview/llvoicechannel.cpp | 11 +++++++++++
 indra/newview/llvoicechannel.h   |  2 +-
 4 files changed, 13 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index c222ced98f..29f37a04b4 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -291,15 +291,6 @@ void LLCallFloater::updateSession()
 		if (show_me) 
 		{
 			setVisible(true);
-			// Workaround(EM): Set current call dialog to front most because
-			// connect/leaving popups should appear on top of VCP.
-			// See bug EXT-3628.
-			LLOutgoingCallDialog* instance =
-				LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY);
-			if(instance && instance->getVisible())
-			{
-				instance->setFrontmost();
-			}
 		}
 	}
 }
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
index 90214a1bd7..8f2c877c7a 100644
--- a/indra/newview/llspeakbutton.cpp
+++ b/indra/newview/llspeakbutton.cpp
@@ -123,7 +123,7 @@ LLSpeakButton::LLSpeakButton(const Params& p)
 	mOutputMonitor->setIsAgentControl(true);
 
 	//*TODO find a better place to do that
-	LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1));
+	LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true);
 }
 
 LLSpeakButton::~LLSpeakButton()
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 69d2458217..993853b9a6 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -446,6 +446,17 @@ void LLVoiceChannel::resume()
 	}
 }
 
+boost::signals2::connection LLVoiceChannel::setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front)
+{
+	if (at_front)
+	{
+		return sCurrentVoiceChannelChangedSignal.connect(cb,  boost::signals2::at_front);
+	}
+	else
+	{
+		return sCurrentVoiceChannelChangedSignal.connect(cb);
+	}
+}
 
 //
 // LLVoiceChannelGroup
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 77801142cb..cb86671305 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -64,7 +64,7 @@ public:
 	typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
 	typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t;
 	static channel_changed_signal_t sCurrentVoiceChannelChangedSignal;
-	static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb) { return sCurrentVoiceChannelChangedSignal.connect(cb); }
+	static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false);
 
 
 	LLVoiceChannel(const LLUUID& session_id, const std::string& session_name);
-- 
cgit v1.2.3