summaryrefslogtreecommitdiffabout
path: root/korganizer/main.cpp
Unidiff
Diffstat (limited to 'korganizer/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4b207d9..ee9589c 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -60,48 +60,50 @@ int main( int argc, char **argv )
60 printf(" -showDay: Day view\n"); 60 printf(" -showDay: Day view\n");
61 printf(" -showWWeek: Work Week view\n"); 61 printf(" -showWWeek: Work Week view\n");
62 printf(" -showWeek: Week view\n"); 62 printf(" -showWeek: Week view\n");
63 printf(" -showTodo: Todo view\n"); 63 printf(" -showTodo: Todo view\n");
64 printf(" -showJournal: Journal view\n"); 64 printf(" -showJournal: Journal view\n");
65 printf(" -showKO: Next Days view\n"); 65 printf(" -showKO: Next Days view\n");
66 printf(" -showWNext: What's Next view\n"); 66 printf(" -showWNext: What's Next view\n");
67 printf(" -showNextXView: Next X View\n"); 67 printf(" -showNextXView: Next X View\n");
68 printf(" -new[Y] and -show[X] may be used togehther\n"); 68 printf(" -new[Y] and -show[X] may be used togehther\n");
69 printf(" KO/Pi is exiting now. Bye!\n"); 69 printf(" KO/Pi is exiting now. Bye!\n");
70 exitHelp = true; 70 exitHelp = true;
71 } 71 }
72 } 72 }
73 if ( ! exitHelp ) { 73 if ( ! exitHelp ) {
74 KGlobal::setAppName( "korganizer" ); 74 KGlobal::setAppName( "korganizer" );
75 QString fileName ; 75 QString fileName ;
76#ifndef DESKTOP_VERSION 76#ifndef DESKTOP_VERSION
77 fileName = getenv("QPEDIR"); 77 fileName = getenv("QPEDIR");
78 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); 78 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/");
79#else 79#else
80 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; 80 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
81 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 81 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
82#endif 82#endif
83 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); 83 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
84
85 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
84 MainWindow m; 86 MainWindow m;
85#ifndef DESKTOP_VERSION 87#ifndef DESKTOP_VERSION
86 88
87 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 89 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
88 a.showMainWidget(&m ); 90 a.showMainWidget(&m );
89#else 91#else
90 a.setMainWidget(&m ); 92 a.setMainWidget(&m );
91 m.show(); 93 m.show();
92 //m.resize( 800, 600 ); 94 //m.resize( 800, 600 );
93 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 95 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
94#endif 96#endif
95 if ( argc > 1 ) { 97 if ( argc > 1 ) {
96 QCString command = argv[1]; 98 QCString command = argv[1];
97 if ( argc > 2 ) 99 if ( argc > 2 )
98 command += argv[2]; 100 command += argv[2];
99 qApp->processEvents(); 101 qApp->processEvents();
100 m.recieve(command, QByteArray() ); 102 m.recieve(command, QByteArray() );
101 103
102 } 104 }
103 105
104 a.exec(); 106 a.exec();
105 dumpMissing(); 107 dumpMissing();
106 108
107 KPimGlobalPrefs::instance()->writeConfig(); 109 KPimGlobalPrefs::instance()->writeConfig();