summaryrefslogtreecommitdiffabout
path: root/korganizer/main.cpp
Unidiff
Diffstat (limited to 'korganizer/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/main.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index a357988..69ef294 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -44,55 +44,33 @@ int main( int argc, char **argv )
44 printf(" -showTodo: Todo view\n"); 44 printf(" -showTodo: Todo view\n");
45 printf(" -showJournal: Journal view\n"); 45 printf(" -showJournal: Journal view\n");
46 printf(" -showKO: Next Days view\n"); 46 printf(" -showKO: Next Days view\n");
47 printf(" -showWNext: What's Next view\n"); 47 printf(" -showWNext: What's Next view\n");
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
57
58 QString fileName ; 56 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
67#ifndef _WIN32_
68 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; 61 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
69#else 62 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
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()) )
86 app_dir.mkdir (KStandardDirs::appDir());
87 MainWindow m; 65 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()));
96#endif 74#endif
97 if ( argc > 1 ) { 75 if ( argc > 1 ) {
98 QCString command = argv[1]; 76 QCString command = argv[1];