From 10d2f695c8bf17357438729a1bf1a7f7bd1ee3f2 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 14 Sep 2012 13:59:32 +0300 Subject: CHUI-321 ADDITIONAL FIX (Indicate within the Call Log why there's nothing in it) - Corrected grammatical error --- indra/newview/skins/default/xui/en/floater_conversation_log.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"> - 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. Date: Fri, 14 Sep 2012 14:37:48 +0300 Subject: CHUI-119 (Add Nearby chat to Conversations floater): addit. fix: use LLSD(LLUUID::null) instead LLSD::null as "default" floater's key --- indra/llui/llfloaterreg.cpp | 2 +- indra/llui/llfloaterreg.h | 24 ++++++++++++------------ indra/newview/llnearbychat.cpp | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 9115eb7174..920525448c 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -318,7 +318,7 @@ void LLFloaterReg::showInitialVisibleInstances() BOOL isvis = LLFloater::getControlGroup()->getBOOL(controlname); if (isvis) { - showInstance(name, LLSD()); // keyed floaters shouldn't set save_vis to true + showInstance(name, LLSD(LLUUID())); // keyed floaters shouldn't set save_vis to true } } } diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index a1e1f8a988..7924b2a7b8 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -90,23 +90,23 @@ public: static LLFloater* getLastFloaterCascading(); // Find / get (create) / remove / destroy - static LLFloater* findInstance(const std::string& name, const LLSD& key = LLSD()); - static LLFloater* getInstance(const std::string& name, const LLSD& key = LLSD()); - static LLFloater* removeInstance(const std::string& name, const LLSD& key = LLSD()); - static bool destroyInstance(const std::string& name, const LLSD& key = LLSD()); + static LLFloater* findInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())); + static LLFloater* getInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())); + static LLFloater* removeInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())); + static bool destroyInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())); // Iterators static const_instance_list_t& getFloaterList(const std::string& name); // Visibility Management // return NULL if instance not found or can't create instance (no builder) - static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE); + static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(LLUUID()), BOOL focus = FALSE); // Close a floater (may destroy or set invisible) // return false if can't find instance - static bool hideInstance(const std::string& name, const LLSD& key = LLSD()); + static bool hideInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())); // return true if instance is visible: - static bool toggleInstance(const std::string& name, const LLSD& key = LLSD()); - static bool instanceVisible(const std::string& name, const LLSD& key = LLSD()); + static bool toggleInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())); + static bool instanceVisible(const std::string& name, const LLSD& key = LLSD(LLUUID())); static void showInitialVisibleInstances(); static void hideVisibleInstances(const std::set& exceptions = std::set()); @@ -126,23 +126,23 @@ public: static void registerControlVariables(); // Callback wrappers - static void toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key = LLSD()); + static void toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key = LLSD(LLUUID())); // Typed find / get / show template - static T* findTypedInstance(const std::string& name, const LLSD& key = LLSD()) + static T* findTypedInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())) { return dynamic_cast(findInstance(name, key)); } template - static T* getTypedInstance(const std::string& name, const LLSD& key = LLSD()) + static T* getTypedInstance(const std::string& name, const LLSD& key = LLSD(LLUUID())) { return dynamic_cast(getInstance(name, key)); } template - static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE) + static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(LLUUID()), BOOL focus = FALSE) { return dynamic_cast(showInstance(name, key, focus)); } 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"); -- cgit v1.2.3 From 76827f03d429e3ce80def7a49c2657a1cb1179d4 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 22 Aug 2012 13:25:06 +0300 Subject: CHUI-289 FIXED (Newly added conversation is not selected in conversation list): added the "reverse" selecting - list item is selected when the corresponding floter gets focus. --- indra/newview/llconversationview.cpp | 3 ++- indra/newview/llimconversation.cpp | 10 ++++++++++ indra/newview/llimconversation.h | 3 +++ indra/newview/llimfloatercontainer.cpp | 26 +++++++++++++++++++++----- indra/newview/llimfloatercontainer.h | 4 +++- 5 files changed, 39 insertions(+), 7 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(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..bab588126f 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(); } 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 54a40627fb..81dddfaa70 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(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); -- cgit v1.2.3 From 72f6bebe59f5f900af02a4d234a4091a3e034529 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 14 Sep 2012 16:11:42 +0300 Subject: CHUI-261 Additional fix (Nearby chat controls and log are not visible on next login after tearing off and docking nearby chat in previous session): prevent start LLNearbyChat before start its container --- indra/newview/llimconversation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index bab588126f..a2efe63546 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -381,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) { -- cgit v1.2.3