summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/whispertab.cpp19
-rw-r--r--src/gui/widgets/whispertab.h6
3 files changed, 24 insertions, 3 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index b54b3d945..805922b2b 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -397,7 +397,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
{
if (ava->getType() == AVATAR_PLAYER && chatWindow)
{
- const ChatTab *const tab = chatWindow->addWhisperTab(
+ const WhisperTab *const tab = chatWindow->addWhisperTab(
model->getAvatarAt(selected)->getName(), true);
if (chatWindow && tab)
chatWindow->saveState();
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index ae034d8d2..cc4db6a87 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -39,7 +39,7 @@ WhisperTab::WhisperTab(const std::string &nick) :
ChatTab(nick),
mNick(nick)
{
- setTabColor(&Theme::getThemeColor(Theme::WHISPER_TAB));
+ setWhisperTabColors();
}
WhisperTab::~WhisperTab()
@@ -168,3 +168,20 @@ void WhisperTab::getAutoCompleteList(StringVect &names) const
{
names.push_back(mNick);
}
+
+void WhisperTab::setWhisperTabColors()
+{
+ setTabColor(&Theme::getThemeColor(Theme::WHISPER_TAB));
+ setHighlightedTabColor(&Theme::getThemeColor(
+ Theme::WHISPER_TAB_HIGHLIGHTED));
+ setSelectedTabColor(&Theme::getThemeColor(Theme::WHISPER_TAB_SELECTED));
+}
+
+void WhisperTab::setWhisperTabOfflineColors()
+{
+ setTabColor(&Theme::getThemeColor(Theme::WHISPER_TAB_OFFLINE));
+ setHighlightedTabColor(&Theme::getThemeColor(
+ Theme::WHISPER_TAB_OFFLINE_HIGHLIGHTED));
+ setSelectedTabColor(&Theme::getThemeColor(
+ Theme::WHISPER_TAB_OFFLINE_SELECTED));
+}
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 85c670db1..eec66768c 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -23,7 +23,7 @@
#ifndef WHISPERTAB_H
#define WHISPERTAB_H
-#include "chattab.h"
+#include "gui/widgets/chattab.h"
class Channel;
@@ -46,6 +46,10 @@ class WhisperTab : public ChatTab
void saveToLogFile(std::string &msg);
+ void setWhisperTabColors();
+
+ void setWhisperTabOfflineColors();
+
protected:
friend class ChatWindow;