Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index cf1fd3e..7f368eb 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -30,64 +30,65 @@ int main( int argc, char **argv ) | |||
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/icons22/"; | 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 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); |
51 | 51 | ||
52 | #endif | 52 | #endif |
53 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 53 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
54 | KAddressBookMain m ; | 54 | KAddressBookMain m ; |
55 | //US MainWindow m; | 55 | //US MainWindow m; |
56 | //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& ))); |
57 | 57 | ||
58 | #ifndef DESKTOP_VERSION | 58 | #ifndef DESKTOP_VERSION |
59 | a.showMainWidget( &m ); | 59 | a.showMainWidget( &m ); |
60 | #else | 60 | #else |
61 | a.setMainWidget( &m ); | 61 | a.setMainWidget( &m ); |
62 | m.resize (640, 480 ); | ||
62 | m.show(); | 63 | m.show(); |
63 | #endif | 64 | #endif |
64 | a.exec(); | 65 | a.exec(); |
65 | 66 | ||
66 | } | 67 | } |
67 | qDebug("KA: Bye! "); | 68 | qDebug("KA: Bye! "); |
68 | } | 69 | } |
69 | 70 | ||
70 | /* | 71 | /* |
71 | #include <stdlib.h> | 72 | #include <stdlib.h> |
72 | 73 | ||
73 | #include <qstring.h> | 74 | #include <qstring.h> |
74 | 75 | ||
75 | #include <kabc/stdaddressbook.h> | 76 | #include <kabc/stdaddressbook.h> |
76 | #include <kaboutdata.h> | 77 | #include <kaboutdata.h> |
77 | #include <kcmdlineargs.h> | 78 | #include <kcmdlineargs.h> |
78 | #include <kcrash.h> | 79 | #include <kcrash.h> |
79 | #include <kdebug.h> | 80 | #include <kdebug.h> |
80 | #include <klocale.h> | 81 | #include <klocale.h> |
81 | #include <kstartupinfo.h> | 82 | #include <kstartupinfo.h> |
82 | #include <kuniqueapplication.h> | 83 | #include <kuniqueapplication.h> |
83 | #include <kwin.h> | 84 | #include <kwin.h> |
84 | 85 | ||
85 | #include "kaddressbookmain.h" | 86 | #include "kaddressbookmain.h" |
86 | #include "kabcore.h" | 87 | #include "kabcore.h" |
87 | 88 | ||
88 | extern "C" { | 89 | extern "C" { |
89 | 90 | ||
90 | void crashHandler( int ) | 91 | void crashHandler( int ) |
91 | { | 92 | { |
92 | KABC::StdAddressBook::handleCrash(); | 93 | KABC::StdAddressBook::handleCrash(); |
93 | ::exit( 0 ); | 94 | ::exit( 0 ); |