summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-27 11:28:29 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-27 11:50:58 -0700
commit4f0ef07e85f408ebc8f33e2c573737a4ac2d29e1 (patch)
tree5210877b5135f432179dd0a0b5ff9f0a5870e185 /src
parent2452f914c4997a49db34c30a9a6fb09ea5b7d958 (diff)
downloadmana-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')
-rw-r--r--src/client.cpp18
-rw-r--r--src/client.h4
2 files changed, 11 insertions, 11 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 =
diff --git a/src/client.h b/src/client.h
index db9ed3a9..934ba9d2 100644
--- a/src/client.h
+++ b/src/client.h
@@ -178,10 +178,10 @@ public:
void action(const gcn::ActionEvent &event);
private:
- void initHomeDir(const Options &options);
+ void initHomeDir();
void initConfiguration();
void initUpdatesDir();
- void initScreenshotDir(const std::string &dir);
+ void initScreenshotDir();
void accountLogin(LoginData *loginData);