summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-09-07 22:51:29 (UTC)
committer zautrix <zautrix>2004-09-07 22:51:29 (UTC)
commit2676646d4744ccceab1063dc02d772a26a203c61 (patch) (side-by-side diff)
tree0a0d5261b9a804a29b61a38f68339979051282e2 /korganizer
parent64a8ef1629f523df3006de5cb2b9882a50d96a05 (diff)
downloadkdepimpi-2676646d4744ccceab1063dc02d772a26a203c61.zip
kdepimpi-2676646d4744ccceab1063dc02d772a26a203c61.tar.gz
kdepimpi-2676646d4744ccceab1063dc02d772a26a203c61.tar.bz2
Implemented Ompi - kapi connection
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 0866939..2f538c4 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -64,97 +64,97 @@ KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
mSyncMode = false;
mColorMode = 0;
}
KOEventViewer::~KOEventViewer()
{
}
void KOEventViewer::setSource(const QString& n)
{
if ( n.left(3) == "uid" )
#ifdef DESKTOP_VERSION
{
KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
KABC::AddressBook::Iterator it;
for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
// LR I do not understand, why the uid string is different on zaurus and desktop
QString uid = "uid://"+(*it).uid();
//qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
if (n == uid ) {
//qDebug("found %s ",(*it).mobileHomePhone().latin1() );
QDialog dia( this,"dia123", true );
dia.setCaption( i18n("Details of attendee") );
QVBoxLayout lay ( &dia );
KPIM::AddresseeView av ( &dia );
av.setAddressee( (*it) );
lay.addWidget( &av );
if ( QApplication::desktop()->width() < 480 )
dia.resize( 220, 240);
else {
dia.resize( 400,400);
}
dia.exec();
break;
}
}
return;
}
#else
{
QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
if (attendees.count()) {
Attendee *a;
for(a=attendees.first();a;a=attendees.next()) {
if ( "uid:"+a->uid() == n ) {
- bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), "");
+ bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
return;
}
}
}
return;
}
//requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
// the result should now arrive through method insertAttendees
//QString uid = "uid:"+(*it).uid();
#endif
if ( n.left(6) == "mailto" ) {
// qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
#ifndef DESKTOP_VERSION
QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
e << n.mid(7);
#endif
}
#ifndef KORG_NODCOP
kdDebug() << "KOEventViewer::setSource(): " << n << endl;
QString tmpStr;
if (n.startsWith("mailto:")) {
KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
//emit showIncidence(n);
return;
} else if (n.startsWith("uid:")) {
DCOPClient *client = KApplication::kApplication()->dcopClient();
const QByteArray noParamData;
const QByteArray paramData;
QByteArray replyData;
QCString replyTypeStr;
#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
bool foundAbbrowser = PING_ABBROWSER;
if (foundAbbrowser) {
//KAddressbook is already running, so just DCOP to it to bring up the contact editor
//client->send("kaddressbook","KAddressBookIface",
QDataStream arg(paramData, IO_WriteOnly);
arg << n.mid(6);
client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
return;
} else {
/*
KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
We start it without its main interface
*/