summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-03 19:43:39 (UTC)
committer zautrix <zautrix>2004-09-03 19:43:39 (UTC)
commitdd1e64eda9500a424d83738db5cd5f7a7a208e3b (patch) (unidiff)
treeeb831692456ac1107826a590999715b6beaf2fbb
parent7b3148175ea540f0d7b4bc79e05dd52f2cd47771 (diff)
downloadkdepimpi-dd1e64eda9500a424d83738db5cd5f7a7a208e3b.zip
kdepimpi-dd1e64eda9500a424d83738db5cd5f7a7a208e3b.tar.gz
kdepimpi-dd1e64eda9500a424d83738db5cd5f7a7a208e3b.tar.bz2
Win 98 fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp15
-rw-r--r--korganizer/main.cpp15
2 files changed, 30 insertions, 0 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 850e5b2..d781f67 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -2,48 +2,63 @@
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#else 4#else
5#include <qapplication.h> 5#include <qapplication.h>
6#include <qwindowsstyle.h> 6#include <qwindowsstyle.h>
7#include <qplatinumstyle.h> 7#include <qplatinumstyle.h>
8#include <qmainwindow.h> 8#include <qmainwindow.h>
9#endif 9#endif
10 10
11#include <kstandarddirs.h> 11#include <kstandarddirs.h>
12#include <kglobal.h> 12#include <kglobal.h>
13#include <stdio.h> 13#include <stdio.h>
14#include <qdir.h> 14#include <qdir.h>
15#include "kaddressbookmain.h" 15#include "kaddressbookmain.h"
16#include "externalapphandler.h" 16#include "externalapphandler.h"
17 17
18int main( int argc, char **argv ) 18int main( int argc, char **argv )
19{ 19{
20#ifndef DESKTOP_VERSION 20#ifndef DESKTOP_VERSION
21 QPEApplication a( argc, argv ); 21 QPEApplication a( argc, argv );
22 a.setKeepRunning (); 22 a.setKeepRunning ();
23#else 23#else
24 QApplication a( argc, argv ); 24 QApplication a( argc, argv );
25 QApplication::setStyle( new QPlatinumStyle ()); 25 QApplication::setStyle( new QPlatinumStyle ());
26 QString hdir = QDir::homeDirPath();
27 // there is a bug when creating dirs for WIN 98
28 // it is difficult to fix, because we have no WIN 98 runnung
29 // such that we try it to create the dirs at startup here
30 if ( hdir == "C:\\" ) { // win 98 or ME
31 QDir app_dir;
32 if ( !app_dir.exists("C:\\kdepim") )
33 app_dir.mkdir ("C:\\kdepim");
34 if ( !app_dir.exists("C:\\kdepim\\apps") )
35 app_dir.mkdir ("C:\\kdepim\\apps");
36 if ( !app_dir.exists("C:\\kdepim\\config") )
37 app_dir.mkdir ("C:\\kdepim\\config");
38 if ( !app_dir.exists("C:\\kdepim\\apps\\kaddressbook") )
39 app_dir.mkdir ("C:\\kdepim\\apps\\kaddressbook");
40 }
26#endif 41#endif
27 42
28 bool exitHelp = false; 43 bool exitHelp = false;
29 if ( argc > 1 ) { 44 if ( argc > 1 ) {
30 QString command = argv[1]; 45 QString command = argv[1];
31 if ( command == "-help" ){ 46 if ( command == "-help" ){
32 printf("KA/E command line commands:\n"); 47 printf("KA/E command line commands:\n");
33 printf(" no command: Start KA/E in usual way\n"); 48 printf(" no command: Start KA/E in usual way\n");
34 printf(" -help: This output\n"); 49 printf(" -help: This output\n");
35 printf(" KA/E is exiting now. Bye!\n"); 50 printf(" KA/E is exiting now. Bye!\n");
36 exitHelp = true; 51 exitHelp = true;
37 } 52 }
38 } 53 }
39 if ( ! exitHelp ) { 54 if ( ! exitHelp ) {
40 55
41 KGlobal::setAppName( "kaddressbook" ); 56 KGlobal::setAppName( "kaddressbook" );
42#ifndef DESKTOP_VERSION 57#ifndef DESKTOP_VERSION
43 if ( QApplication::desktop()->width() > 320 ) 58 if ( QApplication::desktop()->width() > 320 )
44 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); 59 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
45 else 60 else
46 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 61 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
47#else 62#else
48 QString fileName ; 63 QString fileName ;
49 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; 64 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 69ef294..7f9b5c6 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -5,48 +5,63 @@
5#include <qpe/global.h> 5#include <qpe/global.h>
6#include <stdlib.h> 6#include <stdlib.h>
7#else 7#else
8#include <qapplication.h> 8#include <qapplication.h>
9#include <qstring.h> 9#include <qstring.h>
10#include <qwindowsstyle.h> 10#include <qwindowsstyle.h>
11#include <qplatinumstyle.h> 11#include <qplatinumstyle.h>
12#include <qsgistyle.h> 12#include <qsgistyle.h>
13#endif 13#endif
14 14
15#include <qdir.h> 15#include <qdir.h>
16#include <kstandarddirs.h> 16#include <kstandarddirs.h>
17#include <kglobal.h> 17#include <kglobal.h>
18#include <stdio.h> 18#include <stdio.h>
19#include "mainwindow.h" 19#include "mainwindow.h"
20 20
21int main( int argc, char **argv ) 21int main( int argc, char **argv )
22{ 22{
23#ifndef DESKTOP_VERSION 23#ifndef DESKTOP_VERSION
24 QPEApplication a( argc, argv ); 24 QPEApplication a( argc, argv );
25 a.setKeepRunning (); 25 a.setKeepRunning ();
26#else 26#else
27 QApplication a( argc, argv ); 27 QApplication a( argc, argv );
28 QApplication::setStyle( new QPlatinumStyle ()); 28 QApplication::setStyle( new QPlatinumStyle ());
29 QString hdir = QDir::homeDirPath();
30 // there is a bug when creating dirs for WIN 98
31 // it is difficult to fix, because we have no WIN 98 runnung
32 // such that we try it to create the dirs at startup here
33 if ( hdir == "C:\\" ) { // win 98 or ME
34 QDir app_dir;
35 if ( !app_dir.exists("C:\\kdepim") )
36 app_dir.mkdir ("C:\\kdepim");
37 if ( !app_dir.exists("C:\\kdepim\\apps") )
38 app_dir.mkdir ("C:\\kdepim\\apps");
39 if ( !app_dir.exists("C:\\kdepim\\config") )
40 app_dir.mkdir ("C:\\kdepim\\config");
41 if ( !app_dir.exists("C:\\kdepim\\apps\\korganizer") )
42 app_dir.mkdir ("C:\\kdepim\\apps\\korganizer");
43 }
29#endif 44#endif
30 bool exitHelp = false; 45 bool exitHelp = false;
31 if ( argc > 1 ) { 46 if ( argc > 1 ) {
32 QString command = argv[1]; 47 QString command = argv[1];
33 if ( command == "-help" ){ 48 if ( command == "-help" ){
34 printf("KO/Pi command line commands:\n"); 49 printf("KO/Pi command line commands:\n");
35 printf(" no command: Start KO/Pi in usual way\n"); 50 printf(" no command: Start KO/Pi in usual way\n");
36 printf(" -help: This output\n"); 51 printf(" -help: This output\n");
37 printf("Next Option: Open or Show after start:\n"); 52 printf("Next Option: Open or Show after start:\n");
38 printf(" -newTodo: New Todo dialog\n"); 53 printf(" -newTodo: New Todo dialog\n");
39 printf(" -newEvent: New Event dialog\n"); 54 printf(" -newEvent: New Event dialog\n");
40 printf(" -showList: List view\n"); 55 printf(" -showList: List view\n");
41 printf(" -showDay: Day view\n"); 56 printf(" -showDay: Day view\n");
42 printf(" -showWWeek: Work Week view\n"); 57 printf(" -showWWeek: Work Week view\n");
43 printf(" -showWeek: Week view\n"); 58 printf(" -showWeek: Week view\n");
44 printf(" -showTodo: Todo view\n"); 59 printf(" -showTodo: Todo view\n");
45 printf(" -showJournal: Journal view\n"); 60 printf(" -showJournal: Journal view\n");
46 printf(" -showKO: Next Days view\n"); 61 printf(" -showKO: Next Days view\n");
47 printf(" -showWNext: What's Next view\n"); 62 printf(" -showWNext: What's Next view\n");
48 printf(" -showNextXView: Next X View\n"); 63 printf(" -showNextXView: Next X View\n");
49 printf(" -new[Y] and -show[X] may be used togehther\n"); 64 printf(" -new[Y] and -show[X] may be used togehther\n");
50 printf(" KO/Pi is exiting now. Bye!\n"); 65 printf(" KO/Pi is exiting now. Bye!\n");
51 exitHelp = true; 66 exitHelp = true;
52 } 67 }