// CHANGED 2004-08-06 Lutz Rogowski #ifndef DESKTOP_VERSION #include #include #include #else #include #include #include #include #include #endif #include "opiemail.h" #include #include #include #include #include "mainwindow.h" using namespace Opie::Core; int main( int argc, char **argv ) { #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); a.setKeepRunning (); #else QApplication a( argc, argv ); QApplication::setStyle( new QPlatinumStyle ()); #endif KGlobal::setAppName( "kmicromail" ); QString fileName ; #ifndef DESKTOP_VERSION fileName = getenv("QPEDIR"); if ( QApplication::desktop()->width() > 320 ) KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); else KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); #else fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); OpieMail mw; #ifndef DESKTOP_VERSION //qDebug("CONNECT "); QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); a.showMainWidget(&mw ); #else a.setMainWidget(&mw ); mw.show(); //m.resize( 800, 600 ); QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); #endif int rv = a.exec(); return rv; }