From 49319a90ef1fcca590e077805d5aaa65322a1a6d Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Mon, 4 Mar 2013 19:35:31 -0800 Subject: CHUI-778: Now when delete transcripts is pressed the backup files will be deleted as well. Also if clear logs is pressed then backup logs will be cleared. --- indra/newview/llconversationlog.cpp | 33 +++++++++++++++++++++++++++++++++ indra/newview/llconversationlog.h | 2 ++ indra/newview/lllogchat.cpp | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 4be169e267..dd20ca15ae 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -28,9 +28,11 @@ #include "llagent.h" #include "llavatarnamecache.h" #include "llconversationlog.h" +#include "lldiriterator.h" #include "llnotificationsutil.h" #include "lltrans.h" +#include #include "boost/lexical_cast.hpp" const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days by spec @@ -380,6 +382,36 @@ void LLConversationLog::cache() } } +void LLConversationLog::getListOfBackupLogs(std::vector& list_of_backup_logs) +{ + // get Users log directory + std::string dirname = gDirUtilp->getPerAccountChatLogsDir(); + + // add final OS dependent delimiter + dirname += gDirUtilp->getDirDelimiter(); + + // create search pattern + std::string pattern = "conversation.log.backup*"; + + LLDirIterator iter(dirname, pattern); + std::string filename; + while (iter.next(filename)) + { + list_of_backup_logs.push_back(gDirUtilp->add(dirname, filename)); + } +} + +void LLConversationLog::deleteBackupLogs() +{ + std::vector backup_logs; + getListOfBackupLogs(backup_logs); + + BOOST_FOREACH(const std::string& fullpath, backup_logs) + { + LLFile::remove(fullpath); + } +} + bool LLConversationLog::moveLog(const std::string &originDirectory, const std::string &targetDirectory) { @@ -575,5 +607,6 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD& mConversations.clear(); notifyObservers(); cache(); + deleteBackupLogs(); } } diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 58e698de25..265b1f0ef0 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -138,6 +138,8 @@ public: */ void cache(); bool moveLog(const std::string &originDirectory, const std::string &targetDirectory); + void getListOfBackupLogs(std::vector& list_of_backup_logs); + void deleteBackupLogs(); void onClearLog(); void onClearLogResponse(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 448100c5d6..7f4b925b53 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -453,7 +453,7 @@ void LLLogChat::getListOfTranscriptFiles(std::vector& list_of_trans dirname += gDirUtilp->getDirDelimiter(); // create search pattern - std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION; + std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION + "*"; LLDirIterator iter(dirname, pattern); std::string filename; -- cgit v1.2.3 From 84662ce63bea0d5ff8ff8bed0b12e4162a8514a5 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Tue, 5 Mar 2013 18:54:43 +0200 Subject: CHUI-764 (Group Profile is not opened after selecting 'Show group information' in context menu of 'About Land' dialog) --- indra/newview/skins/default/xui/en/menu_url_group.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_url_group.xml b/indra/newview/skins/default/xui/en/menu_url_group.xml index c5eaf94d22..2cb125ce09 100644 --- a/indra/newview/skins/default/xui/en/menu_url_group.xml +++ b/indra/newview/skins/default/xui/en/menu_url_group.xml @@ -7,7 +7,7 @@ layout="topleft" name="show_group"> + function="Url.ShowProfile" /> -- cgit v1.2.3 From 95cea4aa71b84fb203167084c51892f09520fd48 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 5 Mar 2013 13:20:24 -0800 Subject: CHUI-778: Adjusted deletion of transcripts/logs to be more clean code-wise. --- indra/newview/lllogchat.cpp | 22 ++++++++++++++++++---- indra/newview/lllogchat.h | 2 ++ 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 7f4b925b53..2d7454b636 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -444,7 +444,7 @@ std::string LLLogChat::oldLogFileName(std::string filename) } // static -void LLLogChat::getListOfTranscriptFiles(std::vector& list_of_transcriptions) +void LLLogChat::findTranscriptFiles(std::string pattern, std::vector& list_of_transcriptions) { // get Users log directory std::string dirname = gDirUtilp->getPerAccountChatLogsDir(); @@ -452,9 +452,6 @@ void LLLogChat::getListOfTranscriptFiles(std::vector& list_of_trans // add final OS dependent delimiter dirname += gDirUtilp->getDirDelimiter(); - // create search pattern - std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION + "*"; - LLDirIterator iter(dirname, pattern); std::string filename; while (iter.next(filename)) @@ -490,6 +487,22 @@ void LLLogChat::getListOfTranscriptFiles(std::vector& list_of_trans } } +// static +void LLLogChat::getListOfTranscriptFiles(std::vector& list_of_transcriptions) +{ + // create search pattern + std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION; + findTranscriptFiles(pattern, list_of_transcriptions); +} + +// static +void LLLogChat::getListOfTranscriptBackupFiles(std::vector& list_of_transcriptions) +{ + // create search pattern + std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION + ".backup*"; + findTranscriptFiles(pattern, list_of_transcriptions); +} + //static boost::signals2::connection LLLogChat::setSaveHistorySignal(const save_history_signal_t::slot_type& cb) { @@ -581,6 +594,7 @@ void LLLogChat::deleteTranscripts() { std::vector list_of_transcriptions; getListOfTranscriptFiles(list_of_transcriptions); + getListOfTranscriptBackupFiles(list_of_transcriptions); BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions) { diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index 784786a565..e819f00dd9 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -49,7 +49,9 @@ public: const std::string& from, const LLUUID& from_id, const std::string& line); + static void findTranscriptFiles(std::string pattern, std::vector& list_of_transcriptions); static void getListOfTranscriptFiles(std::vector& list); + static void getListOfTranscriptBackupFiles(std::vector& list_of_transcriptions); static void loadChatHistory(const std::string& file_name, std::list& messages, const LLSD& load_params = LLSD()); -- cgit v1.2.3 From f135503a9ed99f5e9b009a6608a9c4bc21c5e8cf Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 5 Mar 2013 13:41:30 -0800 Subject: CHUI-829 (Allow Conversations floater to display a different chat than the torn off and selected window): Now when selecting a torn off conversation this will not select the conversation line item. --- indra/newview/llfloaterimcontainer.cpp | 4 ++++ indra/newview/llfloaterimsessiontab.cpp | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 46ec1d510d..429ea09f56 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1392,6 +1392,10 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool // Switch to the conversation floater that is being selected selectFloater(session_floater); } + else + { + showStub(true); + } } // Set the focus on the selected floater diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index d3fcfbbc56..de1b398131 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -324,13 +324,6 @@ void LLFloaterIMSessionTab::onFocusReceived() } LLTransientDockableFloater::onFocusReceived(); - - LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance("im_container"); - if (container) - { - container->selectConversationPair(mSessionID, true); - container->showStub(! getHost()); - } } void LLFloaterIMSessionTab::onFocusLost() -- cgit v1.2.3 From 4a50271c19f584916c84abc117636f45fc050e61 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 6 Mar 2013 19:00:28 +0200 Subject: CHUI-821 Clean up code --- indra/newview/llfloaterimcontainer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 413707baae..29ff037d59 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -758,11 +758,16 @@ void LLFloaterIMContainer::assignResizeLimits() // between the panels are merged into one S32 number_of_visible_borders = llmin((is_conv_pane_expanded? 2 : 0) + (is_msg_pane_expanded? 2 : 0), 3); S32 summary_width_of_visible_borders = number_of_visible_borders * LLPANEL_BORDER_WIDTH; - S32 conv_pane_current_width = is_msg_pane_expanded + S32 conv_pane_target_width = is_conv_pane_expanded? + (is_msg_pane_expanded? + mConversationsPane->getRect().getWidth() + : mConversationsPane->getExpandedMinDim()) + : mConversationsPane->getMinDim(); + S32 conv_pane_target_width = is_msg_pane_expanded ? (is_conv_pane_expanded? mConversationsPane->getRect().getWidth() : mConversationsPane->getMinDim()) : (is_conv_pane_expanded? mConversationsPane->getExpandedMinDim() : mConversationsPane->getMinDim()); S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0; - S32 new_min_width = conv_pane_current_width + msg_pane_min_width + summary_width_of_visible_borders; + S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders; if (is_conv_pane_expanded) { -- cgit v1.2.3 From 82c92ce5a97d6a83505c775348aef692e18e42ed Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 6 Mar 2013 19:02:19 +0200 Subject: CHUI-821 Clean up code --- indra/newview/llfloaterimcontainer.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 29ff037d59..a0c386717b 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -763,9 +763,6 @@ void LLFloaterIMContainer::assignResizeLimits() mConversationsPane->getRect().getWidth() : mConversationsPane->getExpandedMinDim()) : mConversationsPane->getMinDim(); - S32 conv_pane_target_width = is_msg_pane_expanded - ? (is_conv_pane_expanded? mConversationsPane->getRect().getWidth() : mConversationsPane->getMinDim()) - : (is_conv_pane_expanded? mConversationsPane->getExpandedMinDim() : mConversationsPane->getMinDim()); S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0; S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders; -- cgit v1.2.3 From d73ca40667527a1fdaf29ac3629ec7ce8a7e0f40 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 6 Mar 2013 17:43:10 -0800 Subject: CHUI-834 (Conversation selection in conversation list does not update when redocking torn off conversations): Now when click to dock a torn off floater, the correct conversation line item will be selected. --- indra/newview/llfloaterimsessiontab.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index de1b398131..164625fc95 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -798,6 +798,12 @@ void LLFloaterIMSessionTab::onTearOffClicked() { forceReshape(); } + //Upon re-docking the torn off floater, select the corresponding conversation line item + else + { + LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance("im_container"); + container->selectConversation(mSessionID); + } refreshConversation(); updateGearBtn(); } -- cgit v1.2.3 From 014376b49a1e6bf41fa8b0f1b36c0c02fca3096e Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 7 Mar 2013 16:26:37 -0800 Subject: CHUI-832 (Different conversation than is selected shown in message panel after tearing off conversation): Now when a conversation is torn off an adjacent conversation is selected (but not focused). --- indra/newview/llfloaterimcontainer.cpp | 21 ++++++++++++++------- indra/newview/llfloaterimcontainer.h | 3 ++- indra/newview/llfloaterimsessiontab.cpp | 4 +++- 3 files changed, 19 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 5a37b5b57b..d67f2be658 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1912,7 +1912,19 @@ BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) return TRUE; } -bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next) +bool LLFloaterIMContainer::selectAdjacentConversation(bool focus_selected) +{ + bool selectedAdjacentConversation = selectNextorPreviousConversation(true, focus_selected); + + if(!selectedAdjacentConversation) + { + selectedAdjacentConversation = selectNextorPreviousConversation(false, focus_selected); + } + + return selectedAdjacentConversation; +} + +bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bool focus_selected) { if (mConversationsWidgets.size() > 1) { @@ -1933,12 +1945,7 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next) LLConversationItem* vmi = dynamic_cast(new_selection->getViewModelItem()); if (vmi) { - selectConversationPair(vmi->getUUID(), true); - LLFloater* floaterp = get_ptr_in_map(mSessions, getSelectedSession()); - if(floaterp && !floaterp->isTornOff()) - { - setFocus(TRUE); - } + selectConversationPair(vmi->getUUID(), true, focus_selected); return true; } } diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index c84d4978ec..1e760a8710 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -72,7 +72,8 @@ public: void selectNextConversationByID(const LLUUID& session_id); BOOL selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true); void clearAllFlashStates(); - bool selectNextorPreviousConversation(bool select_next); + bool selectAdjacentConversation(bool focus_selected); + bool selectNextorPreviousConversation(bool select_next, bool focus_selected = true); void expandConversation(); /*virtual*/ void tabClose(); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 164625fc95..faeb860712 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -794,14 +794,16 @@ void LLFloaterIMSessionTab::onTearOffClicked() mSaveRect = isTornOff(); initRectControl(); LLFloater::onClickTearOff(this); + LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance("im_container"); + if (isTornOff()) { + container->selectAdjacentConversation(false); forceReshape(); } //Upon re-docking the torn off floater, select the corresponding conversation line item else { - LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance("im_container"); container->selectConversation(mSessionID); } refreshConversation(); -- cgit v1.2.3 From 228d868cf6b3436f9cace3db5bd304e7ea639609 Mon Sep 17 00:00:00 2001 From: Cho Date: Fri, 8 Mar 2013 02:02:45 +0000 Subject: CHUI-772 FIX User sees no notification of conversation activity not visible in long scrolling conversation list Added call to mConversationsRoot->arrange() in LLFloaterIMContainer::isScrolledOutOfSight() --- indra/newview/llconversationview.cpp | 15 +++++++++------ indra/newview/llfloaterimcontainer.cpp | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 74b348cd81..837389aed5 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -104,6 +104,15 @@ LLConversationViewSession::~LLConversationViewSession() void LLConversationViewSession::setFlashState(bool flash_state) { + if (flash_state && !mFlashStateOn) + { + // flash chat toolbar button if scrolled out of sight (because flashing will not be visible) + if (mContainer->isScrolledOutOfSight(this)) + { + gToolBarView->flashCommand(LLCommandId("chat"), true); + } + } + mFlashStateOn = flash_state; mFlashStarted = false; mFlashTimer->stopFlashing(); @@ -115,12 +124,6 @@ void LLConversationViewSession::startFlashing() { mFlashStarted = true; mFlashTimer->startFlashing(); - - // flash chat toolbar button if scrolled out of sight (because flashing will not be visible) - if (mContainer->isScrolledOutOfSight(this)) - { - gToolBarView->flashCommand(LLCommandId("chat"), true); - } } } diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 74490b695c..e2b9723537 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1881,6 +1881,9 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve { llassert(conversation_item_widget != NULL); + // make sure the widget is actually in the right spot first + mConversationsRoot->arrange(NULL, NULL); + // check whether the widget is in the visible portion of the scroll container LLRect widget_rect; conversation_item_widget->localRectToOtherView(conversation_item_widget->getLocalRect(), &widget_rect, mConversationsRoot); -- cgit v1.2.3 From 24e650b4039d3b3515109fa9e271abfa2a2ebd6a Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 8 Mar 2013 18:34:40 -0800 Subject: CHUI-835 (ctrl-h does not select nearby chat conversation in list): Modified setVisibleAndFrontMost() to now take a arguement for the key that was pressed (if one was pressed). This allows the floater to select the converation line item when becoming visible/frontmost. --- indra/newview/llfloaterimnearbychat.cpp | 11 +++++++++++ indra/newview/llfloaterimnearbychat.h | 1 + 2 files changed, 12 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index dfaf4bbdd6..cfee5001a6 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -257,6 +257,17 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible) } } + +void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +{ + LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key); + + if(!isTornOff() && matchesKey(key)) + { + LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, false); + } +} + // virtual void LLFloaterIMNearbyChat::onTearOffClicked() { diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h index 4ad37eb0c7..05b48cccb0 100644 --- a/indra/newview/llfloaterimnearbychat.h +++ b/indra/newview/llfloaterimnearbychat.h @@ -54,6 +54,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); /*virtual*/ void closeHostedFloater(); void loadHistory(); -- cgit v1.2.3 From 7f5dee6161c6eed96275722cbb52a3fb1fcb3eb7 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 7 Mar 2013 17:31:44 +0200 Subject: CHUI-738 FIXED Your own nametag disappears - mysteriously: reset display time when nametag is changes --- indra/newview/llvoavatar.cpp | 81 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 40 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 157be08f45..c74d9f1292 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2994,43 +2994,43 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) return; } - BOOL new_name = FALSE; - if (visible_chat != mVisibleChat) + BOOL new_name = FALSE; + if (visible_chat != mVisibleChat) + { + mVisibleChat = visible_chat; + new_name = TRUE; + } + + if (sRenderGroupTitles != mRenderGroupTitles) + { + mRenderGroupTitles = sRenderGroupTitles; + new_name = TRUE; + } + + // First Calculate Alpha + // If alpha > 0, create mNameText if necessary, otherwise delete it + F32 alpha = 0.f; + if (mAppAngle > 5.f) + { + const F32 START_FADE_TIME = NAME_SHOW_TIME - FADE_DURATION; + if (!visible_chat && sRenderName == RENDER_NAME_FADE && time_visible > START_FADE_TIME) { - mVisibleChat = visible_chat; - new_name = TRUE; + alpha = 1.f - (time_visible - START_FADE_TIME) / FADE_DURATION; } - - if (sRenderGroupTitles != mRenderGroupTitles) + else { - mRenderGroupTitles = sRenderGroupTitles; - new_name = TRUE; + // ...not fading, full alpha + alpha = 1.f; } - - // First Calculate Alpha - // If alpha > 0, create mNameText if necessary, otherwise delete it - F32 alpha = 0.f; - if (mAppAngle > 5.f) - { - const F32 START_FADE_TIME = NAME_SHOW_TIME - FADE_DURATION; - if (!visible_chat && sRenderName == RENDER_NAME_FADE && time_visible > START_FADE_TIME) - { - alpha = 1.f - (time_visible - START_FADE_TIME) / FADE_DURATION; - } - else - { - // ...not fading, full alpha - alpha = 1.f; - } - } - else if (mAppAngle > 2.f) - { - // far away is faded out also - alpha = (mAppAngle-2.f)/3.f; - } + } + else if (mAppAngle > 2.f) + { + // far away is faded out also + alpha = (mAppAngle-2.f)/3.f; + } if (alpha <= 0.f) - { + { if (mNameText) { mNameText->markDead(); @@ -3040,19 +3040,19 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) return; } - if (!mNameText) - { + if (!mNameText) + { mNameText = static_cast( LLHUDObject::addHUDObject( LLHUDObject::LL_HUD_NAME_TAG) ); //mNameText->setMass(10.f); - mNameText->setSourceObject(this); + mNameText->setSourceObject(this); mNameText->setVertAlignment(LLHUDNameTag::ALIGN_VERT_TOP); - mNameText->setVisibleOffScreen(TRUE); - mNameText->setMaxLines(11); - mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); - sNumVisibleChatBubbles++; - new_name = TRUE; - } + mNameText->setVisibleOffScreen(TRUE); + mNameText->setMaxLines(11); + mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); + sNumVisibleChatBubbles++; + new_name = TRUE; + } idleUpdateNameTagPosition(root_pos_last); idleUpdateNameTagText(new_name); @@ -3303,6 +3303,7 @@ void LLVOAvatar::clearNameTag() mNameText->setLabel(""); mNameText->setString( "" ); } + mTimeVisible.reset(); } //static -- cgit v1.2.3 From f51a39574722ffaea5912a084b02f8f22972e81c Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 7 Mar 2013 15:59:51 +0200 Subject: CHUI-821 ADD FIX Conversation size regression when logging out with conversation list minimized to icons: deleted redundant savings of the convers. panel width; added a manually reshape of the conv. panel after change it's collapse state; function with uninformative name "updateState" was renamed to "reshapeFloaterAndSetResizeLimits" --- indra/newview/llfloaterimcontainer.cpp | 49 ++++++++++++++++------------------ indra/newview/llfloaterimcontainer.h | 4 +-- 2 files changed, 25 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index cdffdcf806..7437dd8cda 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -226,10 +226,11 @@ BOOL LLFloaterIMContainer::postBuild() childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this)); collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed")); - collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed")); + collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed"), false); LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false)); mMicroChangedSignal = LLVoiceClient::getInstance()->MicroChangedCallback(boost::bind(&LLFloaterIMContainer::updateSpeakBtnState, this)); - if (! mMessagesPane->isCollapsed()) + + if (! mMessagesPane->isCollapsed() && ! mConversationsPane->isCollapsed()) { S32 conversations_panel_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth"); LLRect conversations_panel_rect = mConversationsPane->getRect(); @@ -668,7 +669,7 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse) // Make sure layout is updated before resizing conversation pane. mConversationsStack->updateLayout(); - updateState(collapse, gSavedPerAccountSettings.getS32("ConversationsMessagePaneWidth")); + reshapeFloaterAndSetResizeLimits(collapse, gSavedPerAccountSettings.getS32("ConversationsMessagePaneWidth")); if (!collapse) { @@ -677,7 +678,7 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse) } } -void LLFloaterIMContainer::collapseConversationsPane(bool collapse) +void LLFloaterIMContainer::collapseConversationsPane(bool collapse, bool save_is_allowed /*=true*/) { if (mConversationsPane->isCollapsed() == collapse) { @@ -691,7 +692,7 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse) // Save current width of Conversation panel before collapsing/expanding right pane. S32 conv_pane_width = mConversationsPane->getRect().getWidth(); - if (collapse) + if (collapse && save_is_allowed) { // Save the conversations pane width before collapsing it. gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", conv_pane_width); @@ -701,10 +702,18 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse) } mConversationsStack->collapsePanel(mConversationsPane, collapse); + if (!collapse) + { + // Make sure layout is updated before resizing conversation pane. + mConversationsStack->updateLayout(); + // Restore conversation's pane previous width. + mConversationsPane->setTargetDim(gSavedPerAccountSettings.getS32("ConversationsListPaneWidth")); + } - S32 delta_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim(); + S32 delta_width = + gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim(); - updateState(collapse, delta_width); + reshapeFloaterAndSetResizeLimits(collapse, delta_width); for (conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); widget_it != mConversationsWidgets.end(); ++widget_it) @@ -724,21 +733,20 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse) } } -void LLFloaterIMContainer::updateState(bool collapse, S32 delta_width) +void LLFloaterIMContainer::reshapeFloaterAndSetResizeLimits(bool collapse, S32 delta_width) { LLRect floater_rect = getRect(); floater_rect.mRight += ((collapse ? -1 : 1) * delta_width); // Set by_user = true so that reshaped rect is saved in user_settings. setShape(floater_rect, true); - updateResizeLimits(); - bool is_left_pane_expanded = !mConversationsPane->isCollapsed(); - bool is_right_pane_expanded = !mMessagesPane->isCollapsed(); + bool at_least_one_panel_is_expanded = + ! (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()); - setCanResize(is_left_pane_expanded || is_right_pane_expanded); - setCanMinimize(is_left_pane_expanded || is_right_pane_expanded); + setCanResize(at_least_one_panel_is_expanded); + setCanMinimize(at_least_one_panel_is_expanded); assignResizeLimits(); @@ -767,15 +775,9 @@ void LLFloaterIMContainer::assignResizeLimits() S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0; S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders; - if (is_conv_pane_expanded) - { - // Save the conversations pane width. - gSavedPerAccountSettings.setS32( - "ConversationsListPaneWidth", - mConversationsPane->getRect().getWidth()); - } - setResizeLimits(new_min_width, getMinHeight()); + + mConversationsStack->updateLayout(); } void LLFloaterIMContainer::onAddButtonClicked() @@ -1972,11 +1974,6 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) // Most of the time the user will never see this state. setMinimized(FALSE); - // Save the conversations pane width. - gSavedPerAccountSettings.setS32( - "ConversationsListPaneWidth", - mConversationsPane->getRect().getWidth()); - LLFloater::closeFloater(app_quitting); } diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 1e760a8710..5139651d8d 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -129,9 +129,9 @@ private: void processParticipantsStyleUpdate(); void onSpeakButtonClicked(); - void collapseConversationsPane(bool collapse); + void collapseConversationsPane(bool collapse, bool save_is_allowed=true); - void updateState(bool collapse, S32 delta_width); + void reshapeFloaterAndSetResizeLimits(bool collapse, S32 delta_width); void onAddButtonClicked(); void onAvatarPicked(const uuid_vec_t& ids); -- cgit v1.2.3 From 11199f2bef65f67f3ddd798944cb4ad62affa8ed Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 Mar 2013 17:04:06 +0200 Subject: CHUI-824 FIXED Open Message panel when session is activated. --- indra/newview/llfloaterimcontainer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a0c386717b..74490b695c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -114,6 +114,7 @@ void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::str void LLFloaterIMContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { selectConversationPair(session_id, true); + collapseMessagesPane(false); } void LLFloaterIMContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) -- cgit v1.2.3 From d29bec7f4d390b932705ac9342f01f0b2412dd97 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 8 Mar 2013 19:04:01 -0800 Subject: CHUI-793 : WIP : Limit the number of participants we load on groups when we load from the local group data --- indra/newview/llspeakers.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 05df7261e1..301b489c34 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -409,12 +409,10 @@ void LLSpeakerMgr::update(BOOL resort_ok) // update status of all current speakers BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); - for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();) + for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++) { LLUUID speaker_id = speaker_it->first; LLSpeaker* speakerp = speaker_it->second; - - speaker_map_t::iterator cur_speaker_it = speaker_it++; if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id)) { @@ -551,18 +549,25 @@ void LLSpeakerMgr::updateSpeakerList() { // Add group members when we get the complete list (note: can take a while before we get that list) LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin(); + S32 updated = 0; while (member_it != gdatap->mMembers.end()) { LLGroupMemberData* member = member_it->second; - // Add only the members who are online - if (member->getOnlineStatus() == "Online") + LLUUID id = member_it->first; + // Add only members who are online and not already in the list + if ((member->getOnlineStatus() == "Online") && (mSpeakers.find(id) == mSpeakers.end())) { - LLPointer speakerp = setSpeaker(member_it->first, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + LLPointer speakerp = setSpeaker(id, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); speakerp->mIsModerator = ((member->getAgentPowers() & GP_SESSION_MODERATOR) == GP_SESSION_MODERATOR); + updated++; } ++member_it; + // Limit the number of "manually updated" participants to a reasonable number to avoid severe fps drop + // *TODO : solve the perf issue of having several hundreds of widgets in the conversation list + if (updated >= 100) + break; } - mSpeakerListUpdated = true; + mSpeakerListUpdated = true; } } else if (mSpeakers.size() == 0) -- cgit v1.2.3 From 40f61ae60091909bae8229b7d0496154a87fefbf Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Mon, 11 Mar 2013 12:32:34 +0200 Subject: CHUI-840 (Right clicking on unselected group conversation can have unpredictable results for menu options) --- indra/newview/llconversationview.cpp | 36 +++++++++++++++++++++++++++--------- indra/newview/llconversationview.h | 2 ++ 2 files changed, 29 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 74b348cd81..85c9a11b43 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -254,20 +254,38 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) //This node (conversation) was selected and a child (participant) was not if(result && getRoot()) { - if(getRoot()->getCurSelectedItem() == this) - { - LLConversationItem* item = dynamic_cast(getViewModelItem()); - LLUUID session_id = item? item->getUUID() : LLUUID(); + selectConversationItem(); + } - LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance("im_container"); - im_container->flashConversationItemWidget(session_id,false); - im_container->selectConversationPair(session_id, false); - im_container->collapseMessagesPane(false); - } + return result; +} + +BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask); + + if(result) + { + selectConversationItem(); } + return result; } +void LLConversationViewSession::selectConversationItem() +{ + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* item = dynamic_cast(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance("im_container"); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectConversationPair(session_id, false); + im_container->collapseMessagesPane(false); + } +} + // virtual S32 LLConversationViewSession::arrange(S32* width, S32* height) { diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 76d3d079ea..3eb2e63792 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -68,6 +68,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ S32 arrange(S32* width, S32* height); @@ -90,6 +91,7 @@ private: void onCurrentVoiceSessionChanged(const LLUUID& session_id); void startFlashing(); + void selectConversationItem(); LLPanel* mItemPanel; LLPanel* mCallIconLayoutPanel; -- cgit v1.2.3 From d2a689be4aee7487a18183d6208c52dc15c39051 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 11 Mar 2013 15:30:49 +0200 Subject: CHUI-815 FIXED Display whispered text in italics and shouted text as bold --- indra/newview/llchathistory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c4f63d9256..0152571e20 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -820,6 +820,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL body_message_params.font.style = "ITALIC"; } + if(chat.mChatType == CHAT_TYPE_WHISPER) + { + body_message_params.font.style = "ITALIC"; + } + else if(chat.mChatType == CHAT_TYPE_SHOUT) + { + body_message_params.font.style = "BOLD"; + } + bool message_from_log = chat.mChatStyle == CHAT_STYLE_HISTORY; // We graying out chat history by graying out messages that contains full date in a time string if (message_from_log) -- cgit v1.2.3 From 9fb00841669ed75479b57cccaa124747d09bbf97 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 11 Mar 2013 14:52:15 +0200 Subject: CHUI-836 FIXED [CHUIBUG]Opening chat history from the conversation log sometimes crashes the viewer --- indra/newview/llconversationloglist.cpp | 69 ++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 96b225b841..b202cfc9d3 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -198,6 +198,8 @@ void LLConversationLogList::refresh() void LLConversationLogList::rebuildList() { + const LLConversation * selected_conversationp = getSelectedConversation(); + clear(); bool have_filter = !mNameFilter.empty(); @@ -214,7 +216,12 @@ void LLConversationLogList::rebuildList() addNewItem(&*iter); } - + + // try to restore selection of item + if (NULL != selected_conversationp) + { + selectItemByUUID(selected_conversationp->getSessionID()); + } bool logging_enabled = log_instance.getIsLoggingEnabled(); bool log_empty = log_instance.isLogEmpty(); @@ -238,8 +245,16 @@ void LLConversationLogList::rebuildList() void LLConversationLogList::onCustomAction(const LLSD& userdata) { + const LLConversation * selected_conversationp = getSelectedConversation(); + + if (NULL == selected_conversationp) + { + return; + } + const std::string command_name = userdata.asString(); - const LLUUID& selected_id = getSelectedConversation()->getParticipantID(); + const LLUUID& selected_conversation_participant_id = selected_conversationp->getParticipantID(); + const LLUUID& selected_conversation_session_id = selected_conversationp->getSessionID(); LLIMModel::LLIMSession::SType stype = getSelectedSessionType(); if ("im" == command_name) @@ -247,11 +262,11 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) switch (stype) { case LLIMModel::LLIMSession::P2P_SESSION: - LLAvatarActions::startIM(selected_id); + LLAvatarActions::startIM(selected_conversation_participant_id); break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::startIM(getSelectedConversation()->getSessionID()); + LLGroupActions::startIM(selected_conversation_session_id); break; default: @@ -263,11 +278,11 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) switch (stype) { case LLIMModel::LLIMSession::P2P_SESSION: - LLAvatarActions::startCall(selected_id); + LLAvatarActions::startCall(selected_conversation_participant_id); break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::startCall(getSelectedConversation()->getSessionID()); + LLGroupActions::startCall(selected_conversation_session_id); break; default: @@ -279,11 +294,11 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) switch (stype) { case LLIMModel::LLIMSession::P2P_SESSION: - LLAvatarActions::showProfile(selected_id); + LLAvatarActions::showProfile(selected_conversation_participant_id); break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::show(getSelectedConversation()->getSessionID()); + LLGroupActions::show(selected_conversation_session_id); break; default: @@ -292,52 +307,53 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) } else if ("chat_history" == command_name) { - const LLUUID& session_id = getSelectedConversation()->getSessionID(); - LLFloaterReg::showInstance("preview_conversation", session_id, true); + LLFloaterReg::showInstance("preview_conversation", selected_conversation_session_id, true); } else if ("offer_teleport" == command_name) { - LLAvatarActions::offerTeleport(selected_id); + LLAvatarActions::offerTeleport(selected_conversation_participant_id); } else if("add_friend" == command_name) { - if (!LLAvatarActions::isFriend(selected_id)) + if (!LLAvatarActions::isFriend(selected_conversation_participant_id)) { - LLAvatarActions::requestFriendshipDialog(selected_id); + LLAvatarActions::requestFriendshipDialog(selected_conversation_participant_id); } } else if("remove_friend" == command_name) { - if (LLAvatarActions::isFriend(selected_id)) + if (LLAvatarActions::isFriend(selected_conversation_participant_id)) { - LLAvatarActions::removeFriendDialog(selected_id); + LLAvatarActions::removeFriendDialog(selected_conversation_participant_id); } } else if ("invite_to_group" == command_name) { - LLAvatarActions::inviteToGroup(selected_id); + LLAvatarActions::inviteToGroup(selected_conversation_participant_id); } else if ("show_on_map" == command_name) { - LLAvatarActions::showOnMap(selected_id); + LLAvatarActions::showOnMap(selected_conversation_participant_id); } else if ("share" == command_name) { - LLAvatarActions::share(selected_id); + LLAvatarActions::share(selected_conversation_participant_id); } else if ("pay" == command_name) { - LLAvatarActions::pay(selected_id); + LLAvatarActions::pay(selected_conversation_participant_id); } else if ("block" == command_name) { - LLAvatarActions::toggleBlock(selected_id); + LLAvatarActions::toggleBlock(selected_conversation_participant_id); } } bool LLConversationLogList::isActionEnabled(const LLSD& userdata) { - if (numSelected() != 1) + const LLConversation * selected_conversationp = getSelectedConversation(); + + if (NULL == selected_conversationp || numSelected() > 1) { return false; } @@ -345,7 +361,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) const std::string command_name = userdata.asString(); LLIMModel::LLIMSession::SType stype = getSelectedSessionType(); - const LLUUID& selected_id = getSelectedConversation()->getParticipantID(); + const LLUUID& selected_id = selected_conversationp->getParticipantID(); bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype; bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype; @@ -384,9 +400,16 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) bool LLConversationLogList::isActionChecked(const LLSD& userdata) { + const LLConversation * selected_conversationp = getSelectedConversation(); + + if (NULL == selected_conversationp) + { + return false; + } + const std::string command_name = userdata.asString(); - const LLUUID& selected_id = getSelectedConversation()->getParticipantID(); + const LLUUID& selected_id = selected_conversationp->getParticipantID(); bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == getSelectedSessionType(); if ("is_blocked" == command_name) -- cgit v1.2.3 From 6b067125a0d338c3acc6fd1c786620e474a80aa8 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Mon, 11 Mar 2013 14:49:24 -0700 Subject: CHUI-778: Adjusted text in prompts for deleting chat log and chat transcripts (per UX). --- indra/newview/llfloaterpreference.cpp | 5 ++++- indra/newview/skins/default/xui/en/notifications.xml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 3f8c23ba83..b308a820b2 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1667,7 +1667,10 @@ void LLFloaterPreference::onClickActionChange() void LLFloaterPreference::onDeleteTranscripts() { - LLNotificationsUtil::add("PreferenceChatDeleteTranscripts", LLSD(), LLSD(), boost::bind(&LLFloaterPreference::onDeleteTranscriptsResponse, this, _1, _2)); + LLSD args; + args["FOLDER"] = gDirUtilp->getUserName(); + + LLNotificationsUtil::add("PreferenceChatDeleteTranscripts", args, LLSD(), boost::bind(&LLFloaterPreference::onDeleteTranscriptsResponse, this, _1, _2)); } void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification, const LLSD& response) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 88c02fc84e..c681e39002 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9998,7 +9998,7 @@ Cannot create large prims that intersect other players. Please re-try when othe icon="alertmodal.tga" name="PreferenceChatClearLog" type="alertmodal"> - This will delete the log of previous conversations. Proceed? + This will delete the logs of previous conversations, and any backups of that file. confirm - This will delete transcripts for all previous conversations. The list of conversations will not be affected. If you run scripts on your chat transcript files, you may want to proceed with caution. Proceed? + This will delete the transcripts for all previous conversations. The list of past conversations will not be affected. All files with the suffixes .txt and txt.backup in the folder [FOLDER] will be deleted. confirm Date: Mon, 11 Mar 2013 21:32:40 -0700 Subject: CHUI-793 : Fixed! Introduced ChatLoadGroupTimeout and ChatLoadGroupMaxMembers to mitigate slow group loading. --- indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++++ indra/newview/llspeakers.cpp | 11 ++++++++--- indra/newview/llspeakers.h | 1 + 3 files changed, 31 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 79376f7467..e216c7865d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1584,6 +1584,28 @@ Value 0 + ChatLoadGroupMaxMembers + + Comment + Max number of active members we'll show up for an unresponsive group + Persist + 1 + Type + S32 + Value + 100 + + ChatLoadGroupTimeout + + Comment + Time we give the server to send group participants before we hit the server for group info (seconds) + Persist + 1 + Type + F32 + Value + 10.0 + ChatOnlineNotification Comment diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 301b489c34..8783d99b11 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -38,6 +38,8 @@ #include "llvoavatar.h" #include "llworld.h" +extern LLControlGroup gSavedSettings; + const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f); @@ -311,6 +313,7 @@ LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : mModerateModeHandledFirstTime(false), mSpeakerListUpdated(false) { + mGetListTime.reset(); static LLUICachedControl remove_delay ("SpeakerParticipantRemoveDelay", 10.0); mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLSpeakerMgr::removeSpeaker, this, _1), remove_delay); @@ -537,18 +540,20 @@ void LLSpeakerMgr::updateSpeakerList() LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); if (session->isGroupSessionType() && (mSpeakers.size() <= 1)) { + const F32 load_group_timeout = gSavedSettings.getF32("ChatLoadGroupTimeout"); // For groups, we need to hit the group manager. // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); - if (!gdatap) + if (!gdatap && (mGetListTime.getElapsedTimeF32() >= load_group_timeout)) { // Request the data the first time around LLGroupMgr::getInstance()->sendCapGroupMembersRequest(session_id); } - else if (gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) + else if (gdatap && gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) { // Add group members when we get the complete list (note: can take a while before we get that list) LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin(); + const S32 load_group_max_members = gSavedSettings.getS32("ChatLoadGroupMaxMembers"); S32 updated = 0; while (member_it != gdatap->mMembers.end()) { @@ -564,7 +569,7 @@ void LLSpeakerMgr::updateSpeakerList() ++member_it; // Limit the number of "manually updated" participants to a reasonable number to avoid severe fps drop // *TODO : solve the perf issue of having several hundreds of widgets in the conversation list - if (updated >= 100) + if (updated >= load_group_max_members) break; } mSpeakerListUpdated = true; diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 5f5095097e..e953dd0e1a 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -264,6 +264,7 @@ protected: typedef std::map > speaker_map_t; speaker_map_t mSpeakers; bool mSpeakerListUpdated; + LLTimer mGetListTime; speaker_list_t mSpeakersSorted; LLFrameTimer mSpeechTimer; -- cgit v1.2.3 From d81226f1707a93b6be52264fc00cae9c60057cc5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 12 Mar 2013 15:38:10 +0200 Subject: CHUI-809 FIXED Changes in menu items to make them consistent. Do not start IM if selected person is self. --- indra/newview/llavataractions.cpp | 2 +- indra/newview/llchathistory.cpp | 13 ++++++++++++- .../newview/skins/default/xui/en/menu_object_icon.xml | 18 ++++++++++++++++++ indra/newview/skins/default/xui/en/menu_url_agent.xml | 17 ++++++++++++----- .../newview/skins/default/xui/en/menu_url_objectim.xml | 2 +- 5 files changed, 44 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ce063a9887..b513a52ff7 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -193,7 +193,7 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id, // static void LLAvatarActions::startIM(const LLUUID& id) { - if (id.isNull()) + if (id.isNull() || gAgent.getID() == id) return; LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2)); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0152571e20..53926c1fef 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -58,7 +58,7 @@ #include "llworld.h" #include "lluiconstants.h" #include "llstring.h" - +#include "llurlaction.h" #include "llviewercontrol.h" static LLDefaultChildRegistry::Register r("chat_history"); @@ -156,6 +156,17 @@ public: LLFloaterSidePanelContainer::showPanel("people", "panel_people", LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId())); } + else if (level == "map") + { + std::string url = "secondlife://" + mObjectData["slurl"].asString(); + LLUrlAction::showLocationOnMap(url); + } + else if (level == "teleport") + { + std::string url = "secondlife://" + mObjectData["slurl"].asString(); + LLUrlAction::teleportToLocation(url); + } + } void onAvatarIconContextMenuItemClicked(const LLSD& userdata) diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index 0c8a2af002..2d4f1792c2 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -24,4 +24,22 @@ function="ObjectIcon.Action" parameter="block" /> + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml index 88ae441bd3..7cd56f257a 100644 --- a/indra/newview/skins/default/xui/en/menu_url_agent.xml +++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml @@ -1,20 +1,27 @@ + name="Url Popup"> + + + + name="add_friend"> + function="Url.AddFriend" /> diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml index 35c2269b0d..87ab58e622 100644 --- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml @@ -3,7 +3,7 @@ layout="topleft" name="Url Popup"> Date: Tue, 12 Mar 2013 19:38:01 -0700 Subject: CHUI-845 : Avoid some xml param parsing error that seems to be linked with crashers --- indra/newview/llfloaterimsessiontab.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index faeb860712..85b25afe43 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -253,6 +253,7 @@ BOOL LLFloaterIMSessionTab::postBuild() p.root = NULL; p.use_ellipses = true; p.options_menu = "menu_conversation.xml"; + p.name = "root"; mConversationsRoot = LLUICtrlFactory::create(p); mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); // Attach that root to the scroller -- cgit v1.2.3 From aa8809ff3b2f29ad2140328be955e338725d613b Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Tue, 12 Mar 2013 17:20:15 +0200 Subject: CHUI-831 Minimized conversation floater is not opened with Open Conversation Window preference if conversation receiving message is selected : force unminimized of the session's floater --- indra/newview/llimview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8f3f5145a9..37f5888e8c 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -285,6 +285,11 @@ void on_new_message(const LLSD& msg) { //Surface conversations floater LLFloaterReg::showInstance("im_container"); + + if (session_floater && session_floater->isMinimized()) + { + LLFloater::onClickMinimize(session_floater); + } } //If in DND mode, allow notification to be stored so upon DND exit -- cgit v1.2.3 From 212e21f3526d7d979a0950cc3c8c7ddaceef6cdc Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Tue, 12 Mar 2013 15:43:07 +0200 Subject: CHUI-847 Fixed [CHUIBUG]Collapse Participant List, operates on all torn off chats: make flag mIsPartListExpanded for saving of the participant list panel expand/collapse state --- indra/newview/llfloaterimsessiontab.cpp | 15 +++++++++++---- indra/newview/llfloaterimsessiontab.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 85b25afe43..5fc7f46ca3 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -61,6 +61,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) , mRefreshTimer(new LLTimer()) , mIsHostAttached(false) , mHasVisibleBeenInitialized(false) + , mIsParticipantListExpanded(true) { setAutoFocus(FALSE); mSession = LLIMModel::getInstance()->findIMSession(mSessionID); @@ -180,6 +181,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id) // LLFloater::mLastHostHandle = floater_container (a "future" host) conversp->setHost(floater_container); conversp->setHost(NULL); + conversp->forceReshape(); } // Added floaters share some state (like sort order) with their host @@ -269,6 +271,12 @@ BOOL LLFloaterIMSessionTab::postBuild() mRefreshTimer->setTimerExpirySec(0); mRefreshTimer->start(); initBtns(); + + if (mIsParticipantListExpanded != gSavedSettings.getBOOL("IMShowControlPanel")) + { + LLFloaterIMSessionTab::onSlide(this); + } + return result; } @@ -638,7 +646,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() // Participant list should be visible only in torn off floaters. bool is_participant_list_visible = !is_not_torn_off - && gSavedSettings.getBOOL("IMShowControlPanel") + && mIsParticipantListExpanded && !mIsP2PChat; mParticipantListPanel->setVisible(is_participant_list_visible); @@ -769,9 +777,8 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) // Expand/collapse the IM control panel self->mParticipantListPanel->setVisible(expand); - - gSavedSettings.setBOOL("IMShowControlPanel", expand); - + gSavedSettings.setBOOL("IMShowControlPanel", expand); + self->mIsParticipantListExpanded = expand; self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon")); } } diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index d55b021df7..e8ae557412 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -138,6 +138,7 @@ protected: bool mIsNearbyChat; bool mIsP2PChat; + bool mIsParticipantListExpanded; LLIMModel::LLIMSession* mSession; -- cgit v1.2.3 From 7e26f6a59e043fd22296452755d532e2a37b0399 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 13 Mar 2013 19:34:41 +0200 Subject: build fix --- indra/newview/llfloaterimsessiontab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 5fc7f46ca3..9fd22b1537 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -272,7 +272,7 @@ BOOL LLFloaterIMSessionTab::postBuild() mRefreshTimer->start(); initBtns(); - if (mIsParticipantListExpanded != gSavedSettings.getBOOL("IMShowControlPanel")) + if (mIsParticipantListExpanded != (bool)gSavedSettings.getBOOL("IMShowControlPanel")) { LLFloaterIMSessionTab::onSlide(this); } -- cgit v1.2.3 From 3468d2d93b7ea3ec4a86445a6187aa6738d8fc16 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 13 Mar 2013 16:08:23 +0200 Subject: CHUI-816 [CHUIBUG]CHUI does not remember undocked state and position of Nearby Chat : canceled the erroneous torn-off/docked state saving when nearby chat is closes --- indra/newview/llfloaterimnearbychat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index cfee5001a6..eb1a1f54ed 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -274,7 +274,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked() LLFloaterIMSessionTab::onTearOffClicked(); // see CHUI-170: Save torn-off state of the nearby chat between sessions - BOOL in_the_multifloater = !isTornOff(); + BOOL in_the_multifloater = (BOOL)getHost(); gSavedSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); } @@ -297,8 +297,10 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting) void LLFloaterIMNearbyChat::onClickCloseBtn() { if (!isTornOff()) + { return; - onTearOffClicked(); + } + LLFloaterIMSessionTab::onTearOffClicked(); LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance(); if (im_box) -- cgit v1.2.3 From 5cddf709acb93a17059e5539258fc30b534a8e99 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 14 Mar 2013 22:34:15 +0100 Subject: CHUI-700 FIX [CHUIBUG]"Zoom in" feature for avatars has disappeared Disabled "Zoom In" menu item in the case where gObjectList.findObject() returns nothing --- indra/newview/llfloaterimcontainer.cpp | 7 ++++++- indra/newview/llpanelpeoplemenus.cpp | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 53daaabe3d..e91717312e 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -53,6 +53,7 @@ #include "llcallbacklist.h" #include "llworld.h" #include "llsdserialize.h" +#include "llviewerobjectlist.h" // // LLFloaterIMContainer @@ -1231,7 +1232,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v } // Handle all other options - if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item) || ("can_zoom_in" == item)) + if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item)) { // Those menu items are enable only if a single avatar is selected return is_single_select; @@ -1261,6 +1262,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v { return LLAvatarActions::canCall(); } + else if ("can_zoom_in" == item) + { + return is_single_select && gObjectList.findObject(single_id); + } else if ("can_show_on_map" == item) { return (is_single_select ? (LLAvatarTracker::instance().isBuddyOnline(single_id) && is_agent_mappable(single_id)) || gAgent.isGodlike() : false); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index aa14b74869..49f7361c4a 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -40,6 +40,7 @@ #include "lllogchat.h" #include "llviewermenu.h" // for gMenuHolder #include "llconversationmodel.h" +#include "llviewerobjectlist.h" namespace LLPanelPeopleMenus { @@ -212,6 +213,12 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canCall(); } + else if (item == std::string("can_zoom_in")) + { + const LLUUID& id = mUUIDs.front(); + + return gObjectList.findObject(id); + } else if (item == std::string("can_show_on_map")) { const LLUUID& id = mUUIDs.front(); @@ -228,8 +235,7 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) return LLLogChat::isTranscriptExist(mUUIDs.front()); } else if (item == std::string("can_im") || item == std::string("can_invite") || - item == std::string("can_share") || item == std::string("can_pay") || - item == std::string("can_zoom_in")) + item == std::string("can_share") || item == std::string("can_pay")) { return true; } -- cgit v1.2.3 From f0b1d1c7ea6e31e89165ff805bf2314767a7e23d Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 14 Mar 2013 16:55:11 -0700 Subject: CHUI-853 (Crashing on ejecting member in group): Upon receiving the rejection response message, the incorrect session id was being used to display the message. session_id was being used instead of new_session_id. --- indra/newview/llimview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cd47a0c171..1d62a32fc2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2638,7 +2638,7 @@ void LLIMMgr::addMessage( if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) { // Evaluate if we need to skip this message when that setting is true (default is false) - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id); skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends... skip_message &= !session->isGroupSessionType(); // Do not skip group chats... skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself @@ -2654,7 +2654,7 @@ void LLIMMgr::addMessage( { LLFloaterReg::showInstance("im_container"); LLFloaterReg::getTypedInstance("im_container")-> - flashConversationItemWidget(session_id, true); + flashConversationItemWidget(new_session_id, true); } } -- cgit v1.2.3 From ee4fbb8e37ca20ebfbf85845dbb67941b7abfd29 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 15 Mar 2013 12:33:46 +0200 Subject: CHUI-830 FIXED Button for collapsing torn-off floater(to a single input line) is added. Show toasts for new messages for that conversation, regardless of other prefs. --- indra/newview/app_settings/settings.xml | 11 ++ indra/newview/llfloaterimnearbychat.cpp | 1 + indra/newview/llfloaterimnearbychathandler.cpp | 10 +- indra/newview/llfloaterimsession.cpp | 2 +- indra/newview/llfloaterimsessiontab.cpp | 82 +++++++++++++- indra/newview/llfloaterimsessiontab.h | 15 +++ indra/newview/llimview.cpp | 7 +- indra/newview/skins/default/textures/textures.xml | 2 + .../skins/default/xui/en/floater_im_session.xml | 123 ++++++++++++++++++--- 9 files changed, 227 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e216c7865d..ca6b9843fd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4281,6 +4281,17 @@ Boolean Value 1 + + IMShowContentPanel + + Comment + Show Toolbar and Body Panels + Persist + 1 + Type + Boolean + Value + 1 IgnoreAllNotifications diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index eb1a1f54ed..148f6a0609 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -290,6 +290,7 @@ void LLFloaterIMNearbyChat::onOpen(const LLSD& key) void LLFloaterIMNearbyChat::onClose(bool app_quitting) { // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater + LLFloaterIMSessionTab::restoreFloater(); onClickCloseBtn(); } diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 8870d54cd2..7afcf288ce 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -559,12 +559,14 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance("im_container"); - if( nearby_chat->hasFocus() + if(( nearby_chat->hasFocus() || im_box->hasFocus() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || mChannel.isDead() - || !mChannel.get()->getShowToasts() ) // to prevent toasts in Do Not Disturb mode + || !mChannel.get()->getShowToasts() ) + && nearby_chat->isMessagePaneExpanded()) + // to prevent toasts in Do Not Disturb mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen @@ -606,7 +608,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, //Don't show nearby toast, if conversation is visible but not focused LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID()); - if (session_floater + if (session_floater && session_floater->isMessagePaneExpanded() && session_floater->isInVisibleChain() && !session_floater->isMinimized() && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) { @@ -614,7 +616,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, } //Will show toast when chat preference is set - if(gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") + if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded()) { // Add a nearby chat toast. LLUUID id; diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 50b2ed8c51..733678364e 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -618,7 +618,7 @@ void LLFloaterIMSession::onClose(bool app_quitting) // Last change: // EXT-3516 X Button should end IM session, _ button should hide gIMMgr->leaveSession(mSessionID); - + LLFloaterIMSessionTab::restoreFloater(); // Clean up the conversation *after* the session has been ended LLFloaterIMSessionTab::onClose(app_quitting); } diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 9fd22b1537..c744350dc6 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -194,19 +194,28 @@ BOOL LLFloaterIMSessionTab::postBuild() { BOOL result; + mBodyStack = getChild("main_stack"); + + mCloseBtn = getChild("close_btn"); mCloseBtn->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); mExpandCollapseBtn = getChild("expand_collapse_btn"); mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onSlide, this)); + mExpandCollapseLineBtn = getChild("minz_btn"); + mExpandCollapseLineBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onCollapseToLine, this)); + mTearOffBtn = getChild("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); mGearBtn = getChild("gear_btn"); mParticipantListPanel = getChild("speakers_list_panel"); - + mToolbarPanel = getChild("toolbar_panel"); + mContentPanel = getChild("body_panel"); + mInputButtonPanel = getChild("input_button_layout_panel"); + mInputButtonPanel->setVisible(false); // Add a scroller for the folder (participant) view LLRect scroller_view_rect = mParticipantListPanel->getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); @@ -264,6 +273,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mConversationsRoot->setFollowsAll(); mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox); + setMessagePaneExpanded(true); + buildConversationViewParticipant(); refreshConversation(); @@ -651,6 +662,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() mParticipantListPanel->setVisible(is_participant_list_visible); + // Display collapse image (<<) if the floater is hosted // or if it is torn off but has an open control panel. bool is_expanded = is_not_torn_off || is_participant_list_visible; @@ -674,6 +686,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() mTearOffBtn->setImageOverlay(getString(is_not_torn_off? "tear_off_icon" : "return_icon")); mTearOffBtn->setToolTip(getString(is_not_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window")); + mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat); enableDisableCallBtn(); @@ -784,6 +797,65 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) } } +void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self) +{ + LLFloaterIMContainer* host_floater = dynamic_cast(self->getHost()); + if (!host_floater) + { + if(self->mParticipantListPanel->getVisible()) + { + onSlide(self); + } + + bool expand = self->isMessagePaneExpanded(); + self->mExpandCollapseLineBtn->setImageOverlay(self->getString(expand ? "collapseline_icon" : "expandline_icon")); + self->mContentPanel->setVisible(!expand); + self->mToolbarPanel->setVisible(!expand); + self->reshapeFloater(expand); + self->setMessagePaneExpanded(!expand); + + } +} + +void LLFloaterIMSessionTab::reshapeFloater(bool collapse) +{ + LLRect floater_rect = getRect(); + + if(collapse) + { + mFloaterHeight = floater_rect.getHeight(); + S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight(); + floater_rect.mTop -= height; + enableResizeCtrls(true, true, false); + } + else + { + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + enableResizeCtrls(true, true, true); + + } + + setShape(floater_rect, true); + mBodyStack->updateLayout(); + +} + +void LLFloaterIMSessionTab::restoreFloater() +{ + if(!isMessagePaneExpanded()) + { + mContentPanel->setVisible(true); + mToolbarPanel->setVisible(true); + LLRect floater_rect = getRect(); + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + setShape(floater_rect, true); + mBodyStack->updateLayout(); + mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); + setMessagePaneExpanded(true); + enableResizeCtrls(true, true, true); + } +} + /*virtual*/ void LLFloaterIMSessionTab::onOpen(const LLSD& key) { @@ -793,12 +865,15 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) // Show the messages pane when opening a floater hosted in the Conversations host_floater->collapseMessagesPane(false); } + + mInputButtonPanel->setVisible(isTornOff()); } void LLFloaterIMSessionTab::onTearOffClicked() { - setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); + restoreFloater(); + setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); mSaveRect = isTornOff(); initRectControl(); LLFloater::onClickTearOff(this); @@ -813,7 +888,10 @@ void LLFloaterIMSessionTab::onTearOffClicked() else { container->selectConversation(mSessionID); + } + mInputButtonPanel->setVisible(isTornOff()); + refreshConversation(); updateGearBtn(); } diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index e8ae557412..e41f639037 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -98,6 +98,8 @@ public: LLConversationItem* getCurSelectedViewModelItem(); void forceReshape(); virtual BOOL handleKeyHere( KEY key, MASK mask ); + bool isMessagePaneExpanded(){return mMessagePaneExpanded;} + void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} protected: @@ -111,6 +113,9 @@ protected: bool onIMShowModesMenuItemCheck(const LLSD& userdata); bool onIMShowModesMenuItemEnable(const LLSD& userdata); static void onSlide(LLFloaterIMSessionTab *self); + static void onCollapseToLine(LLFloaterIMSessionTab *self); + void reshapeFloater(bool collapse); + void restoreFloater(); // refresh a visual state of the Call button void updateCallBtnState(bool callIsActive); @@ -138,15 +143,22 @@ protected: bool mIsNearbyChat; bool mIsP2PChat; + + bool mMessagePaneExpanded; bool mIsParticipantListExpanded; + LLIMModel::LLIMSession* mSession; // Participants list: model and view LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item); LLUUID mSessionID; + LLLayoutStack* mBodyStack; LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel + LLLayoutPanel* mContentPanel; + LLLayoutPanel* mToolbarPanel; + LLLayoutPanel* mInputButtonPanel; LLParticipantList* getParticipantList(); conversations_widgets_map mConversationsWidgets; LLConversationViewModel mConversationViewModel; @@ -158,11 +170,14 @@ protected: LLChatEntry* mInputEditor; int mInputEditorTopPad; // padding between input field and chat history + LLButton* mExpandCollapseLineBtn; LLButton* mExpandCollapseBtn; LLButton* mTearOffBtn; LLButton* mCloseBtn; LLButton* mGearBtn; + S32 mFloaterHeight; + private: // Handling selection and contextual menu diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1d62a32fc2..d04e76c0b3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -226,17 +226,18 @@ void on_new_message(const LLSD& msg) && !session_floater->isMinimized() && !(session_floater->getHost() && session_floater->getHost()->isMinimized()); - if ("toast" == action && !session_floater_is_open) + bool conversation_floater_collapsed = !session_floater->isMessagePaneExpanded(); + if (("toast" == action && !session_floater_is_open) || conversation_floater_collapsed) { //User is not focused on conversation containing the message - if(session_floater_not_focused) + if(session_floater_not_focused || conversation_floater_collapsed) { if(!LLMuteList::getInstance()->isMuted(participant_id)) { im_box->flashConversationItemWidget(session_id, true); } //The conversation floater isn't focused/open - if(conversation_floater_not_focused) + if(conversation_floater_not_focused || conversation_floater_collapsed) { if(!LLMuteList::getInstance()->isMuted(participant_id) && !gAgent.isDoNotDisturb()) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index a07d7e4855..93c9cb02cb 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -171,6 +171,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 8f0574177f..1a9199f9e7 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -19,6 +19,12 @@ positioning="relative"> Conv_toolbar_open_call Conv_toolbar_hang_up + + @@ -65,14 +71,28 @@ top="0" left="0" height="355" - width="394"> - + + + - + + @@ -208,7 +235,7 @@ tab_group="2" follows="all" top="0" - height="310" + height="275" width="244" layout="topleft" user_resize="true" @@ -221,13 +248,13 @@ follows="all" layout="topleft" visible="true" - height="275" + height="240" width="244"> - + + + + + + - + + +