-rw-r--r-- | korganizer/main.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index a357988..69ef294 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -53,38 +53,16 @@ int main( int argc, char **argv ) | |||
53 | } | 53 | } |
54 | if ( ! exitHelp ) { | 54 | if ( ! exitHelp ) { |
55 | KGlobal::setAppName( "korganizer" ); | 55 | KGlobal::setAppName( "korganizer" ); |
56 | 56 | QString fileName ; | |
57 | |||
58 | 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 | 61 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | |
67 | #ifndef _WIN32_ | 62 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
68 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | ||
69 | #else | ||
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()) ) | 65 | MainWindow m; |
86 | app_dir.mkdir (KStandardDirs::appDir()); | ||
87 | MainWindow m; | ||
88 | #ifndef DESKTOP_VERSION | 66 | #ifndef DESKTOP_VERSION |
89 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 67 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
90 | a.showMainWidget(&m ); | 68 | a.showMainWidget(&m ); |