summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp50
-rw-r--r--korganizer/mainwindow.cpp2
2 files changed, 44 insertions, 8 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 1f69700..0866939 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -52,5 +52,9 @@
#endif
-#ifndef DESKTOP_VERSION
+
+#ifdef DESKTOP_VERSION
+#include <kabc/addresseedialog.h>
+#else //DESKTOP_VERSION
+#include <externalapphandler.h>
#include <qtopia/qcopenvelope_qws.h>
-#endif
+#endif //DESKTOP_VERSION
@@ -70,3 +74,5 @@ void KOEventViewer::setSource(const QString& n)
- if ( n.left(3) == "uid" ) {
+ if ( n.left(3) == "uid" )
+#ifdef DESKTOP_VERSION
+ {
KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
@@ -75,7 +81,4 @@ void KOEventViewer::setSource(const QString& n)
// LR I do not understand, why the uid string is different on zaurus and desktop
-#ifdef DESKTOP_VERSION
QString uid = "uid://"+(*it).uid();
-#else
- QString uid = "uid:"+(*it).uid();
-#endif
+
//qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
@@ -101,2 +104,20 @@ void KOEventViewer::setSource(const QString& n)
}
+#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(), "");
+ 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" ) {
@@ -104,3 +125,3 @@ void KOEventViewer::setSource(const QString& n)
#ifndef DESKTOP_VERSION
- QCopEnvelope e("QPE/Application/kmpi", "newMail(QString)" );
+ QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
e << n.mid(7);
@@ -385,2 +406,3 @@ void KOEventViewer::formatAttendees(Incidence *event)
+#ifdef DESKTOP_VERSION
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
@@ -396,2 +418,7 @@ void KOEventViewer::formatAttendees(Incidence *event)
}
+#else //DESKTOP_VERSION
+ mText.append(event->organizer());
+#endif //DESKTOP_VERSION
+
+
#else
@@ -412,2 +439,3 @@ void KOEventViewer::formatAttendees(Incidence *event)
#ifndef KORG_NOKABC
+#ifdef DESKTOP_VERSION
if (a->name().isEmpty()) {
@@ -430,2 +458,8 @@ void KOEventViewer::formatAttendees(Incidence *event)
}
+#else //DESKTOP_VERSION
+ mText += "<li><a href=\"uid:" + a->uid() + "\">";
+ if (!a->name().isEmpty()) mText += a->name();
+ else mText += a->email();
+ mText += "</a>\n";
+#endif //DESKTOP_VERSION
#else
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d4fadcb..7978b46 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -204,3 +204,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
//US listen for result adressed from Ka/Pi
+#ifndef DESKTOP_VERSION
connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
+#endif
}