diff options
author | Reid <reidyaro@gmail.com> | 2011-08-24 22:42:17 +0200 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2011-08-24 22:42:17 +0200 |
commit | 43c19a8321bd0c4bcf36655d74e895397aff7eea (patch) | |
tree | c8f7933367ae1e757a3166a04772274896d58c9c /src/gui/widgets/chattab.cpp | |
parent | c1ec2b921389cb5c44d9ae572ea4851891cf8bc9 (diff) | |
parent | 9505e3789cc9db6a10a68b9794a586604271b76f (diff) | |
download | manaplus-43c19a8321bd0c4bcf36655d74e895397aff7eea.tar.gz manaplus-43c19a8321bd0c4bcf36655d74e895397aff7eea.tar.bz2 manaplus-43c19a8321bd0c4bcf36655d74e895397aff7eea.tar.xz manaplus-43c19a8321bd0c4bcf36655d74e895397aff7eea.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/gui/widgets/chattab.cpp')
-rw-r--r-- | src/gui/widgets/chattab.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 42a39a20f..81c0d277f 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -23,11 +23,11 @@ #include "gui/widgets/chattab.h" #include "actorspritemanager.h" -#include "chatlog.h" +#include "chatlogger.h" #include "commandhandler.h" #include "configuration.h" #include "localplayer.h" -#include "log.h" +#include "logger.h" #include "sound.h" #include "gui/widgets/browserbox.h" @@ -249,12 +249,13 @@ void ChatTab::chatLog(std::string line, Own own, // We look if the Vertical Scroll Bar is set at the max before // adding a row, otherwise the max will always be a row higher // at comparison. - if (mScrollArea->getVerticalScrollAmount() >= + if (mScrollArea->getVerticalScrollAmount() + 2 >= mScrollArea->getVerticalMaxScroll()) { addRow(line); mScrollArea->setVerticalScrollAmount( mScrollArea->getVerticalMaxScroll()); + } else { @@ -282,9 +283,7 @@ void ChatTab::chatLog(std::string line, Own own, { if (player_node) { - std::string::size_type pos - = tmp.text.find(player_node->getName()); - if (pos != std::string::npos) + if (chatWindow && chatWindow->findHighlight(tmp.text)) setFlash(2); else setFlash(1); |