summaryrefslogtreecommitdiffabout
path: root/kaddressbook/mainembedded.cpp
Unidiff
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index dce6a88..cf1fd3e 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -24,62 +24,63 @@ int main( int argc, char **argv )
24 QApplication::setStyle( new QPlatinumStyle ()); 24 QApplication::setStyle( new QPlatinumStyle ());
25#endif 25#endif
26 26
27 bool exitHelp = false; 27 bool exitHelp = false;
28 if ( argc > 1 ) { 28 if ( argc > 1 ) {
29 QString command = argv[1]; 29 QString command = argv[1];
30 if ( command == "-help" ){ 30 if ( command == "-help" ){
31 printf("KA/E command line commands:\n"); 31 printf("KA/E command line commands:\n");
32 printf(" no command: Start KA/E in usual way\n"); 32 printf(" no command: Start KA/E in usual way\n");
33 printf(" -help: This output\n"); 33 printf(" -help: This output\n");
34 printf(" KA/E is exiting now. Bye!\n"); 34 printf(" KA/E is exiting now. Bye!\n");
35 exitHelp = true; 35 exitHelp = true;
36 } 36 }
37 } 37 }
38 if ( ! exitHelp ) { 38 if ( ! exitHelp ) {
39 39
40 KGlobal::setAppName( "kaddressbook" ); 40 KGlobal::setAppName( "kaddressbook" );
41#ifndef DESKTOP_VERSION 41#ifndef DESKTOP_VERSION
42 if ( QApplication::desktop()->width() > 320 ) 42 if ( QApplication::desktop()->width() > 320 )
43 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); 43 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
44 else 44 else
45 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 45 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
46#else 46#else
47 QString fileName ; 47 QString fileName ;
48 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/"; 48 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
49 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 49 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
50 QApplication::addLibraryPath ( qApp->applicationDirPath () );
50 51
51#endif 52#endif
52 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 53 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
53 KAddressBookMain m ; 54 KAddressBookMain m ;
54//US MainWindow m; 55//US MainWindow m;
55//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 56//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
56 57
57#ifndef DESKTOP_VERSION 58#ifndef DESKTOP_VERSION
58 a.showMainWidget( &m ); 59 a.showMainWidget( &m );
59#else 60#else
60 a.setMainWidget(m ); 61 a.setMainWidget( &m );
61 m->show(); 62 m.show();
62#endif 63#endif
63 a.exec(); 64 a.exec();
64 65
65 } 66 }
66 qDebug("KA: Bye! "); 67 qDebug("KA: Bye! ");
67} 68}
68 69
69/* 70/*
70#include <stdlib.h> 71#include <stdlib.h>
71 72
72#include <qstring.h> 73#include <qstring.h>
73 74
74#include <kabc/stdaddressbook.h> 75#include <kabc/stdaddressbook.h>
75#include <kaboutdata.h> 76#include <kaboutdata.h>
76#include <kcmdlineargs.h> 77#include <kcmdlineargs.h>
77#include <kcrash.h> 78#include <kcrash.h>
78#include <kdebug.h> 79#include <kdebug.h>
79#include <klocale.h> 80#include <klocale.h>
80#include <kstartupinfo.h> 81#include <kstartupinfo.h>
81#include <kuniqueapplication.h> 82#include <kuniqueapplication.h>
82#include <kwin.h> 83#include <kwin.h>
83 84
84#include "kaddressbookmain.h" 85#include "kaddressbookmain.h"
85#include "kabcore.h" 86#include "kabcore.h"