-rw-r--r-- | korganizer/main.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index a357988..69ef294 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -54,35 +54,13 @@ int main( int argc, char **argv ) | |||
54 | if ( ! exitHelp ) { | 54 | if ( ! exitHelp ) { |
55 | KGlobal::setAppName( "korganizer" ); | 55 | KGlobal::setAppName( "korganizer" ); |
56 | |||
57 | |||
58 | QString fileName ; | 56 | QString fileName ; |
59 | #ifndef DESKTOP_VERSION | 57 | #ifndef DESKTOP_VERSION |
60 | QString appdir = QDir::homeDirPath() + "/kdepim/apps/" + KGlobal::getAppName(); | ||
61 | KStandardDirs::setAppDir( appdir ); | ||
62 | |||
63 | fileName = getenv("QPEDIR"); | 58 | fileName = getenv("QPEDIR"); |
64 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); | 59 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); |
65 | #else | 60 | #else |
66 | |||
67 | #ifndef _WIN32_ | ||
68 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | 61 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; |
69 | #else | 62 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
70 | fileName = qApp->applicationDirPath () + "\\kdepim\\korganizer\\"; | ||
71 | #endif | ||
72 | |||
73 | KGlobal::iconLoader()->setIconPath(fileName); | ||
74 | |||
75 | QString appdir = QDir::homeDirPath(); | ||
76 | //appdir = "C:\\"; | ||
77 | if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) | ||
78 | appdir += "korganizer"; | ||
79 | else | ||
80 | appdir += "/korganizer"; | ||
81 | KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); | ||
82 | // qDebug(" %s ",KStandardDirs::appDir().latin1() ); | ||
83 | #endif | 63 | #endif |
84 | QDir app_dir; | 64 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); |
85 | if ( !app_dir.exists(KStandardDirs::appDir()) ) | ||
86 | app_dir.mkdir (KStandardDirs::appDir()); | ||
87 | MainWindow m; | 65 | MainWindow m; |
88 | #ifndef DESKTOP_VERSION | 66 | #ifndef DESKTOP_VERSION |