Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index c127601..dce6a88 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -29,59 +29,57 @@ int main( int argc, char **argv ) | |||
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/"; |
49 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 49 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
50 | 50 | ||
51 | #endif | 51 | #endif |
52 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 52 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
53 | KAddressBookMain* m = new KAddressBookMain(); | 53 | KAddressBookMain m ; |
54 | //US MainWindow m; | 54 | //US MainWindow m; |
55 | //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 55 | //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
56 | 56 | ||
57 | #ifndef DESKTOP_VERSION | 57 | #ifndef DESKTOP_VERSION |
58 | a.showMainWidget(m ); | 58 | a.showMainWidget( &m ); |
59 | m->showMaximized(); | ||
60 | #else | 59 | #else |
61 | a.setMainWidget(m ); | 60 | a.setMainWidget(m ); |
62 | m->show(); | 61 | m->show(); |
63 | //m->resize( 640, 480 ); | ||
64 | #endif | 62 | #endif |
65 | a.exec(); | 63 | a.exec(); |
66 | 64 | ||
67 | } | 65 | } |
68 | qDebug("KA: Bye! "); | 66 | qDebug("KA: Bye! "); |
69 | } | 67 | } |
70 | 68 | ||
71 | /* | 69 | /* |
72 | #include <stdlib.h> | 70 | #include <stdlib.h> |
73 | 71 | ||
74 | #include <qstring.h> | 72 | #include <qstring.h> |
75 | 73 | ||
76 | #include <kabc/stdaddressbook.h> | 74 | #include <kabc/stdaddressbook.h> |
77 | #include <kaboutdata.h> | 75 | #include <kaboutdata.h> |
78 | #include <kcmdlineargs.h> | 76 | #include <kcmdlineargs.h> |
79 | #include <kcrash.h> | 77 | #include <kcrash.h> |
80 | #include <kdebug.h> | 78 | #include <kdebug.h> |
81 | #include <klocale.h> | 79 | #include <klocale.h> |
82 | #include <kstartupinfo.h> | 80 | #include <kstartupinfo.h> |
83 | #include <kuniqueapplication.h> | 81 | #include <kuniqueapplication.h> |
84 | #include <kwin.h> | 82 | #include <kwin.h> |
85 | 83 | ||
86 | #include "kaddressbookmain.h" | 84 | #include "kaddressbookmain.h" |
87 | #include "kabcore.h" | 85 | #include "kabcore.h" |