Commit 7a414764 authored by Jan Möbius's avatar Jan Möbius

Added Option for Translation Dir

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6696 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7651a834
......@@ -248,6 +248,14 @@ void Core::setupOptions() {
#endif
tempDir.cd("Icons");
OpenFlipper::Options::iconDir(tempDir.absolutePath());
// Set the Path to the translations
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Translations");
OpenFlipper::Options::fontsDir(tempDir.absolutePath());
// Set the Path to the Fonts
tempDir = QDir(OpenFlipper::Options::applicationDir());
......
......@@ -76,6 +76,9 @@ static QDir iconDir_;
/// Stores the OpenFlipper Icon
static QIcon* OpenFlipperIcon_ = 0;
/// Stores the Path to the translation files
static QDir translationsDir_;
/// Stores the Path to the Fonts
static QDir fontsDir_;
......@@ -296,6 +299,7 @@ QDir textureDir() { return textureDir_; }
QDir licenseDir() { return licenseDir_; }
QDir scriptDir() { return scriptDir_; }
QDir iconDir() { return iconDir_; }
QDir translationsDir() { return translationsDir_; }
QDir fontsDir() { return fontsDir_; }
QDir helpDir() { return helpDir_; }
QDir dataDir() { return dataDir_; }
......@@ -309,11 +313,12 @@ QString pluginDirStr() { return pluginDir_.absolutePath(); }
QString shaderDirStr() { return shaderDir_.absolutePath(); }
QString textureDirStr() { return textureDir_.absolutePath(); }
QString licenseDirStr() { return licenseDir_.absolutePath(); }
QString scriptDirStr() { return scriptDir_.absolutePath(); }
QString scriptDirStr() { return scriptDir_.absolutePath(); }
QString iconDirStr() { return iconDir_.absolutePath(); }
QString translationsDirStr() { return translationsDir_.absolutePath(); }
QString fontsDirStr() { return fontsDir_.absolutePath(); }
QString helpDirStr() { return helpDir_.absolutePath(); }
QString dataDirStr() { return dataDir_.absolutePath(); }
QString helpDirStr() { return helpDir_.absolutePath(); }
QString dataDirStr() { return dataDir_.absolutePath(); }
QString currentDirStr() { return currentDir_.absolutePath(); }
QString currentScriptDirStr() { return currentScriptDir_.absolutePath(); }
QString currentTextureDirStr() { return currentTextureDir_.absolutePath(); }
......@@ -327,9 +332,10 @@ void textureDir(QDir _dir) { textureDir_ = _dir; }
void licenseDir(QDir _dir) { licenseDir_ = _dir; }
void scriptDir(QDir _dir) { scriptDir_ = _dir; }
void iconDir(QDir _dir) { iconDir_ = _dir; }
void fontsDir(QDir _dir) { fontsDir_ = _dir;}
void helpDir(QDir _dir) { helpDir_ = _dir;}
void dataDir(QDir _dir) { dataDir_ = _dir;}
void tanslationsDir(QDir _dir) { translationsDir_ = _dir; }
void fontsDir(QDir _dir) { fontsDir_ = _dir; }
void helpDir(QDir _dir) { helpDir_ = _dir; }
void dataDir(QDir _dir) { dataDir_ = _dir; }
void configDir(QDir _dir) { configDir_ = _dir; }
void currentDir(QDir _dir) { currentDir_ = _dir; }
void currentScriptDir(QDir _dir) { currentScriptDir_ = _dir; }
......@@ -421,6 +427,16 @@ QIcon& OpenFlipperIcon() {
return *OpenFlipperIcon_;
}
bool translationsDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
translationsDir_ = tmp;
return true;
}
return false;
}
bool fontsDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
......
......@@ -84,6 +84,10 @@ QDir shaderDir();
DLLEXPORT
QDir iconDir();
/// Returns the Path to the translation files
DLLEXPORT
QDir translationsDir();
/// Returns the Path to Fonts
DLLEXPORT
QDir fontsDir();
......@@ -128,6 +132,10 @@ QString dataDirStr();
DLLEXPORT
QIcon& OpenFlipperIcon();
/// Returns the Path to the translation files
DLLEXPORT
QString translationsDirStr();
/// Returns the Path to Fonts
DLLEXPORT
QString fontsDirStr();
......@@ -164,6 +172,10 @@ void scriptDir( QDir _dir);
DLLEXPORT
void iconDir(QDir _dir);
/// Sets the Path to the translation files
DLLEXPORT
void translationsDir( QDir _dir);
/// Sets the Path to the Fonts
DLLEXPORT
void fontsDir(QDir _dir);
......@@ -204,6 +216,10 @@ bool scriptDir(QString _dir);
DLLEXPORT
bool iconDir(QString _dir);
/// Sets the Path to the translation files
DLLEXPORT
bool translationsDir(QString _dir);
/// Sets the Path to the Fonts
DLLEXPORT
void fontsDir(QDir _dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment