diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2012-09-06 23:34:47 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2012-09-06 23:34:47 +0300 |
commit | 62eb7ec0301c0313cedc2fcb63df8779b22a6d26 (patch) | |
tree | 51ab2e59ee516e630ff17227f0c69f67ed34de29 /indra/newview/llfloaterconversationpreview.cpp | |
parent | 973f54ace7706c6e3b12cc3364b4c7ffb1b841c9 (diff) |
CHUI-318 FIXED (User cannot navigate forward in chat history viewer once the More History option is selected.)
- Added spinner so that user could select desired history page. Also displaying total count of pages.
Diffstat (limited to 'indra/newview/llfloaterconversationpreview.cpp')
-rw-r--r-- | indra/newview/llfloaterconversationpreview.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 7083fb987d..c9d9d7aa3b 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) @@ -69,6 +70,15 @@ BOOL LLFloaterConversationPreview::postBuild() 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 +138,7 @@ void LLFloaterConversationPreview::showHistory() void LLFloaterConversationPreview::onMoreHistoryBtnClick() { + mCurrentPage = mPageSpinner->getValueF32(); if (--mCurrentPage < 0) { return; |