summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 47b5484..b7d6b2b 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -1,9 +1,8 @@
1#ifndef DESKTOP_VERSION 1#ifndef DESKTOP_VERSION
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <qpe/global.h>
4#include <stdlib.h> 3#include <stdlib.h>
5#else 4#else
6#include <qapplication.h> 5#include <qapplication.h>
7#include <qwindowsstyle.h> 6#include <qwindowsstyle.h>
8#include <qplatinumstyle.h> 7#include <qplatinumstyle.h>
9#include <qmainwindow.h> 8#include <qmainwindow.h>
@@ -37,44 +36,27 @@ int main( int argc, char **argv )
37 } 36 }
38 } 37 }
39 if ( ! exitHelp ) { 38 if ( ! exitHelp ) {
40 39
41 KGlobal::setAppName( "kaddressbook" ); 40 KGlobal::setAppName( "kaddressbook" );
42#ifndef DESKTOP_VERSION 41#ifndef DESKTOP_VERSION
43 QString appdir = QDir::homeDirPath() + "/kdepim/apps/" + KGlobal::getAppName();
44
45 KStandardDirs::setAppDir( appdir );
46 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 42 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
47#else 43#else
48 QString fileName ; 44 QString fileName ;
49#ifndef _WIN32_ 45 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/";
50 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/"; 46 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
51#else
52 fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\";
53#endif
54 KGlobal::iconLoader()->setIconPath(fileName);
55 QString appdir = QDir::homeDirPath();
56 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" )
57 appdir += "kaddressbook";
58 else
59 appdir += "/kaddressbook";
60 KStandardDirs::setAppDir( QDir::convertSeparators( appdir ));
61 // qDebug(" %s ",KStandardDirs::appDir().latin1() );
62#endif // desktop
63 QDir app_dir;
64 if ( !app_dir.exists(KStandardDirs::appDir()) )
65 app_dir.mkdir (KStandardDirs::appDir());
66 47
48#endif
49 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
67 KAddressBookMain* m = new KAddressBookMain(); 50 KAddressBookMain* m = new KAddressBookMain();
68//US MainWindow m; 51//US MainWindow m;
69//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 52//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
70 53
71#ifndef DESKTOP_VERSION 54#ifndef DESKTOP_VERSION
72 a.showMainWidget(m ); 55 a.showMainWidget(m );
73 m->showMaximized(); 56 m->showMaximized();
74
75#else 57#else
76 a.setMainWidget(m ); 58 a.setMainWidget(m );
77 m->show(); 59 m->show();
78 //m->resize( 640, 480 ); 60 //m->resize( 640, 480 );
79#endif 61#endif
80 a.exec(); 62 a.exec();