summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterconversationpreview.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-09-11 17:45:45 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2012-09-11 17:45:45 -0700
commit7b78e72bf148d20a402eadb8629bf15dc2f100a3 (patch)
tree4209d49b18635a5c58317268965641ce89f69287 /indra/newview/llfloaterconversationpreview.cpp
parentef39011f433d93ea72cf636d4c415b468f776a01 (diff)
parentcb8ce1141837cc450756764e03a4564f8ab0c9eb (diff)
merging in latest changes
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;