-rw-r--r-- | korganizer/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index ca53828..4194d12 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -1,106 +1,106 @@ | |||
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 | #endif | 14 | #endif |
15 | #include <qtextcodec.h> | 15 | #include <qtextcodec.h> |
16 | 16 | ||
17 | #include <qdir.h> | 17 | #include <qdir.h> |
18 | #include <kstandarddirs.h> | 18 | #include <kstandarddirs.h> |
19 | #include <kglobal.h> | 19 | #include <kglobal.h> |
20 | #include <stdio.h> | 20 | #include <stdio.h> |
21 | #include "mainwindow.h" | 21 | #include "mainwindow.h" |
22 | 22 | void dumpMissing(); | |
23 | int main( int argc, char **argv ) | 23 | int main( int argc, char **argv ) |
24 | { | 24 | { |
25 | #ifndef DESKTOP_VERSION | 25 | #ifndef DESKTOP_VERSION |
26 | QPEApplication a( argc, argv ); | 26 | QPEApplication a( argc, argv ); |
27 | a.setKeepRunning (); | 27 | a.setKeepRunning (); |
28 | #else | 28 | #else |
29 | QApplication a( argc, argv ); | 29 | QApplication a( argc, argv ); |
30 | QApplication::setStyle( new QPlatinumStyle ()); | 30 | QApplication::setStyle( new QPlatinumStyle ()); |
31 | QString hdir = QDir::homeDirPath(); | 31 | QString hdir = QDir::homeDirPath(); |
32 | // there is a bug when creating dirs for WIN 98 | 32 | // there is a bug when creating dirs for WIN 98 |
33 | // it is difficult to fix, because we have no WIN 98 runnung | 33 | // it is difficult to fix, because we have no WIN 98 runnung |
34 | // such that we try it to create the dirs at startup here | 34 | // such that we try it to create the dirs at startup here |
35 | if ( hdir == "C:\\" ) { // win 98 or ME | 35 | if ( hdir == "C:\\" ) { // win 98 or ME |
36 | QDir app_dir; | 36 | QDir app_dir; |
37 | if ( !app_dir.exists("C:\\kdepim") ) | 37 | if ( !app_dir.exists("C:\\kdepim") ) |
38 | app_dir.mkdir ("C:\\kdepim"); | 38 | app_dir.mkdir ("C:\\kdepim"); |
39 | if ( !app_dir.exists("C:\\kdepim\\apps") ) | 39 | if ( !app_dir.exists("C:\\kdepim\\apps") ) |
40 | app_dir.mkdir ("C:\\kdepim\\apps"); | 40 | app_dir.mkdir ("C:\\kdepim\\apps"); |
41 | if ( !app_dir.exists("C:\\kdepim\\config") ) | 41 | if ( !app_dir.exists("C:\\kdepim\\config") ) |
42 | app_dir.mkdir ("C:\\kdepim\\config"); | 42 | app_dir.mkdir ("C:\\kdepim\\config"); |
43 | if ( !app_dir.exists("C:\\kdepim\\apps\\korganizer") ) | 43 | if ( !app_dir.exists("C:\\kdepim\\apps\\korganizer") ) |
44 | app_dir.mkdir ("C:\\kdepim\\apps\\korganizer"); | 44 | app_dir.mkdir ("C:\\kdepim\\apps\\korganizer"); |
45 | } | 45 | } |
46 | #endif | 46 | #endif |
47 | bool exitHelp = false; | 47 | bool exitHelp = false; |
48 | if ( argc > 1 ) { | 48 | if ( argc > 1 ) { |
49 | QString command = argv[1]; | 49 | QString command = argv[1]; |
50 | if ( command == "-help" ){ | 50 | if ( command == "-help" ){ |
51 | printf("KO/Pi command line commands:\n"); | 51 | printf("KO/Pi command line commands:\n"); |
52 | printf(" no command: Start KO/Pi in usual way\n"); | 52 | printf(" no command: Start KO/Pi in usual way\n"); |
53 | printf(" -help: This output\n"); | 53 | printf(" -help: This output\n"); |
54 | printf("Next Option: Open or Show after start:\n"); | 54 | printf("Next Option: Open or Show after start:\n"); |
55 | printf(" -newTodo: New Todo dialog\n"); | 55 | printf(" -newTodo: New Todo dialog\n"); |
56 | printf(" -newEvent: New Event dialog\n"); | 56 | printf(" -newEvent: New Event dialog\n"); |
57 | printf(" -showList: List view\n"); | 57 | printf(" -showList: List view\n"); |
58 | printf(" -showDay: Day view\n"); | 58 | printf(" -showDay: Day view\n"); |
59 | printf(" -showWWeek: Work Week view\n"); | 59 | printf(" -showWWeek: Work Week view\n"); |
60 | printf(" -showWeek: Week view\n"); | 60 | printf(" -showWeek: Week view\n"); |
61 | printf(" -showTodo: Todo view\n"); | 61 | printf(" -showTodo: Todo view\n"); |
62 | printf(" -showJournal: Journal view\n"); | 62 | printf(" -showJournal: Journal view\n"); |
63 | printf(" -showKO: Next Days view\n"); | 63 | printf(" -showKO: Next Days view\n"); |
64 | printf(" -showWNext: What's Next view\n"); | 64 | printf(" -showWNext: What's Next view\n"); |
65 | printf(" -showNextXView: Next X View\n"); | 65 | printf(" -showNextXView: Next X View\n"); |
66 | printf(" -new[Y] and -show[X] may be used togehther\n"); | 66 | printf(" -new[Y] and -show[X] may be used togehther\n"); |
67 | printf(" KO/Pi is exiting now. Bye!\n"); | 67 | printf(" KO/Pi is exiting now. Bye!\n"); |
68 | exitHelp = true; | 68 | exitHelp = true; |
69 | } | 69 | } |
70 | } | 70 | } |
71 | if ( ! exitHelp ) { | 71 | if ( ! exitHelp ) { |
72 | KGlobal::setAppName( "korganizer" ); | 72 | KGlobal::setAppName( "korganizer" ); |
73 | QString fileName ; | 73 | QString fileName ; |
74 | #ifndef DESKTOP_VERSION | 74 | #ifndef DESKTOP_VERSION |
75 | fileName = getenv("QPEDIR"); | 75 | fileName = getenv("QPEDIR"); |
76 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); | 76 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); |
77 | #else | 77 | #else |
78 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | 78 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; |
79 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 79 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
80 | #endif | 80 | #endif |
81 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); | 81 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); |
82 | MainWindow m; | 82 | MainWindow m; |
83 | #ifndef DESKTOP_VERSION | 83 | #ifndef DESKTOP_VERSION |
84 | 84 | ||
85 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 85 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
86 | a.showMainWidget(&m ); | 86 | a.showMainWidget(&m ); |
87 | #else | 87 | #else |
88 | a.setMainWidget(&m ); | 88 | a.setMainWidget(&m ); |
89 | m.show(); | 89 | m.show(); |
90 | //m.resize( 800, 600 ); | 90 | //m.resize( 800, 600 ); |
91 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 91 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
92 | #endif | 92 | #endif |
93 | if ( argc > 1 ) { | 93 | if ( argc > 1 ) { |
94 | QCString command = argv[1]; | 94 | QCString command = argv[1]; |
95 | if ( argc > 2 ) | 95 | if ( argc > 2 ) |
96 | command += argv[2]; | 96 | command += argv[2]; |
97 | qApp->processEvents(); | 97 | qApp->processEvents(); |
98 | m.recieve(command, QByteArray() ); | 98 | m.recieve(command, QByteArray() ); |
99 | 99 | ||
100 | } | 100 | } |
101 | 101 | ||
102 | a.exec(); | 102 | a.exec(); |
103 | 103 | dumpMissing(); | |
104 | } | 104 | } |
105 | qDebug("KO: Bye! "); | 105 | qDebug("KO: Bye! "); |
106 | } | 106 | } |