summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterconversationpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterconversationpreview.cpp')
-rw-r--r--indra/newview/llfloaterconversationpreview.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 7083fb987d..dbcf154ef2 100644
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -29,6 +29,7 @@
#include "llfloaterconversationpreview.h"
#include "llimview.h"
#include "lllineeditor.h"
+#include "llspinctrl.h"
#include "lltrans.h"
LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_id)
@@ -64,11 +65,18 @@ BOOL LLFloaterConversationPreview::postBuild()
std::string title = getString("Title", args);
setTitle(title);
- getChild<LLLineEditor>("description")->setValue(name);
-
LLLogChat::loadChatHistory(file, mMessages, true);
mCurrentPage = mMessages.size() / mPageSize;
+ mPageSpinner = getChild<LLSpinCtrl>("history_page_spin");
+ mPageSpinner->setCommitCallback(boost::bind(&LLFloaterConversationPreview::onMoreHistoryBtnClick, this));
+ mPageSpinner->setMinValue(1);
+ mPageSpinner->setMaxValue(mCurrentPage + 1);
+ mPageSpinner->set(mCurrentPage + 1);
+
+ std::string total_page_num = llformat("/ %d", mCurrentPage + 1);
+ getChild<LLTextBox>("page_num_label")->setValue(total_page_num);
+
return LLFloater::postBuild();
}
@@ -128,6 +136,7 @@ void LLFloaterConversationPreview::showHistory()
void LLFloaterConversationPreview::onMoreHistoryBtnClick()
{
+ mCurrentPage = (int)(mPageSpinner->getValueF32());
if (--mCurrentPage < 0)
{
return;