From 3d32441dccbd6f58cced6b6d54205b8f3afadf43 Mon Sep 17 00:00:00 2001 From: Cinders Date: Thu, 4 Jul 2013 14:57:50 -0600 Subject: [PATCH] Fix build for the CHUI conversation log TODO: Make them not ugly and hook them up to our communications ui --- indra/newview/fschathistory.cpp | 2 +- indra/newview/llconversationlog.cpp | 19 ++++++++++++------- indra/newview/llconversationlog.h | 4 ---- indra/newview/llconversationloglist.cpp | 5 +---- indra/newview/llconversationloglist.h | 4 ---- indra/newview/llconversationloglistitem.cpp | 17 +++++++++-------- indra/newview/llconversationloglistitem.h | 5 ++++- indra/newview/llfloaterconversationlog.cpp | 5 +---- indra/newview/llfloaterconversationlog.h | 4 ---- .../newview/llfloaterconversationpreview.cpp | 18 +++++++++++------- indra/newview/llfloaterconversationpreview.h | 15 ++++++++------- indra/newview/llviewerfloaterreg.cpp | 4 ++-- .../xui/en/floater_conversation_log.xml | 2 +- 13 files changed, 50 insertions(+), 54 deletions(-) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index ea1c379f27..c19845c759 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -24,7 +24,7 @@ * $/LicenseInfo$ */ -// Original file: FSChatHistory.cpp +// Original file: LLChatHistory.cpp #include "llviewerprecompiledheaders.h" diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index f3c3c5ac52..44fdcde423 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -25,14 +25,16 @@ #include "llviewerprecompiledheaders.h" -#if 0 - #include "llagent.h" #include "llavatarnamecache.h" #include "llconversationlog.h" #include "lldiriterator.h" #include "llnotificationsutil.h" #include "lltrans.h" +// +#include "llviewercontrol.h" +#include "fsfloaterim.h" +// #include #include "boost/lexical_cast.hpp" @@ -147,15 +149,20 @@ bool LLConversation::isOlderThan(U32 days) const void LLConversation::setListenIMFloaterOpened() { - LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(mSessionID); + // + //LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(mSessionID); + FSFloaterIM* floater = FSFloaterIM::findInstance(mSessionID); - bool offline_ims_visible = LLFloaterIMSession::isVisible(floater) && floater->hasFocus(); + //bool offline_ims_visible = LLFloaterIMSession::isVisible(floater) && floater->hasFocus(); + bool offline_ims_visible = FSFloaterIM::isVisible(floater) && floater->hasFocus(); + // // we don't need to listen for im floater with this conversation is opened // if floater is already opened or this conversation doesn't have unread offline messages if (mHasOfflineIMs && !offline_ims_visible) { - mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1)); + // FIXME: I commented this out until it's hooked up + //mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1)); } else { @@ -615,5 +622,3 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD& deleteBackupLogs(); } } - -#endif \ No newline at end of file diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 297ec055dd..265b1f0ef0 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -23,8 +23,6 @@ * $/LicenseInfo$ */ -#if 0 - #ifndef LLCONVERSATIONLOG_H_ #define LLCONVERSATIONLOG_H_ @@ -216,5 +214,3 @@ public: }; #endif /* LLCONVERSATIONLOG_H_ */ - -#endif diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 32a9bf1cde..1f8b490638 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -25,8 +25,6 @@ #include "llviewerprecompiledheaders.h" -#if 0 - #include "llavataractions.h" #include "llagent.h" #include "llfloaterreg.h" @@ -36,6 +34,7 @@ #include "llconversationloglistitem.h" #include "llviewermenu.h" #include "lltrans.h" +#include "llviewercontrol.h" // static LLDefaultChildRegistry::Register r("conversation_log_list"); @@ -533,5 +532,3 @@ bool LLConversationLogListDateComparator::doCompare(const LLConversationLogListI return date1 > date2; } - -#endif \ No newline at end of file diff --git a/indra/newview/llconversationloglist.h b/indra/newview/llconversationloglist.h index edca9ff4e7..62ec57e09e 100644 --- a/indra/newview/llconversationloglist.h +++ b/indra/newview/llconversationloglist.h @@ -23,8 +23,6 @@ * $/LicenseInfo$ */ -if 0 - #ifndef LLCONVERSATIONLOGLIST_H_ #define LLCONVERSATIONLOGLIST_H_ @@ -153,5 +151,3 @@ protected: }; #endif /* LLCONVERSATIONLOGLIST_H_ */ - -#endif \ No newline at end of file diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index 314dee4e46..70a3ccc361 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -25,12 +25,11 @@ #include "llviewerprecompiledheaders.h" -#if 0 - // llui #include "lliconctrl.h" #include "lltextbox.h" #include "lltextutil.h" +#include "llbutton.h" // // newview #include "llavataractions.h" @@ -49,13 +48,17 @@ LLConversationLogListItem::LLConversationLogListItem(const LLConversation* conve { buildFromFile("panel_conversation_log_list_item.xml"); - LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(mConversation->getSessionID()); - - bool ims_are_read = LLFloaterIMSession::isVisible(floater) && floater->hasFocus(); + // + //LLFloaterIMSession* floater = LLFloaterIMSession::findInstance(mConversation->getSessionID()); + FSFloaterIM* floater = FSFloaterIM::findInstance(mConversation->getSessionID()); + //bool ims_are_read = LLFloaterIMSession::isVisible(floater) && floater->hasFocus(); + bool ims_are_read = FSFloaterIM::isVisible(floater) && floater->hasFocus(); + // if (mConversation->hasOfflineMessages() && !ims_are_read) { - mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversationLogListItem::onIMFloaterShown, this, _1)); + // FIXME: Commented this out cuz I'm lazy. + //mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversationLogListItem::onIMFloaterShown, this, _1)); } } @@ -184,5 +187,3 @@ void LLConversationLogListItem::onDoubleClick() break; } } - -#endif \ No newline at end of file diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h index ee28456bbb..10fb4e37c5 100644 --- a/indra/newview/llconversationloglistitem.h +++ b/indra/newview/llconversationloglistitem.h @@ -26,7 +26,10 @@ #ifndef LLCONVERSATIONLOGLISTITEM_H_ #define LLCONVERSATIONLOGLISTITEM_H_ -#include "llfloaterimsession.h" +// +//#include "llfloaterimsession.h" +#include "fsfloaterim.h" +// #include "llpanel.h" class LLTextBox; diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp index cd0e0c6c30..a5922326cb 100644 --- a/indra/newview/llfloaterconversationlog.cpp +++ b/indra/newview/llfloaterconversationlog.cpp @@ -25,13 +25,12 @@ */ #include "llviewerprecompiledheaders.h" -#if 0 - #include "llconversationloglist.h" #include "llfiltereditor.h" #include "llfloaterconversationlog.h" #include "llfloaterreg.h" #include "llmenubutton.h" +#include "llviewercontrol.h" // LLFloaterConversationLog::LLFloaterConversationLog(const LLSD& key) : LLFloater(key), @@ -133,5 +132,3 @@ bool LLFloaterConversationLog::isActionChecked(const LLSD& userdata) return false; } - -#endif \ No newline at end of file diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h index 3ea9ca7b78..e971330f3d 100644 --- a/indra/newview/llfloaterconversationlog.h +++ b/indra/newview/llfloaterconversationlog.h @@ -23,8 +23,6 @@ * $/LicenseInfo$ */ -#if 0 - #ifndef LL_LLFLOATERCONVERSATIONLOG_H_ #define LL_LLFLOATERCONVERSATIONLOG_H_ @@ -56,5 +54,3 @@ private: #endif /* LLFLOATERCONVERSATIONLOG_H_ */ - -#endif \ No newline at end of file diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 156c2c8c49..fb4b4c9dc5 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -25,15 +25,17 @@ #include "llviewerprecompiledheaders.h" -#if 0 - #include "llconversationlog.h" #include "llfloaterconversationpreview.h" #include "llimview.h" #include "lllineeditor.h" -#include "llfloaterimnearbychat.h" +// +//#include "llfloaterimnearbychat.h" +#include "fsfloaternearbychat.h" +// #include "llspinctrl.h" #include "lltrans.h" +#include "llviewercontrol.h" // const std::string LL_FCP_COMPLETE_NAME("complete_name"); const std::string LL_FCP_ACCOUNT_NAME("user_name"); @@ -51,7 +53,10 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i BOOL LLFloaterConversationPreview::postBuild() { - mChatHistory = getChild("chat_history"); + // + //mChatHistory = getChild("chat_history"); + mChatHistory = getChild("chat_history"); + // const LLConversation* conv = LLConversationLog::instance().getConversation(mSessionID); std::string name; @@ -162,7 +167,8 @@ void LLFloaterConversationPreview::showHistory() } else if (from_id.isNull()) { - chat.mSourceType = LLFloaterIMNearbyChat::isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; + // FIXME: Hook this up to our nearby chat + //chat.mSourceType = LLFloaterIMNearbyChat::isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; } LLSD chat_args; @@ -186,5 +192,3 @@ void LLFloaterConversationPreview::onMoreHistoryBtnClick() showHistory(); } - -#endif \ No newline at end of file diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h index b9f5bc32f7..a4cc29b177 100644 --- a/indra/newview/llfloaterconversationpreview.h +++ b/indra/newview/llfloaterconversationpreview.h @@ -22,14 +22,14 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -// CHUI Merge this file doesnt exsist in LL's repo - -#if 0 #ifndef LLFLOATERCONVERSATIONPREVIEW_H_ #define LLFLOATERCONVERSATIONPREVIEW_H_ -#include "llchathistory.h" +// +//#include "llchathistory.h" +#include "fschathistory.h" +// #include "llfloater.h" extern const std::string LL_FCP_COMPLETE_NAME; //"complete_name" @@ -54,7 +54,10 @@ private: void showHistory(); LLSpinCtrl* mPageSpinner; - LLChatHistory* mChatHistory; + // + //LLChatHistory* mChatHistory; + FSChatHistory* mChatHistory; + // LLUUID mSessionID; int mCurrentPage; int mPageSize; @@ -65,5 +68,3 @@ private: }; #endif /* LLFLOATERCONVERSATIONPREVIEW_H_ */ - -#endif \ No newline at end of file diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index a6072b869c..2031a9b848 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -237,7 +237,7 @@ void LLViewerFloaterReg::registerFloaters() // [FS communication UI] LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // [FS communication UI] - //LLFloaterReg::add("conversation", "floater_conversation_log.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("conversation", "floater_conversation_log.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // [FS communication UI] @@ -320,7 +320,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); - //LLFloaterReg::add("preview_conversation", "floater_conversation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); [CHUI Merge] + LLFloaterReg::add("preview_conversation", "floater_conversation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); LLFloaterReg::add("preview_notecard", "floater_preview_notecard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); LLFloaterReg::add("preview_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml index 19a4cbc119..ed516a8bfe 100644 --- a/indra/newview/skins/default/xui/en/floater_conversation_log.xml +++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml @@ -12,7 +12,7 @@ save_rect="true" single_instance="true" reuse_instance="true" - title="CONVERSATION LOG" + title="Conversation Log" width="300">