diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-02 01:21:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-02 01:21:01 +0300 |
commit | d4dd89e72f8b1e2c0517981f7e3ffac4a040f9fa (patch) | |
tree | 5d015150f676742ade0613f29c438079bbe223ca /src/gui | |
parent | 5628da8ff17266f9bf7d5830a5e32270be31afe4 (diff) | |
download | manaplus-d4dd89e72f8b1e2c0517981f7e3ffac4a040f9fa.tar.gz manaplus-d4dd89e72f8b1e2c0517981f7e3ffac4a040f9fa.tar.bz2 manaplus-d4dd89e72f8b1e2c0517981f7e3ffac4a040f9fa.tar.xz manaplus-d4dd89e72f8b1e2c0517981f7e3ffac4a040f9fa.zip |
Add hasRows to chattab class.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/chatwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.h | 3 | ||||
-rw-r--r-- | src/gui/widgets/chattab.h | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 1829a55ba..0d45590ba 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -718,7 +718,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) mChatInput->isVisible()) { ChatTab *tab = getFocused(); - if (tab && (unsigned)tab->getRows().size() > 0) + if (tab && tab->hasRows()) { if (!mChatHistoryIndex) { @@ -750,7 +750,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) mChatInput->isVisible()) { ChatTab *tab = getFocused(); - if (tab && !tab->getRows().empty()) + if (tab && tab->hasRows()) { if (mChatHistoryIndex + 1 < tab->getRows().size()) { diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index 2bdf31237..6fdb40042 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -185,6 +185,9 @@ class BrowserBox : public gcn::Widget, TextRows &getRows() { return mTextRows; } + bool hasRows() + { return !mTextRows.empty(); } + void setAlwaysUpdate(bool n) { mAlwaysUpdate = n; } diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h index 45e27797d..5cbb71d79 100644 --- a/src/gui/widgets/chattab.h +++ b/src/gui/widgets/chattab.h @@ -139,6 +139,9 @@ class ChatTab : public Tab std::list<std::string> &getRows() { return mTextOutput->getRows(); } + bool hasRows() + { return mTextOutput->hasRows(); } + void loadFromLogFile(std::string name); bool getAllowHighlight() |