author | zautrix <zautrix> | 2004-07-03 16:49:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:49:55 (UTC) |
commit | 1da48d95d970233f0d1ea9a7fba5c98cfcf24798 (patch) (unidiff) | |
tree | ae690b33cbe50291a610842e24de33f9d766f2f2 /korganizer/main.cpp | |
parent | e3b89230f065c48c84b48c88edb6eb088374c487 (diff) | |
download | kdepimpi-1da48d95d970233f0d1ea9a7fba5c98cfcf24798.zip kdepimpi-1da48d95d970233f0d1ea9a7fba5c98cfcf24798.tar.gz kdepimpi-1da48d95d970233f0d1ea9a7fba5c98cfcf24798.tar.bz2 |
Alarm Bugfix. Added connection to KM. Cleaned up main.
-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 | |||
@@ -48,48 +48,26 @@ int main( int argc, char **argv ) | |||
48 | printf(" -showNextXView: Next X View\n"); | 48 | printf(" -showNextXView: Next X View\n"); |
49 | printf(" -new[Y] and -show[X] may be used togehther\n"); | 49 | printf(" -new[Y] and -show[X] may be used togehther\n"); |
50 | printf(" KO/Pi is exiting now. Bye!\n"); | 50 | printf(" KO/Pi is exiting now. Bye!\n"); |
51 | exitHelp = true; | 51 | exitHelp = true; |
52 | } | 52 | } |
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 ); |
91 | #else | 69 | #else |
92 | a.setMainWidget(&m ); | 70 | a.setMainWidget(&m ); |
93 | m.show(); | 71 | m.show(); |
94 | //m.resize( 800, 600 ); | 72 | //m.resize( 800, 600 ); |
95 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 73 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |