summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-11 21:25:16 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-11 23:43:48 +0300
commit44e80c70513022b6c378f64d6bf5d25dda7b0e7f (patch)
treeacbdb6be0ba4377d908c017f593832589acb444f /src/gui/chatwindow.cpp
parent69c4bf1494b19ca3b3333effff83086b0f0b87fd (diff)
downloadmv-44e80c70513022b6c378f64d6bf5d25dda7b0e7f.tar.gz
mv-44e80c70513022b6c378f64d6bf5d25dda7b0e7f.tar.bz2
mv-44e80c70513022b6c378f64d6bf5d25dda7b0e7f.tar.xz
mv-44e80c70513022b6c378f64d6bf5d25dda7b0e7f.zip
Fix saving opened tabs state.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index c266374ef..1ef3139db 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -215,6 +215,7 @@ ChatWindow::ChatWindow():
ChatWindow::~ChatWindow()
{
+ saveState();
config.setValue("ReturnToggles", mReturnToggles);
removeAllWhispers();
delete mItemLinkHandler;
@@ -935,7 +936,11 @@ void ChatWindow::whisper(const std::string &nick,
if (i != mWhispers.end())
tab = i->second;
else if (config.getBoolValue("whispertab"))
+ {
tab = addWhisperTab(nick);
+ if (tab)
+ saveState();
+ }
if (tab)
{
@@ -1414,15 +1419,6 @@ void ChatWindow::loadState()
tab->setRemoveNames((flags & 2) / 2);
tab->setNoAway((flags & 4) / 4);
}
- serverConfig.deleteKey("chatWhisper" + toString(num));
- serverConfig.deleteKey("chatWhisperFlags" + toString(num));
- num ++;
- }
-
- while (num < 50)
- {
- serverConfig.deleteKey("chatWhisper" + toString(num));
- serverConfig.deleteKey("chatWhisperFlags" + toString(num));
num ++;
}
}