From 8922dec40039a10e770243f3047793f8501fe43a Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Tue, 21 Aug 2012 19:51:41 +0300 Subject: CHUI-293 CHUI-294 FIXED displaying Group Invite and Transfer Object as notifications, instead of displaying as messages from an object. Restored the exception in handling "LoadWebPage", "ScriptDialog" and "ScriptDialogGroup" notifications, that caused only those notifications to be shown as messages from an object. --- indra/newview/llnotificationscripthandler.cpp | 42 +++++++++++----------- .../newview/skins/default/xui/en/notifications.xml | 3 ++ 2 files changed, 24 insertions(+), 21 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 7e9c0d4f4b..5dcd84b400 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -78,33 +78,33 @@ bool LLScriptHandler::processNotification(const LLNotificationPtr& notification) } if (notification->canLogToIM()) - { - LLHandlerUtil::logToIMP2P(notification); - } + { + LLHandlerUtil::logToIMP2P(notification); + } - if(notification->hasFormElements()) + if(notification->hasFormElements() && !notification->canShowToast()) + { + LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); + } + else + { + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); + + LLScreenChannel* channel = dynamic_cast(mChannel.get()); + if(channel) { - LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); + channel->addToast(p); } - else - { - LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); - - LLScreenChannel* channel = dynamic_cast(mChannel.get()); - if(channel) - { - channel->addToast(p); - } } return false; - } +} void LLScriptHandler::onDelete( LLNotificationPtr notification ) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 64db7cd969..933135954f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6742,6 +6742,7 @@ If you stay in this region you will be logged out. Load web page [URL]? @@ -6844,6 +6845,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not [NAME]'s '<nolink>[TITLE]</nolink>' [MESSAGE] @@ -6862,6 +6864,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not group [GROUPNAME]'s '<nolink>[TITLE]</nolink>' -- cgit v1.2.3 From f809409de5df3f5ddef24433a4310b18caf3cd8a Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 21 Aug 2012 20:02:29 +0300 Subject: CHUI-300 FIXED (Simplify conversation log name saved to user settings?) - Changed file name agentID#.call_log to conversation.log --- indra/newview/llconversationlog.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index b6713465f3..486cea4064 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -238,10 +238,8 @@ void LLConversationLog::cache() std::string LLConversationLog::getFileName() { - std::string agent_id_string; - gAgent.getID().toString(agent_id_string); - - return gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, agent_id_string) + ".call_log"; + std::string filename = "conversation"; + return gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, filename) + ".log"; } bool LLConversationLog::saveToFile(const std::string& filename) -- cgit v1.2.3 From b93e2f7c84a8e14d7ca6c58c35183216a7fbf5bb Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 21 Aug 2012 20:04:13 +0300 Subject: CHUI-297 FIXED (Double clicking line item in conversation log does not start IM with User) - Added callback on double click which initiates IM session with selected conversation log list item --- indra/newview/llconversationloglistitem.cpp | 20 ++++++++++++++++++++ indra/newview/llconversationloglistitem.h | 2 ++ 2 files changed, 22 insertions(+) (limited to 'indra') diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index fc2e757864..9f7c588989 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -31,9 +31,11 @@ #include "lltextutil.h" // newview +#include "llavataractions.h" #include "llavatariconctrl.h" #include "llconversationlog.h" #include "llconversationloglistitem.h" +#include "llgroupactions.h" #include "llgroupiconctrl.h" #include "llinventoryicon.h" @@ -74,6 +76,7 @@ BOOL LLConversationLogListItem::postBuild() mConversationDate->setValue(mConversation->getTimestamp()); getChild("delete_btn")->setClickedCallback(boost::bind(&LLConversationLogListItem::onRemoveBtnClicked, this)); + setDoubleClickCallback(boost::bind(&LLConversationLogListItem::onDoubleClick, this)); return TRUE; } @@ -155,3 +158,20 @@ void LLConversationLogListItem::highlightNameDate(const std::string& highlited_t LLTextUtil::textboxSetHighlightedVal(mConversationName, params, mConversation->getConversationName(), highlited_text); LLTextUtil::textboxSetHighlightedVal(mConversationDate, params, mConversation->getTimestamp(), highlited_text); } + +void LLConversationLogListItem::onDoubleClick() +{ + switch (mConversation->getConversationType()) + { + case LLIMModel::LLIMSession::P2P_SESSION: + LLAvatarActions::startIM(mConversation->getParticipantID()); + break; + + case LLIMModel::LLIMSession::GROUP_SESSION: + LLGroupActions::startIM(mConversation->getParticipantID()); + break; + + default: + break; + } +} diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h index deba7d4563..8943e11604 100644 --- a/indra/newview/llconversationloglistitem.h +++ b/indra/newview/llconversationloglistitem.h @@ -62,6 +62,8 @@ public: void highlightNameDate(const std::string& highlited_text); + void onDoubleClick(); + private: void initIcons(); -- cgit v1.2.3 From b2f2a8b21610ae6863b773333c60b18b818c047f Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 22 Aug 2012 14:48:44 +0300 Subject: code style fix --- indra/newview/llimfloatercontainer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 1e136b721c..6127a9a19b 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -519,7 +519,6 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c item->selectItem(); } } - return; } LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversationItem* item) -- cgit v1.2.3 From 2cf5307c9211b813689f0e441b9f56bc21f63348 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 22 Aug 2012 19:29:22 -0700 Subject: CHUI-282 : WIP : Isolated llconversationview classes and suppressed the dependency of model to widgets --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/llconversationmodel.cpp | 31 ++++------------ indra/newview/llconversationmodel.h | 7 ++-- indra/newview/llconversationview.cpp | 64 ++++++++++++++++++++++++++++++++++ indra/newview/llconversationview.h | 63 +++++++++++++++++++++++++++++++++ indra/newview/llimfloatercontainer.cpp | 10 +++--- 6 files changed, 144 insertions(+), 33 deletions(-) create mode 100644 indra/newview/llconversationview.cpp create mode 100644 indra/newview/llconversationview.h (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9553476aaf..c49c625dbd 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -138,6 +138,7 @@ set(viewer_SOURCE_FILES llconversationloglist.cpp llconversationloglistitem.cpp llconversationmodel.cpp + llconversationview.cpp llcurrencyuimanager.cpp llcylinder.cpp lldateutil.cpp @@ -721,6 +722,7 @@ set(viewer_HEADER_FILES llconversationloglist.h llconversationloglistitem.h llconversationmodel.h + llconversationview.h llcurrencyuimanager.h llcylinder.h lldateutil.h diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 0c23e2654e..923bc7a3a1 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -32,41 +32,22 @@ #include "llimfloatercontainer.h" // Conversation items -LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLIMFloaterContainer* containerp) : - LLFolderViewModelItemCommon(containerp->getRootViewModel()), +LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLFolderViewModelItemCommon(root_view_model), mName(display_name), - mUUID(uuid), - mContainer(containerp) + mUUID(uuid) { } -LLConversationItem::LLConversationItem(LLIMFloaterContainer* containerp) : - LLFolderViewModelItemCommon(containerp->getRootViewModel()), +LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_model) : + LLFolderViewModelItemCommon(root_view_model), mName(""), - mUUID(), - mContainer(NULL) + mUUID() { } // Virtual action callbacks -void LLConversationItem::selectItem(void) -{ - LLFloater* session_floater = LLIMConversation::getConversation(mUUID); - LLMultiFloater* host_floater = session_floater->getHost(); - -// LLIMFloater::show(mUUID); - if (host_floater == mContainer) - { - // Always expand the message pane if the panel is hosted by the container - mContainer->collapseMessagesPane(false); - // Switch to the conversation floater that is being selected - mContainer->selectFloater(session_floater); - } - // Set the focus on the selected floater - session_floater->setFocus(TRUE); -} - void LLConversationItem::setVisibleIfDetached(BOOL visible) { // Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 56a5b73c15..2f7124aec5 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -52,8 +52,8 @@ typedef std::map conversations_widgets_map; class LLConversationItem : public LLFolderViewModelItemCommon { public: - LLConversationItem(std::string display_name, const LLUUID& uuid, LLIMFloaterContainer* containerp); - LLConversationItem(LLIMFloaterContainer* containerp); + LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItem(LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItem() {} // Stub those things we won't really be using in this conversation context @@ -95,7 +95,7 @@ public: virtual void openItem( void ); virtual void closeItem( void ); virtual void previewItem( void ); - virtual void selectItem(void); + virtual void selectItem(void) { } virtual void showProperties(void); void setVisibleIfDetached(BOOL visible); @@ -114,7 +114,6 @@ public: private: std::string mName; const LLUUID mUUID; - LLIMFloaterContainer* mContainer; }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp new file mode 100644 index 0000000000..7d90a154e5 --- /dev/null +++ b/indra/newview/llconversationview.cpp @@ -0,0 +1,64 @@ +/** + * @file llconversationview.cpp + * @brief Implementation of conversations list widgets and views + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" + +#include "llconversationview.h" +#include "llimconversation.h" +#include "llimfloatercontainer.h" + +LLConversationViewSession::Params::Params() : + container() +{} + +LLConversationViewSession::LLConversationViewSession( const LLConversationViewSession::Params& p ): + LLFolderViewFolder(p), + mContainer(p.container) +{ +} + +void LLConversationViewSession::selectItem() +{ + LLFolderViewItem::selectItem(); + + LLConversationItem* item = dynamic_cast(mViewModelItem); + LLFloater* session_floater = LLIMConversation::getConversation(item->getUUID()); + LLMultiFloater* host_floater = session_floater->getHost(); + + if (host_floater == mContainer) + { + // Always expand the message pane if the panel is hosted by the container + mContainer->collapseMessagesPane(false); + // Switch to the conversation floater that is being selected + mContainer->selectFloater(session_floater); + } + + // Set the focus on the selected floater + session_floater->setFocus(TRUE); +} + +// EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h new file mode 100644 index 0000000000..08f2343aca --- /dev/null +++ b/indra/newview/llconversationview.h @@ -0,0 +1,63 @@ +/** + * @file llconversationview.h + * @brief Implementation of conversations list widgets and views + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLCONVERSATIONVIEW_H +#define LL_LLCONVERSATIONVIEW_H + +#include "llfolderviewitem.h" +#include "llfolderviewmodel.h" + +class LLButton; +class LLFloater; +class LLLayoutPanel; +class LLLayoutStack; +class LLTabContainer; +class LLIMFloaterContainer; + +// Implementation of conversations list widgets + +class LLConversationViewSession : public LLFolderViewFolder +{ +public: + struct Params : public LLInitParam::Block + { + Optional container; + + Params(); + }; + +protected: + friend class LLUICtrlFactory; + LLConversationViewSession( const Params& p ); + + LLIMFloaterContainer* mContainer; + +public: + virtual ~LLConversationViewSession( void ) { } + virtual void selectItem(); +}; + +#endif // LL_LLCONVERSATIONVIEW_H diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 1e136b721c..29878cfc9e 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -43,6 +43,7 @@ #include "llimview.h" #include "lltransientfloatermgr.h" #include "llviewercontrol.h" +#include "llconversationview.h" // // LLIMFloaterContainer @@ -111,7 +112,7 @@ BOOL LLIMFloaterContainer::postBuild() mConversationsListPanel = getChild("conversations_list_panel"); // CHUI-98 : View Model for conversations - LLConversationItem* base_item = new LLConversationItem(this); + LLConversationItem* base_item = new LLConversationItem(getRootViewModel()); LLFolderView::Params p; p.view_model = &mConversationViewModel; p.parent_panel = mConversationsListPanel; @@ -470,7 +471,7 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) removeConversationListItem(uuid,false); // Create a conversation item - LLConversationItem* item = new LLConversationItem(display_name, uuid, this); + LLConversationItem* item = new LLConversationItem(display_name, uuid, getRootViewModel()); mConversationsItems[uuid] = item; // Create a widget from it @@ -524,7 +525,7 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversationItem* item) { - LLFolderViewItem::Params params; + LLConversationViewSession::Params params; params.name = item->getDisplayName(); //params.icon = bridge->getIcon(); @@ -534,8 +535,9 @@ LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversat params.listener = item; params.rect = LLRect (0, 0, 0, 0); params.tool_tip = params.name; + params.container = this; - return LLUICtrlFactory::create(params); + return LLUICtrlFactory::create(params); } // EOF -- cgit v1.2.3 From 679d0f78f9a4a83e5eb2ec857ceb2d9b8c6f4d91 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 22 Aug 2012 23:14:01 -0700 Subject: CHUI-282 : WIP, Clean up dependencies --- indra/newview/llconversationmodel.cpp | 1 - indra/newview/llconversationmodel.h | 10 ---------- indra/newview/llconversationview.cpp | 1 + indra/newview/llconversationview.h | 6 ------ 4 files changed, 1 insertion(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 923bc7a3a1..42ed7603d1 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -29,7 +29,6 @@ #include "llconversationmodel.h" #include "llimconversation.h" -#include "llimfloatercontainer.h" // Conversation items LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 2f7124aec5..1ce70d754b 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -27,19 +27,9 @@ #ifndef LL_LLCONVERSATIONMODEL_H #define LL_LLCONVERSATIONMODEL_H -//#include -//#include - #include "llfolderviewitem.h" #include "llfolderviewmodel.h" -class LLButton; -class LLFloater; -class LLLayoutPanel; -class LLLayoutStack; -class LLTabContainer; -class LLIMFloaterContainer; - // Implementation of conversations list class LLConversationItem; diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 7d90a154e5..464d061a82 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -28,6 +28,7 @@ #include "llviewerprecompiledheaders.h" #include "llconversationview.h" +#include "llconversationmodel.h" #include "llimconversation.h" #include "llimfloatercontainer.h" diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 08f2343aca..743efb6384 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -28,13 +28,7 @@ #define LL_LLCONVERSATIONVIEW_H #include "llfolderviewitem.h" -#include "llfolderviewmodel.h" -class LLButton; -class LLFloater; -class LLLayoutPanel; -class LLLayoutStack; -class LLTabContainer; class LLIMFloaterContainer; // Implementation of conversations list widgets -- cgit v1.2.3 From 41c85d357c8793f5119246b79441dd1dad9aa563 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 23 Aug 2012 18:07:35 +0300 Subject: CHUI-296 FIXED (Unread IM messages icon not showing in conversation log) - Sometimes IM floater with offline unread messages is visible but not in visible chain and the flag of offline unread messages is erroneously reset. So made condition of whether floater is visible more strict. --- indra/newview/llimfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 5780ac52a5..1c6445610f 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -789,7 +789,7 @@ void LLIMFloater::setVisible(BOOL visible) } } - if (visible) + if (visible && isInVisibleChain()) { sIMFloaterShowedSignal(mSessionID); } -- cgit v1.2.3 From 02e4068baaa7bcc49186e9a02a022f3d6cb087ac Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 23 Aug 2012 18:19:13 +0300 Subject: CHUI-306 FIXED (Selecting IM option for Group in conversation log does not start an IM if you did not initiate the conversation) - To start group call or group chat, group_id should be passed as an argument to LLGrupActions, not participant_id. --- indra/newview/llconversationloglist.cpp | 6 +++--- indra/newview/llconversationloglistitem.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 0433719a89..257ec082a5 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -193,7 +193,7 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::startIM(selected_id); + LLGroupActions::startIM(getSelectedConversation()->getSessionID()); break; default: @@ -209,7 +209,7 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::startCall(selected_id); + LLGroupActions::startCall(getSelectedConversation()->getSessionID()); break; default: @@ -225,7 +225,7 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::show(selected_id); + LLGroupActions::show(getSelectedConversation()->getSessionID()); break; default: diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index 9f7c588989..dddf216592 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -168,7 +168,7 @@ void LLConversationLogListItem::onDoubleClick() break; case LLIMModel::LLIMSession::GROUP_SESSION: - LLGroupActions::startIM(mConversation->getParticipantID()); + LLGroupActions::startIM(mConversation->getSessionID()); break; default: -- cgit v1.2.3 From 4ea73df484d22815026367771f9d728d755f6274 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 23 Aug 2012 11:32:20 -0700 Subject: CHUI-282 : WIP : Further separate view from model for llconversation items --- indra/newview/llconversationmodel.cpp | 14 -------------- indra/newview/llconversationmodel.h | 2 -- indra/newview/llconversationview.cpp | 13 +++++++++++++ indra/newview/llconversationview.h | 1 + indra/newview/llimfloatercontainer.cpp | 6 +++--- 5 files changed, 17 insertions(+), 19 deletions(-) (limited to 'indra') diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 42ed7603d1..832dc3c3e4 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -28,7 +28,6 @@ #include "llviewerprecompiledheaders.h" #include "llconversationmodel.h" -#include "llimconversation.h" // Conversation items LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : @@ -45,20 +44,7 @@ LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_mod { } - // Virtual action callbacks -void LLConversationItem::setVisibleIfDetached(BOOL visible) -{ - // Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized - // Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here - LLFloater* session_floater = LLIMConversation::getConversation(mUUID); - - if (session_floater && !session_floater->getHost() && !session_floater->isMinimized()) - { - session_floater->setVisible(visible); - } -} - void LLConversationItem::performAction(LLInventoryModel* model, std::string action) { } diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 1ce70d754b..cb03128cac 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -88,8 +88,6 @@ public: virtual void selectItem(void) { } virtual void showProperties(void); - void setVisibleIfDetached(BOOL visible); - // This method will be called to determine if a drop can be // performed, and will set drop to TRUE if a drop is // requested. diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 464d061a82..6cc911ecef 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -62,4 +62,17 @@ void LLConversationViewSession::selectItem() session_floater->setFocus(TRUE); } +void LLConversationViewSession::setVisibleIfDetached(BOOL visible) +{ + // Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized + // Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here + LLConversationItem* item = dynamic_cast(mViewModelItem); + LLFloater* session_floater = LLIMConversation::getConversation(item->getUUID()); + + if (session_floater && !session_floater->getHost() && !session_floater->isMinimized()) + { + session_floater->setVisible(visible); + } +} + // EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 743efb6384..6a51e719c8 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -52,6 +52,7 @@ protected: public: virtual ~LLConversationViewSession( void ) { } virtual void selectItem(); + void setVisibleIfDetached(BOOL visible); }; #endif // LL_LLCONVERSATIONVIEW_H diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 29878cfc9e..38ac3eb9e4 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -328,10 +328,10 @@ void LLIMFloaterContainer::setVisible(BOOL visible) // We need to show/hide all the associated conversations that have been torn off // (and therefore, are not longer managed by the multifloater), // so that they show/hide with the conversations manager. - conversations_items_map::iterator item_it = mConversationsItems.begin(); - for (;item_it != mConversationsItems.end(); ++item_it) + conversations_widgets_map::iterator item_it = mConversationsWidgets.begin(); + for (;item_it != mConversationsWidgets.end(); ++item_it) { - LLConversationItem* item = item_it->second; + LLConversationViewSession* item = dynamic_cast(item_it->second); item->setVisibleIfDetached(visible); } -- cgit v1.2.3