diff options
-rw-r--r-- | src/gui/widgets/chattab.cpp | 25 | ||||
-rw-r--r-- | src/gui/widgets/chattab.h | 2 |
2 files changed, 2 insertions, 25 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 5975684d..964c7eaf 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -46,8 +46,6 @@ #include <guichan/widgets/tabbedarea.hpp> -#define MAX_WORD_SIZE 50 - ChatTab::ChatTab(const std::string &name) { setCaption(name); @@ -226,12 +224,12 @@ void ChatTab::chatLog(std::string line, Own own, bool ignoreRecord) // at comparison. if (mScrollArea->getVerticalScrollAmount() >= mScrollArea->getVerticalMaxScroll()) { - addRow(line); + mTextOutput->addRow(line); mScrollArea->setVerticalScrollAmount(mScrollArea->getVerticalMaxScroll()); } else { - addRow(line); + mTextOutput->addRow(line); } mScrollArea->logic(); @@ -341,22 +339,3 @@ void ChatTab::saveToLogFile(std::string &msg) if (chatLogger) chatLogger->log(msg); } - -void ChatTab::addRow(std::string &line) -{ - std::string::size_type idx = 0; - - for (unsigned int f = 0; f < line.length(); f++) - { - if (line.at(f) == ' ') - { - idx = f; - } - else if (f - idx > MAX_WORD_SIZE) - { - line.insert(f, " "); - idx = f; - } - } - mTextOutput->addRow(line); -} diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h index 3d19a9ad..3e770fe1 100644 --- a/src/gui/widgets/chattab.h +++ b/src/gui/widgets/chattab.h @@ -129,8 +129,6 @@ class ChatTab : public Tab, public AutoCompleteLister, public EventListener */ void updateTextFormat(int alpha); - void addRow(std::string &line); - ScrollArea *mScrollArea; BrowserBox *mTextOutput; //Recorder *mRecorder; |