summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 2f538c4..d34e6a9 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -83,48 +83,52 @@ void KOEventViewer::setSource(const QString& n)
83 83
84 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); 84 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
85 if (n == uid ) { 85 if (n == uid ) {
86 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 86 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
87 QDialog dia( this,"dia123", true ); 87 QDialog dia( this,"dia123", true );
88 dia.setCaption( i18n("Details of attendee") ); 88 dia.setCaption( i18n("Details of attendee") );
89 QVBoxLayout lay ( &dia ); 89 QVBoxLayout lay ( &dia );
90 KPIM::AddresseeView av ( &dia ); 90 KPIM::AddresseeView av ( &dia );
91 av.setAddressee( (*it) ); 91 av.setAddressee( (*it) );
92 lay.addWidget( &av ); 92 lay.addWidget( &av );
93 if ( QApplication::desktop()->width() < 480 ) 93 if ( QApplication::desktop()->width() < 480 )
94 dia.resize( 220, 240); 94 dia.resize( 220, 240);
95 else { 95 else {
96 dia.resize( 400,400); 96 dia.resize( 400,400);
97 97
98 } 98 }
99 dia.exec(); 99 dia.exec();
100 break; 100 break;
101 } 101 }
102 } 102 }
103 return; 103 return;
104 } 104 }
105#else 105#else
106 { 106 {
107 if ( "uid:organizer" == n ) {
108 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
109 return;
110 }
107 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 111 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
108 if (attendees.count()) { 112 if (attendees.count()) {
109 Attendee *a; 113 Attendee *a;
110 for(a=attendees.first();a;a=attendees.next()) { 114 for(a=attendees.first();a;a=attendees.next()) {
111 if ( "uid:"+a->uid() == n ) { 115 if ( "uid:"+a->uid() == n ) {
112 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); 116 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
113 return; 117 return;
114 } 118 }
115 } 119 }
116 } 120 }
117 return; 121 return;
118 } 122 }
119 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 123 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
120 // the result should now arrive through method insertAttendees 124 // the result should now arrive through method insertAttendees
121 //QString uid = "uid:"+(*it).uid(); 125 //QString uid = "uid:"+(*it).uid();
122#endif 126#endif
123 if ( n.left(6) == "mailto" ) { 127 if ( n.left(6) == "mailto" ) {
124 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); 128 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
125#ifndef DESKTOP_VERSION 129#ifndef DESKTOP_VERSION
126 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); 130 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
127 e << n.mid(7); 131 e << n.mid(7);
128#endif 132#endif
129 133
130 } 134 }
@@ -396,49 +400,51 @@ void KOEventViewer::formatCategories(Incidence *event)
396void KOEventViewer::formatAttendees(Incidence *event) 400void KOEventViewer::formatAttendees(Incidence *event)
397{ 401{
398 QPtrList<Attendee> attendees = event->attendees(); 402 QPtrList<Attendee> attendees = event->attendees();
399 if (attendees.count()) { 403 if (attendees.count()) {
400 404
401 405
402 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 406 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
403 addTag("h3",i18n("Organizer")); 407 addTag("h3",i18n("Organizer"));
404 mText.append("<ul><li>"); 408 mText.append("<ul><li>");
405#ifndef KORG_NOKABC 409#ifndef KORG_NOKABC
406 410
407#ifdef DESKTOP_VERSION 411#ifdef DESKTOP_VERSION
408 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 412 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
409 KABC::Addressee::List addressList; 413 KABC::Addressee::List addressList;
410 addressList = add_book->findByEmail(event->organizer()); 414 addressList = add_book->findByEmail(event->organizer());
411 KABC::Addressee o = addressList.first(); 415 KABC::Addressee o = addressList.first();
412 if (!o.isEmpty() && addressList.size()<2) { 416 if (!o.isEmpty() && addressList.size()<2) {
413 mText += "<a href=\"uid:" + o.uid() + "\">"; 417 mText += "<a href=\"uid:" + o.uid() + "\">";
414 mText += o.formattedName(); 418 mText += o.formattedName();
415 mText += "</a>\n"; 419 mText += "</a>\n";
416 } else { 420 } else {
417 mText.append(event->organizer()); 421 mText.append(event->organizer());
418 } 422 }
419#else //DESKTOP_VERSION 423#else //DESKTOP_VERSION
420 mText.append(event->organizer()); 424 mText += "<a href=\"uid:organizer\">";
425 mText += event->organizer();
426 mText += "</a>\n";
421#endif //DESKTOP_VERSION 427#endif //DESKTOP_VERSION
422 428
423 429
424#else 430#else
425 mText.append(event->organizer()); 431 mText.append(event->organizer());
426#endif 432#endif
427 433
428 if (iconPath) { 434 if (iconPath) {
429 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 435 mText += " <a href=\"mailto:" + event->organizer() + "\">";
430 mText += "<IMG src=\"" + iconPath + "\">"; 436 mText += "<IMG src=\"" + iconPath + "\">";
431 mText += "</a>\n"; 437 mText += "</a>\n";
432 } 438 }
433 mText.append("</li></ul>"); 439 mText.append("</li></ul>");
434 440
435 addTag("h3",i18n("Attendees")); 441 addTag("h3",i18n("Attendees"));
436 Attendee *a; 442 Attendee *a;
437 mText.append("<ul>"); 443 mText.append("<ul>");
438 for(a=attendees.first();a;a=attendees.next()) { 444 for(a=attendees.first();a;a=attendees.next()) {
439#ifndef KORG_NOKABC 445#ifndef KORG_NOKABC
440#ifdef DESKTOP_VERSION 446#ifdef DESKTOP_VERSION
441 if (a->name().isEmpty()) { 447 if (a->name().isEmpty()) {
442 addressList = add_book->findByEmail(a->email()); 448 addressList = add_book->findByEmail(a->email());
443 KABC::Addressee o = addressList.first(); 449 KABC::Addressee o = addressList.first();
444 if (!o.isEmpty() && addressList.size()<2) { 450 if (!o.isEmpty() && addressList.size()<2) {