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) (side-by-side diff) | |
tree | 31c36a1390b3b557969568ca82f211c094d7e689 /korganizer/main.cpp | |
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 @@ -21,16 +21,17 @@ #include <stdio.h> #include "mainwindow.h" #include <libkdepim/kpimglobalprefs.h> void dumpMissing(); int main( int argc, char **argv ) { + if(!getenv("KDEPIMPIDIR")) putenv("KDEPIMPIDIR=/usr/lib/kdepimpi"); if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); a.setKeepRunning (); #else QApplication a( argc, argv ); #ifdef _WIN32_ QString hdir ( getenv( "HOME") ); @@ -74,17 +75,21 @@ int main( int argc, char **argv ) } if ( ! exitHelp ) { KGlobal::setAppName( "korganizer" ); QString fileName ; #ifndef DESKTOP_VERSION fileName = getenv("QPEDIR"); KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); #else - fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; + const char *kpd = ::getenv("KDEPIMPIDIR"); + if(kpd) + fileName = QString(kpd) + "/korganizer/"; + else + fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); KPimGlobalPrefs::instance()->setGlobalConfig(); MainWindow m; #ifndef DESKTOP_VERSION |