author | Michael Krelin <hacker@klever.net> | 2007-07-10 22:34:31 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-10 22:34:31 (UTC) |
commit | 8822b171906831b7de71e24f66ca2b07bc3ef92e (patch) (unidiff) | |
tree | 31c36a1390b3b557969568ca82f211c094d7e689 | |
parent | 399974b248bf037ff8da6b91d74208acfcde779c (diff) | |
download | kdepimpi-8822b171906831b7de71e24f66ca2b07bc3ef92e.zip kdepimpi-8822b171906831b7de71e24f66ca2b07bc3ef92e.tar.gz kdepimpi-8822b171906831b7de71e24f66ca2b07bc3ef92e.tar.bz2 |
korganizer: make it look into proper locations
-rw-r--r-- | korganizer/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 211fde6..04fb234 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -23,12 +23,13 @@ | |||
23 | #include <libkdepim/kpimglobalprefs.h> | 23 | #include <libkdepim/kpimglobalprefs.h> |
24 | void dumpMissing(); | 24 | void dumpMissing(); |
25 | 25 | ||
26 | 26 | ||
27 | int main( int argc, char **argv ) | 27 | int main( int argc, char **argv ) |
28 | { | 28 | { |
29 | if(!getenv("KDEPIMPIDIR")) putenv("KDEPIMPIDIR=/usr/lib/kdepimpi"); | ||
29 | if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); | 30 | if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); |
30 | #ifndef DESKTOP_VERSION | 31 | #ifndef DESKTOP_VERSION |
31 | QPEApplication a( argc, argv ); | 32 | QPEApplication a( argc, argv ); |
32 | a.setKeepRunning (); | 33 | a.setKeepRunning (); |
33 | #else | 34 | #else |
34 | QApplication a( argc, argv ); | 35 | QApplication a( argc, argv ); |
@@ -76,13 +77,17 @@ int main( int argc, char **argv ) | |||
76 | KGlobal::setAppName( "korganizer" ); | 77 | KGlobal::setAppName( "korganizer" ); |
77 | QString fileName ; | 78 | QString fileName ; |
78 | #ifndef DESKTOP_VERSION | 79 | #ifndef DESKTOP_VERSION |
79 | fileName = getenv("QPEDIR"); | 80 | fileName = getenv("QPEDIR"); |
80 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); | 81 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); |
81 | #else | 82 | #else |
82 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | 83 | const char *kpd = ::getenv("KDEPIMPIDIR"); |
84 | if(kpd) | ||
85 | fileName = QString(kpd) + "/korganizer/"; | ||
86 | else | ||
87 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | ||
83 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 88 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
84 | #endif | 89 | #endif |
85 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); | 90 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); |
86 | 91 | ||
87 | QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); | 92 | QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); |
88 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 93 | KPimGlobalPrefs::instance()->setGlobalConfig(); |