summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-06-14 20:00:41 +0300
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-06-14 20:00:41 +0300
commit51a39b5ac6465238178363f3ec3143dae4f73919 (patch)
treee4b7502b0a4b8ccb7c498e0c22f4c295e8315697 /indra
parent569146f27c7350ca2245f1fa7bc4cb9c16a428ea (diff)
CHUI-199 WIP Modified the nearby chat for using floater_im_session.xml; merging LLNearbyChatBar with LLNearbyChat;
clean up code; supressed a double creation of LLNearbyChat
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimconversation.cpp14
-rw-r--r--indra/newview/llimfloater.cpp5
-rw-r--r--indra/newview/llimfloater.h3
-rw-r--r--indra/newview/llnearbychat.cpp4
-rw-r--r--indra/newview/llnearbychathandler.cpp1
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
6 files changed, 10 insertions, 19 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index b45fc63825..3e2b208874 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -35,7 +35,6 @@
#include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container
#include "lllayoutstack.h"
#include "llnearbychat.h"
-#include "llnearbychat.h"
const F32 REFRESH_INTERVAL = 0.2f;
@@ -84,13 +83,6 @@ BOOL LLIMConversation::postBuild()
mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
- // Show the participants list in torn off floaters only.
-// mParticipantListPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel")
-// && !mIsNearbyChat); // *TODO: temporarily disabled for Nearby chat
-// mExpandCollapseBtn->setImageOverlay(
-// getString(mParticipantListPanel->getVisible() ? "collapse_icon" : "expand_icon"));
-// mExpandCollapseBtn->setEnabled(!mIsP2PChat);
-
mTearOffBtn = getChild<LLButton>("tear_off_btn");
mTearOffBtn->setCommitCallback(boost::bind(&LLIMConversation::onTearOffClicked, this));
@@ -144,9 +136,11 @@ void LLIMConversation::buildParticipantList()
void LLIMConversation::onSortMenuItemClicked(const LLSD& userdata)
{
- // TODO: Check this code when when sort order menu will be added. (EM)
- if (true || !mParticipantList)
+ // TODO: Check this code when sort order menu will be added. (EM)
+ if (!mParticipantList)
+ {
return;
+ }
std::string chosen_item = userdata.asString();
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 7c6de01c96..30a9c29ec6 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -489,7 +489,10 @@ BOOL LLIMFloater::tick()
{
// This check is needed until LLFloaterReg::removeInstance() is synchronized with deleting the floater
// via LLMortician::updateClass(), to avoid calling dead instances. See LLFloater::destroy().
- if (isDead()) return false;
+ if (isDead())
+ {
+ return false;
+ }
BOOL parents_retcode = LLIMConversation::tick();
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index d74b13b88d..333340c696 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -70,9 +70,6 @@ public:
static LLIMFloater* getInstance(const LLUUID& session_id);
static void addToHost(const LLUUID& session_id);
- static void* createPanelGroupControl(void* userdata);
- static void* createPanelAdHocControl(void* userdata);
-
// LLFloater overrides
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index cd181ce865..fbaf451412 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -408,8 +408,6 @@ BOOL LLNearbyChat::tick()
// via LLMortician::updateClass(), to avoid calling dead instances. See LLFloater::destroy().
if (isDead()) return false;
- BOOL parents_retcode = LLIMConversation::tick();
-
displaySpeakingIndicator();
updateCallBtnState(LLVoiceClient::getInstance()->getUserPTTState());
@@ -421,7 +419,7 @@ BOOL LLNearbyChat::tick()
setTransparencyType(hasFocus() ? TT_ACTIVE : TT_INACTIVE);
}
- return parents_retcode;
+ return LLIMConversation::tick();
}
std::string LLNearbyChat::getCurrentChat()
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index e91a3fc334..c97e3585e1 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -555,7 +555,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
// Send event on to LLEventStream
sChatWatcher->post(chat);
-
if( nearby_chat->isInVisibleChain()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index df1962f5fe..bf12b08321 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -186,6 +186,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
+ LLFloaterReg::add("chat_bar", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
LLFloaterReg::add("destinations", "floater_destinations.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDestinations>);
@@ -208,7 +209,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>);
LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
- LLFloaterReg::add("chat_bar", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>);
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);
LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);