Commit 3e0f9466 authored by Jan Möbius's avatar Jan Möbius
Browse files

Branding for name and paths in Globaloptions added



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16987 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f49832e4
...@@ -59,10 +59,6 @@ ...@@ -59,10 +59,6 @@
#include <QDir> #include <QDir>
#include <QCoreApplication> #include <QCoreApplication>
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
namespace OpenFlipper { namespace OpenFlipper {
namespace Options { namespace Options {
...@@ -163,7 +159,7 @@ static bool drawModesInContextMenu_ = true; ...@@ -163,7 +159,7 @@ static bool drawModesInContextMenu_ = true;
/// Current view mode /// Current view mode
static QString currentViewMode_ = ""; static QString currentViewMode_ = "";
static QString title_ = "OpenFlipper v?"; static QString title_ = TOSTRING(PRODUCT_NAME)" v?";
/// default base color /// default base color
static QColor defaultColor_ = QColor("white"); static QColor defaultColor_ = QColor("white");
...@@ -746,6 +742,8 @@ QString coreVersion() { ...@@ -746,6 +742,8 @@ QString coreVersion() {
return QString(CORE_VERSION); return QString(CORE_VERSION);
} }
static const char * const CONFIG_DIR = "." TOSTRING(PRODUCT_STRING);
bool initializeSettings() { bool initializeSettings() {
#if defined(__INTEL_COMPILER) #if defined(__INTEL_COMPILER)
...@@ -786,11 +784,11 @@ bool initializeSettings() { ...@@ -786,11 +784,11 @@ bool initializeSettings() {
} }
#else #else
configDir_ = QDir::home(); configDir_ = QDir::home();
if ( ! configDir_.cd(".OpenFlipper") ) { if ( ! configDir_.cd(CONFIG_DIR) ) {
std::cerr << "Creating config Dir ~/.OpenFlipper" << std::endl;; std::cerr << "Creating config Dir ~/" << CONFIG_DIR << std::endl;;
configDir_.mkdir(".OpenFlipper"); configDir_.mkdir(CONFIG_DIR);
if ( ! configDir_.cd(".OpenFlipper") ) { if ( ! configDir_.cd(CONFIG_DIR) ) {
std::cerr << "Unable to create config dir ~/.OpenFlipper" << std::endl; std::cerr << "Unable to create config dir ~/" << CONFIG_DIR << std::endl;
return false; return false;
} }
} }
...@@ -819,7 +817,7 @@ bool initializeSettings() { ...@@ -819,7 +817,7 @@ bool initializeSettings() {
// Create a personal Icon cache dir to save for example user added icons // Create a personal Icon cache dir to save for example user added icons
if ( ! configDir_.exists("Icons") ){ if ( ! configDir_.exists("Icons") ){
configDir_.mkdir("Icons"); configDir_.mkdir("Icons");
std::cerr << "Creating Icon Cache Dir ~/.OpenFlipper/Icons" << std::endl; std::cerr << "Creating Icon Cache Dir ~/" << CONFIG_DIR << "/Icons" << std::endl;
} }
//================================================================================================== //==================================================================================================
......
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