summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-01 12:50:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-01 21:33:36 +0300
commit1c04a68a1604bf59dd2c33195f9f3fb2207a91e2 (patch)
tree7f3dd777179a1e1585600ea40d7667a8d3d827a6
parenta1ca5e04b60902f84eb5da7d5e212ecf66d7f3e6 (diff)
downloadmv-1c04a68a1604bf59dd2c33195f9f3fb2207a91e2.tar.gz
mv-1c04a68a1604bf59dd2c33195f9f3fb2207a91e2.tar.bz2
mv-1c04a68a1604bf59dd2c33195f9f3fb2207a91e2.tar.xz
mv-1c04a68a1604bf59dd2c33195f9f3fb2207a91e2.zip
remove log to chat from logger.
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/game.cpp4
-rw-r--r--src/logger.cpp14
-rw-r--r--src/logger.h7
4 files changed, 0 insertions, 26 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 0b71b1db7..e0409bffb 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -182,7 +182,6 @@ DefaultsData* getConfigDefaults()
AddDEF("npcFont", "fonts/dejavusans.ttf");
AddDEF("showBackground", true);
AddDEF("enableTradeTab", true);
- AddDEF("logToChat", false);
AddDEF("cyclePlayers", true);
AddDEF("cycleMonsters", true);
AddDEF("cycleNPC", true);
diff --git a/src/game.cpp b/src/game.cpp
index 9b6b5a339..342aaf249 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -314,9 +314,6 @@ static void createGuiWindows()
gmChatTab = new GmTab(chatWindow);
}
- if (config.getBoolValue("logToChat"))
- logger->setChatWindow(chatWindow);
-
if (!isSafeMode && chatWindow)
chatWindow->loadState();
@@ -338,7 +335,6 @@ static void destroyGuiWindows()
{
Net::getGeneralHandler()->gameEnded();
- logger->setChatWindow(nullptr);
if (whoIsOnline)
whoIsOnline->setAllowUpdate(false);
diff --git a/src/logger.cpp b/src/logger.cpp
index a177b895e..953c9488b 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -25,10 +25,6 @@
#include <iostream>
#include <sstream>
-#ifdef ENABLEDEBUGLOG
-#include "gui/widgets/tabs/chattab.h"
-#endif
-
#ifdef WIN32
#include <windows.h>
#elif defined __APPLE__
@@ -67,7 +63,6 @@
Logger::Logger() :
mLogFile(),
mLogToStandardOut(true),
- mChatWindow(nullptr),
mDebugLog(false)
{
}
@@ -117,9 +112,6 @@ void Logger::dlog(const std::string &str)
if (mLogToStandardOut)
std::cout << timeStr.str() << str << std::endl;
-
- if (mChatWindow && debugChatTab)
- debugChatTab->chatLog(str, BY_LOGGER);
}
#endif
@@ -139,9 +131,6 @@ void Logger::log1(const char *const buf)
if (mLogToStandardOut)
std::cout << timeStr.str() << buf << std::endl;
-
- if (mChatWindow && debugChatTab)
- debugChatTab->chatLog(buf, BY_LOGGER);
}
void Logger::log(const char *const log_text, ...)
@@ -174,9 +163,6 @@ void Logger::log(const char *const log_text, ...)
if (mLogToStandardOut)
std::cout << timeStr.str() << buf << std::endl;
- if (mChatWindow && debugChatTab)
- debugChatTab->chatLog(buf, BY_LOGGER);
-
// Delete temporary buffer
delete [] buf;
}
diff --git a/src/logger.h b/src/logger.h
index 90c3a689f..71a194467 100644
--- a/src/logger.h
+++ b/src/logger.h
@@ -66,12 +66,6 @@ class Logger final
{ mLogToStandardOut = value; }
/**
- * Enables logging to chat window
- */
- void setChatWindow(ChatWindow *const window)
- { mChatWindow = window; }
-
- /**
* Enters a message in the log. The message will be timestamped.
*/
void log(const char *const log_text, ...)
@@ -120,7 +114,6 @@ class Logger final
private:
std::ofstream mLogFile;
bool mLogToStandardOut;
- ChatWindow *mChatWindow;
bool mDebugLog;
};