From e60cabc0ff8d09fd8e909c0a6bfd6c3bf6e910f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 31 May 2012 19:54:26 +0200 Subject: [PATCH] Disable OFX import for win32 --- src/model/Database.hpp | 4 ++++ src/model/import/OFXImportEngine.cpp | 5 +++++ src/model/import/OFXImportEngine.hpp | 4 ++++ src/view/SnapshotsDialog.cpp | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/model/Database.hpp b/src/model/Database.hpp index 413e532..639b993 100644 --- a/src/model/Database.hpp +++ b/src/model/Database.hpp @@ -92,7 +92,11 @@ public: Database(const char* filename, KissCount* kiss); +#ifdef WIN32 + static QString GetDatabaseHome() { return "./" BDD_PATH; } +#else static QString GetDatabaseHome() { return QDir::home().path() + BDD_PATH; } +#endif static QString GetDatabaseFile() { return QString(BDD_FILE); } std::list GetUsers(); diff --git a/src/model/import/OFXImportEngine.cpp b/src/model/import/OFXImportEngine.cpp index 782eacc..4fa40d5 100644 --- a/src/model/import/OFXImportEngine.cpp +++ b/src/model/import/OFXImportEngine.cpp @@ -16,6 +16,9 @@ You should have received a copy of the GNU General Public License along with KissCount. If not, see . */ + +#ifndef WIN32 + #include "../Database.hpp" #include @@ -159,3 +162,5 @@ bool OFXImportEngine::HandleFile(const QString& path, User* user, Database* db, return res; } + +#endif diff --git a/src/model/import/OFXImportEngine.hpp b/src/model/import/OFXImportEngine.hpp index f2f3018..4638231 100644 --- a/src/model/import/OFXImportEngine.hpp +++ b/src/model/import/OFXImportEngine.hpp @@ -20,6 +20,8 @@ #ifndef OFXIMPORTENGINE_H #define OFXIMPORTENGINE_H +#ifndef WIN32 + #include "ImportEngine.hpp" #include @@ -42,3 +44,5 @@ private: }; #endif + +#endif diff --git a/src/view/SnapshotsDialog.cpp b/src/view/SnapshotsDialog.cpp index 17fe3c8..45e7104 100644 --- a/src/view/SnapshotsDialog.cpp +++ b/src/view/SnapshotsDialog.cpp @@ -38,8 +38,8 @@ SnapshotsDialog::SnapshotsDialog(KissCount* kiss, wxUI *parent) : QDialog(0, Qt: hbox->addWidget(_snapshots); - QPushButton* buttonCreate = new QPushButton(_("Create snapshot")); - QPushButton* buttonDelete = new QPushButton(_("Delete snapshot")); + QPushButton* buttonCreate = new QPushButton(_("Create a snapshot")); + QPushButton* buttonDelete = new QPushButton(_("Delete a snapshot")); QPushButton* buttonBackTo = new QPushButton(_("Back to this snapshot")); connect(buttonCreate, SIGNAL(clicked()), this, SLOT(OnCreate()));