diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-27 11:28:29 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-27 11:50:58 -0700 |
commit | 4f0ef07e85f408ebc8f33e2c573737a4ac2d29e1 (patch) | |
tree | 5210877b5135f432179dd0a0b5ff9f0a5870e185 /src/client.cpp | |
parent | 2452f914c4997a49db34c30a9a6fb09ea5b7d958 (diff) | |
download | mana-4f0ef07e85f408ebc8f33e2c573737a4ac2d29e1.tar.gz mana-4f0ef07e85f408ebc8f33e2c573737a4ac2d29e1.tar.bz2 mana-4f0ef07e85f408ebc8f33e2c573737a4ac2d29e1.tar.xz mana-4f0ef07e85f408ebc8f33e2c573737a4ac2d29e1.zip |
Some cleanup and compile fix
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client.cpp b/src/client.cpp index c4a4dd63..8005a3ff 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -214,7 +214,7 @@ Client::Client(const Options &options): branding.init(options.brandingPath); } - initHomeDir(options); + initHomeDir(); // Configure logger logger->setLogFile(mLocalDataDir + std::string("/mana.log")); @@ -222,8 +222,8 @@ Client::Client(const Options &options): // Log the mana version logger->log("Mana %s", FULL_VERSION); - initConfiguration(options); - initScreenshotDir(options.screenshotDir); + initConfiguration(); + initScreenshotDir(); logger->setLogToStandardOut(config.getValue("logToStandardOut", 0)); @@ -959,9 +959,9 @@ void Client::action(const gcn::ActionEvent &event) * Initializes the home directory. On UNIX and FreeBSD, ~/.mana is used. On * Windows and other systems we use the current working directory. */ -void Client::initHomeDir(const Options &options) +void Client::initHomeDir() { - mLocalDataDir = options.localDataDir; + mLocalDataDir = mOptions.localDataDir; if (mLocalDataDir.empty()) { @@ -987,7 +987,7 @@ void Client::initHomeDir(const Options &options) "Exiting."), mLocalDataDir.c_str())); } - mConfigDir = options.configDir; + mConfigDir = mOptions.configDir; if (mConfigDir.empty()){ #ifdef __APPLE__ @@ -1147,10 +1147,10 @@ void Client::initUpdatesDir() } } -void Client::initScreenshotDir(const std::string &dir) +void Client::initScreenshotDir() { - if (!dir.empty()) - mScreenshotDir = dir; + if (!mOptions.screenshotDir.empty()) + mScreenshotDir = mOptions.screenshotDir; else { std::string configScreenshotDir = |