-rw-r--r-- | korganizer/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index ee9589c..2bf46b9 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -1,72 +1,74 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #ifndef DESKTOP_VERSION | 3 | #ifndef DESKTOP_VERSION |
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qcopchannel_qws.h> | 5 | #include <qcopchannel_qws.h> |
6 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #else | 8 | #else |
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qstring.h> | 10 | #include <qstring.h> |
11 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
12 | #include <qplatinumstyle.h> | 12 | #include <qplatinumstyle.h> |
13 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
14 | #include <stdlib.h> | 14 | #include <stdlib.h> |
15 | #endif | 15 | #endif |
16 | #include <qtextcodec.h> | 16 | #include <qtextcodec.h> |
17 | 17 | ||
18 | #include <qdir.h> | 18 | #include <qdir.h> |
19 | #include <kstandarddirs.h> | 19 | #include <kstandarddirs.h> |
20 | #include <kglobal.h> | 20 | #include <kglobal.h> |
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | #include "mainwindow.h" | 22 | #include "mainwindow.h" |
23 | #include <libkdepim/kpimglobalprefs.h> | 23 | #include <libkdepim/kpimglobalprefs.h> |
24 | void dumpMissing(); | 24 | void dumpMissing(); |
25 | |||
26 | |||
25 | int main( int argc, char **argv ) | 27 | int main( int argc, char **argv ) |
26 | { | 28 | { |
27 | #ifndef DESKTOP_VERSION | 29 | #ifndef DESKTOP_VERSION |
28 | QPEApplication a( argc, argv ); | 30 | QPEApplication a( argc, argv ); |
29 | a.setKeepRunning (); | 31 | a.setKeepRunning (); |
30 | #else | 32 | #else |
31 | QApplication a( argc, argv ); | 33 | QApplication a( argc, argv ); |
32 | QApplication::setStyle( new QPlatinumStyle ()); | 34 | QApplication::setStyle( new QPlatinumStyle ()); |
33 | #ifdef _WIN32_ | 35 | #ifdef _WIN32_ |
34 | QString hdir ( getenv( "HOME") ); | 36 | QString hdir ( getenv( "HOME") ); |
35 | if ( hdir.isEmpty() ) { | 37 | if ( hdir.isEmpty() ) { |
36 | QString hd ("C:/" ); | 38 | QString hd ("C:/" ); |
37 | //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); | 39 | //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); |
38 | if ( QDir::homeDirPath().lower() == hd.lower() ) { | 40 | if ( QDir::homeDirPath().lower() == hd.lower() ) { |
39 | _putenv( "HOME=C:"); | 41 | _putenv( "HOME=C:"); |
40 | //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); | 42 | //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); |
41 | } | 43 | } |
42 | } else { | 44 | } else { |
43 | QDir app_dir; | 45 | QDir app_dir; |
44 | if ( !app_dir.exists(hdir) ) | 46 | if ( !app_dir.exists(hdir) ) |
45 | app_dir.mkdir (hdir); | 47 | app_dir.mkdir (hdir); |
46 | } | 48 | } |
47 | #endif | 49 | #endif |
48 | #endif | 50 | #endif |
49 | bool exitHelp = false; | 51 | bool exitHelp = false; |
50 | if ( argc > 1 ) { | 52 | if ( argc > 1 ) { |
51 | QString command = argv[1]; | 53 | QString command = argv[1]; |
52 | if ( command == "-help" ){ | 54 | if ( command == "-help" ){ |
53 | printf("KO/Pi command line commands:\n"); | 55 | printf("KO/Pi command line commands:\n"); |
54 | printf(" no command: Start KO/Pi in usual way\n"); | 56 | printf(" no command: Start KO/Pi in usual way\n"); |
55 | printf(" -help: This output\n"); | 57 | printf(" -help: This output\n"); |
56 | printf("Next Option: Open or Show after start:\n"); | 58 | printf("Next Option: Open or Show after start:\n"); |
57 | printf(" -newTodo: New Todo dialog\n"); | 59 | printf(" -newTodo: New Todo dialog\n"); |
58 | printf(" -newEvent: New Event dialog\n"); | 60 | printf(" -newEvent: New Event dialog\n"); |
59 | printf(" -showList: List view\n"); | 61 | printf(" -showList: List view\n"); |
60 | printf(" -showDay: Day view\n"); | 62 | printf(" -showDay: Day view\n"); |
61 | printf(" -showWWeek: Work Week view\n"); | 63 | printf(" -showWWeek: Work Week view\n"); |
62 | printf(" -showWeek: Week view\n"); | 64 | printf(" -showWeek: Week view\n"); |
63 | printf(" -showTodo: Todo view\n"); | 65 | printf(" -showTodo: Todo view\n"); |
64 | printf(" -showJournal: Journal view\n"); | 66 | printf(" -showJournal: Journal view\n"); |
65 | printf(" -showKO: Next Days view\n"); | 67 | printf(" -showKO: Next Days view\n"); |
66 | printf(" -showWNext: What's Next view\n"); | 68 | printf(" -showWNext: What's Next view\n"); |
67 | printf(" -showNextXView: Next X View\n"); | 69 | printf(" -showNextXView: Next X View\n"); |
68 | printf(" -new[Y] and -show[X] may be used togehther\n"); | 70 | printf(" -new[Y] and -show[X] may be used togehther\n"); |
69 | printf(" KO/Pi is exiting now. Bye!\n"); | 71 | printf(" KO/Pi is exiting now. Bye!\n"); |
70 | exitHelp = true; | 72 | exitHelp = true; |
71 | } | 73 | } |
72 | } | 74 | } |