summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-09-14 18:48:46 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2012-09-14 18:48:46 -0700
commit0f86aa86f1780f70f125254d2108a33fcd9a7514 (patch)
tree3e31eeee14b6bc03401ced16d6c12606ebe38136 /indra/newview
parent399ba09c08d8ccaf9b34daa8b743f837639b2f35 (diff)
parent72f6bebe59f5f900af02a4d234a4091a3e034529 (diff)
merging in latest changes
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llconversationview.cpp3
-rw-r--r--indra/newview/llimconversation.cpp13
-rw-r--r--indra/newview/llimconversation.h3
-rwxr-xr-xindra/newview/llimfloatercontainer.cpp26
-rw-r--r--indra/newview/llimfloatercontainer.h4
-rw-r--r--indra/newview/llnearbychat.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_conversation_log.xml2
7 files changed, 45 insertions, 10 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 208a89cc8d..d5d4fc13da 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -239,7 +239,6 @@ S32 LLConversationViewSession::arrange(S32* width, S32* height)
void LLConversationViewSession::selectItem()
{
- LLFolderViewItem::selectItem();
LLConversationItem* item = dynamic_cast<LLConversationItem*>(mViewModelItem);
LLFloater* session_floater = LLIMConversation::getConversation(item->getUUID());
@@ -255,6 +254,8 @@ void LLConversationViewSession::selectItem()
// Set the focus on the selected floater
session_floater->setFocus(TRUE);
+
+ LLFolderViewItem::selectItem();
}
void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index 216c5bbd70..a2efe63546 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -215,11 +215,21 @@ void LLIMConversation::onFocusReceived()
}
LLTransientDockableFloater::onFocusReceived();
+
+ mHasFocus = mHaveFocus;
+ mHaveFocus = true;
+
+ if (! mHasFocus)
+ {
+ LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance();
+ container->setConvItemSelect(mSessionID);
+ }
}
void LLIMConversation::onFocusLost()
{
setBackgroundOpaque(false);
+ mHaveFocus = false;
LLTransientDockableFloater::onFocusLost();
}
@@ -371,6 +381,9 @@ void LLIMConversation::hideAllStandardButtons()
void LLIMConversation::updateHeaderAndToolbar()
{
+ // prevent start conversation before its container
+ LLIMFloaterContainer::getInstance();
+
bool is_torn_off = !getHost();
if (!is_torn_off)
{
diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h
index 41a76c206e..e09ba79a6a 100644
--- a/indra/newview/llimconversation.h
+++ b/indra/newview/llimconversation.h
@@ -139,6 +139,9 @@ private:
void reshapeChatHistory();
LLTimer* mRefreshTimer; ///< Defines the rate at which refresh() is called.
+
+ bool mHasFocus;
+ bool mHaveFocus;
};
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index e039702683..5aaf176aca 100755
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -183,9 +183,9 @@ void LLIMFloaterContainer::onOpen(const LLSD& key)
}
// virtual
-void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
- LLTabContainer::eInsertionPoint insertion_point)
+void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
+ BOOL select_added_floater,
+ LLTabContainer::eInsertionPoint insertion_point)
{
if(!floaterp) return;
@@ -427,7 +427,10 @@ void LLIMFloaterContainer::setVisible(BOOL visible)
for (;widget_it != mConversationsWidgets.end(); ++widget_it)
{
LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
- widget->setVisibleIfDetached(visible);
+ if (widget)
+ {
+ widget->setVisibleIfDetached(visible);
+ }
}
// Now, do the normal multifloater show/hide
@@ -608,6 +611,16 @@ void LLIMFloaterContainer::repositioningWidgets()
}
}
+void LLIMFloaterContainer::setConvItemSelect(LLUUID& session_id)
+{
+ LLFolderViewItem* widget = mConversationsWidgets[session_id];
+ if (widget && mSelectedSession != session_id)
+ {
+ mSelectedSession = session_id;
+ (widget->getRoot())->setSelection(widget, FALSE, FALSE);
+ }
+}
+
void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
{
bool is_nearby_chat = uuid.isNull();
@@ -675,7 +688,10 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c
if (widget_it != mConversationsWidgets.end())
{
LLFolderViewItem* widget = widget_it->second;
- widget->destroyView();
+ if (widget)
+ {
+ widget->destroyView();
+ }
}
// Suppress the conversation items and widgets from their respective maps
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 324adfcc11..f6048bed37 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -62,7 +62,7 @@ public:
/*virtual*/ void addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
-
+ void setConvItemSelect(LLUUID& session_id);
/*virtual*/ void tabClose();
static LLFloater* getCurrentVoiceFloater();
@@ -114,6 +114,8 @@ private:
bool mInitialized;
+ LLUUID mSelectedSession;
+
// Conversation list implementation
public:
void removeConversationListItem(const LLUUID& uuid, bool change_focus = true);
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index ddd271e23f..a803b35aa8 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -108,7 +108,7 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
LLNearbyChat::LLNearbyChat(const LLSD& llsd)
-: LLIMConversation(LLSD()),
+: LLIMConversation(llsd.asUUID()),
//mOutputMonitor(NULL),
mSpeakerMgr(NULL),
mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
@@ -116,7 +116,7 @@ LLNearbyChat::LLNearbyChat(const LLSD& llsd)
mIsP2PChat = false;
mIsNearbyChat = true;
setIsChrome(TRUE);
- mKey = LLSD();
+ mKey = LLSD(LLUUID());
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
mSessionID = LLUUID();
setName("nearby_chat");
diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
index df78bbccec..12d17e6b37 100644
--- a/indra/newview/skins/default/xui/en/floater_conversation_log.xml
+++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
@@ -15,7 +15,7 @@
width="450">
<string name="logging_calls_disabled">
- Conversations are not being logged. To log conversations in the future, select "Save IM logs in my computer" under Preferences > Privacy.
+ Conversations are not being logged. To log conversations in the future, select "Save IM logs on my computer" under Preferences > Privacy.
</string>
<panel