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 | |
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')
-rw-r--r-- | indra/newview/llfloaterconversationpreview.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterconversationpreview.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_conversation_preview.xml | 36 |
3 files changed, 43 insertions, 7 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; diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h index 2246a44761..0341e5d2a0 100644 --- a/indra/newview/llfloaterconversationpreview.h +++ b/indra/newview/llfloaterconversationpreview.h @@ -29,6 +29,8 @@ #include "llchathistory.h" #include "llfloater.h" +class LLSpinCtrl; + class LLFloaterConversationPreview : public LLFloater { public: @@ -45,6 +47,7 @@ private: void onMoreHistoryBtnClick(); void showHistory(); + LLSpinCtrl* mPageSpinner; LLChatHistory* mChatHistory; LLUUID mSessionID; int mCurrentPage; diff --git a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml index 28ba03ebe9..d74c2c252d 100644 --- a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml @@ -51,14 +51,36 @@ left="5" width="390"> </chat_history> - <button + <text follows="bottom|right" + font="SansSerif" height="22" layout="topleft" - name="more_history" - label="More history..." - right="-15" - top_pad="5" - width="100"> - </button> + name="page_label" + right="-110" + top_pad="7" + value="Page" + width="35"> + </text> + <spinner + decimal_digits="0" + follows="bottom|right" + height="23" + increment="1" + label_width="40" + layout="topleft" + left_pad="0" + name="history_page_spin" + top_delta="-3" + width="50"/> + <text + follows="bottom|right" + font="SandSerif" + height="22" + layout="topleft" + name="page_num_label" + left_pad="5" + top_delta="4" + width="40"> + </text> </floater> |