summaryrefslogtreecommitdiffabout
path: root/kaddressbook/mainembedded.cpp
Unidiff
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 6dd97b8..a2ff1e9 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -50,75 +50,72 @@ int main( int argc, char **argv )
50 printf("KA/E command line commands:\n"); 50 printf("KA/E command line commands:\n");
51 printf(" no command: Start KA/E in usual way\n"); 51 printf(" no command: Start KA/E in usual way\n");
52 printf(" -help: This output\n"); 52 printf(" -help: This output\n");
53 printf(" KA/E is exiting now. Bye!\n"); 53 printf(" KA/E is exiting now. Bye!\n");
54 exitHelp = true; 54 exitHelp = true;
55 } 55 }
56 } 56 }
57 if ( ! exitHelp ) { 57 if ( ! exitHelp ) {
58 58
59 KGlobal::setAppName( "kaddressbook" ); 59 KGlobal::setAppName( "kaddressbook" );
60#ifndef DESKTOP_VERSION 60#ifndef DESKTOP_VERSION
61 if ( QApplication::desktop()->width() > 320 ) 61 if ( QApplication::desktop()->width() > 320 )
62 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); 62 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
63 else 63 else
64 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 64 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
65#else 65#else
66 QString fileName ; 66 QString fileName ;
67 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; 67 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
68 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 68 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
69 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 69 QApplication::addLibraryPath ( qApp->applicationDirPath () );
70 70
71#endif 71#endif
72 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 72 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
73 KAddressBookMain m ; 73 KAddressBookMain m ;
74//US MainWindow m; 74//US MainWindow m;
75 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 75 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
76 76
77 { 77 {
78 KPimGlobalPrefs::instance()->setGlobalConfig(); 78 KPimGlobalPrefs::instance()->setGlobalConfig();
79 } 79 }
80#ifndef DESKTOP_VERSION 80#ifndef DESKTOP_VERSION
81 a.showMainWidget( &m ); 81 a.showMainWidget( &m );
82 QCopChannel* c1 = new QCopChannel("QPE/Application/addressbook",&m, "channelAB" ) ; 82
83 QObject::connect( c1, SIGNAL (received ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
84#else 83#else
85 a.setMainWidget( &m ); 84 a.setMainWidget( &m );
86 m.resize (640, 480 ); 85 m.resize (640, 480 );
87 m.show(); 86 m.show();
88#endif 87#endif
89 a.exec(); 88 a.exec();
90#ifndef DESKTOP_VERSION 89
91 delete c1;
92#endif
93 90
94 } 91 }
95 qDebug("KA: Bye! "); 92 qDebug("KA: Bye! ");
96} 93}
97 94
98/* 95/*
99#include <stdlib.h> 96#include <stdlib.h>
100 97
101#include <qstring.h> 98#include <qstring.h>
102 99
103#include <kabc/stdaddressbook.h> 100#include <kabc/stdaddressbook.h>
104#include <kaboutdata.h> 101#include <kaboutdata.h>
105#include <kcmdlineargs.h> 102#include <kcmdlineargs.h>
106#include <kcrash.h> 103#include <kcrash.h>
107#include <kdebug.h> 104#include <kdebug.h>
108#include <klocale.h> 105#include <klocale.h>
109#include <kstartupinfo.h> 106#include <kstartupinfo.h>
110#include <kuniqueapplication.h> 107#include <kuniqueapplication.h>
111#include <kwin.h> 108#include <kwin.h>
112 109
113#include "kaddressbookmain.h" 110#include "kaddressbookmain.h"
114#include "kabcore.h" 111#include "kabcore.h"
115 112
116extern "C" { 113extern "C" {
117 114
118void crashHandler( int ) 115void crashHandler( int )
119{ 116{
120 KABC::StdAddressBook::handleCrash(); 117 KABC::StdAddressBook::handleCrash();
121 ::exit( 0 ); 118 ::exit( 0 );
122} 119}
123 120
124} 121}