-rw-r--r-- | kmicromail/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp index 1789da0..fe4bc76 100644 --- a/kmicromail/main.cpp +++ b/kmicromail/main.cpp | |||
@@ -1,67 +1,69 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | 2 | ||
3 | 3 | ||
4 | #ifndef DESKTOP_VERSION | 4 | #ifndef DESKTOP_VERSION |
5 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
6 | #include <libkdepim/externalapphandler.h> | 6 | #include <libkdepim/externalapphandler.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 "opiemail.h" | 15 | #include "opiemail.h" |
16 | #include <qdir.h> | 16 | #include <qdir.h> |
17 | #include <kstandarddirs.h> | 17 | #include <kstandarddirs.h> |
18 | #include <kglobal.h> | 18 | #include <kglobal.h> |
19 | #include <stdio.h> | 19 | #include <stdio.h> |
20 | #include "mainwindow.h" | 20 | #include "mainwindow.h" |
21 | #include "koprefs.h" | 21 | #include "koprefs.h" |
22 | #include <libkdepim/kpimglobalprefs.h> | 22 | #include <libkdepim/kpimglobalprefs.h> |
23 | void dumpMissing(); | 23 | void dumpMissing(); |
24 | //using namespace Opie::Core; | 24 | //using namespace Opie::Core; |
25 | int main( int argc, char **argv ) { | 25 | int main( int argc, char **argv ) { |
26 | 26 | ||
27 | #ifndef DESKTOP_VERSION | 27 | #ifndef DESKTOP_VERSION |
28 | QPEApplication a( argc, argv ); | 28 | QPEApplication a( argc, argv ); |
29 | a.setKeepRunning (); | 29 | a.setKeepRunning (); |
30 | #else | 30 | #else |
31 | QApplication a( argc, argv ); | 31 | QApplication a( argc, argv ); |
32 | QApplication::setStyle( new QPlatinumStyle ()); | 32 | QApplication::setStyle( new QPlatinumStyle ()); |
33 | #endif | 33 | #endif |
34 | a.setFont( KOPrefs::instance()->mAppFont ); | 34 | //a.setFont( KOPrefs::instance()->mAppFont ); |
35 | KGlobal::setAppName( "kopiemail" ); | 35 | KGlobal::setAppName( "kopiemail" ); |
36 | QString fileName ; | 36 | QString fileName ; |
37 | #ifndef DESKTOP_VERSION | 37 | #ifndef DESKTOP_VERSION |
38 | fileName = getenv("QPEDIR"); | 38 | fileName = getenv("QPEDIR"); |
39 | if ( QApplication::desktop()->width() > 320 ) | 39 | if ( QApplication::desktop()->width() > 320 ) |
40 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); | 40 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); |
41 | else | 41 | else |
42 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); | 42 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); |
43 | #else | 43 | #else |
44 | fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/"; | 44 | fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/"; |
45 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 45 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
46 | #endif | 46 | #endif |
47 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); | 47 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); |
48 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 48 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
49 | QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); | ||
50 | QApplication::setFont( KOPrefs::instance()->mAppFont ); | ||
49 | OpieMail mw; | 51 | OpieMail mw; |
50 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
51 | //qDebug("CONNECT "); | 53 | //qDebug("CONNECT "); |
52 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); | 54 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); |
53 | // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 55 | // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
54 | a.showMainWidget(&mw ); | 56 | a.showMainWidget(&mw ); |
55 | #else | 57 | #else |
56 | a.setMainWidget(&mw ); | 58 | a.setMainWidget(&mw ); |
57 | mw.show(); | 59 | mw.show(); |
58 | //m.resize( 800, 600 ); | 60 | //m.resize( 800, 600 ); |
59 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 61 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
60 | #endif | 62 | #endif |
61 | int rv = a.exec(); | 63 | int rv = a.exec(); |
62 | dumpMissing(); | 64 | dumpMissing(); |
63 | 65 | ||
64 | KPimGlobalPrefs::instance()->writeConfig(); | 66 | KPimGlobalPrefs::instance()->writeConfig(); |
65 | return rv; | 67 | return rv; |
66 | 68 | ||
67 | } | 69 | } |