summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp2
-rw-r--r--kabc/stdaddressbook.cpp14
-rw-r--r--kaddressbook/kabcore.cpp19
-rw-r--r--korganizer/koeventviewer.cpp50
-rw-r--r--korganizer/mainwindow.cpp2
-rw-r--r--libkdepim/externalapphandler.cpp2
6 files changed, 68 insertions, 21 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index c61b387..47d298a 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -428,5 +428,5 @@ Addressee::List AddressBook::findByName( const QString &name )
Iterator it;
for ( it = begin(); it != end(); ++it ) {
- if ( name == (*it).name() ) {
+ if ( name == (*it).realName() ) {
results.append( *it );
}
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index 760820e..9f38f08 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -64,6 +64,9 @@ StdAddressBook *StdAddressBook::self()
{
QString appdir = StdAddressBook::setTempAppDir();
-
- kdDebug(5700) << "StdAddressBook::self()" << endl;
+ qDebug("****************************************************** ");
+ qDebug("****************************************************** ");
+ qDebug("****************************************************** ");
+ qDebug("****************************************************** ");
+ qDebug("****************************************************** ");
// US im am not sure why I have to use the other format here??
#ifdef KAB_EMBEDDED
@@ -101,4 +104,11 @@ StdAddressBook *StdAddressBook::self( bool onlyFastResources )
if ( !mSelf )
{
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
+ qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ ");
QString appdir =StdAddressBook::setTempAppDir();
#ifdef KAB_EMBEDDED
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 4299ebd..2f9f1df 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2042,5 +2042,5 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
{
-// qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
+ //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
QString foundUid = QString::null;
@@ -2056,10 +2056,11 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
if (!email.isEmpty())
emaillist = mAddressBook->findByEmail( email );
-
+ qDebug("count %d %d ", namelist.count(),emaillist.count() );
//check if we have a match in Namelist and Emaillist
- if ((namelist.count() == 0) && (emaillist.count() > 0))
- foundUid == emaillist[0].uid();
+ if ((namelist.count() == 0) && (emaillist.count() > 0)) {
+ foundUid = emaillist[0].uid();
+ }
else if ((namelist.count() > 0) && (emaillist.count() == 0))
- foundUid == namelist[0].uid();
+ foundUid = namelist[0].uid();
else
{
@@ -2070,5 +2071,5 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
if (namelist[i] == emaillist[j])
{
- foundUid == namelist[i].uid();
+ foundUid = namelist[i].uid();
}
}
@@ -2083,12 +2084,14 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
if (!foundUid.isEmpty())
{
+
// raise Ka/Pi if it is in the background
#ifndef DESKTOP_VERSION
#ifndef KORG_NODCOP
- QCopEnvelope e("QPE/Application/kapi", "raise()");
+ //QCopEnvelope e("QPE/Application/kapi", "raise()");
#endif
#endif
-
+
mMainWindow->showMaximized();
+ mMainWindow-> raise();
mViewManager->setSelected( "", false);
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 1f69700..0866939 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -51,7 +51,11 @@
#define size count
#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
KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
@@ -69,14 +73,13 @@ 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 );
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
-#ifdef DESKTOP_VERSION
QString uid = "uid://"+(*it).uid();
-#else
- QString uid = "uid:"+(*it).uid();
-#endif
+
//qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
if (n == uid ) {
@@ -100,8 +103,26 @@ void KOEventViewer::setSource(const QString& n)
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(), "");
+ 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/kmpi", "newMail(QString)" );
+ QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
e << n.mid(7);
#endif
@@ -384,4 +405,5 @@ void KOEventViewer::formatAttendees(Incidence *event)
#ifndef KORG_NOKABC
+#ifdef DESKTOP_VERSION
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
KABC::Addressee::List addressList;
@@ -395,4 +417,9 @@ void KOEventViewer::formatAttendees(Incidence *event)
mText.append(event->organizer());
}
+#else //DESKTOP_VERSION
+ mText.append(event->organizer());
+#endif //DESKTOP_VERSION
+
+
#else
mText.append(event->organizer());
@@ -411,4 +438,5 @@ void KOEventViewer::formatAttendees(Incidence *event)
for(a=attendees.first();a;a=attendees.next()) {
#ifndef KORG_NOKABC
+#ifdef DESKTOP_VERSION
if (a->name().isEmpty()) {
addressList = add_book->findByEmail(a->email());
@@ -429,4 +457,10 @@ void KOEventViewer::formatAttendees(Incidence *event)
mText += "</a>\n";
}
+#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
//qDebug("nokabc ");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d4fadcb..7978b46 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -203,5 +203,7 @@ 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
}
MainWindow::~MainWindow()
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index bd83626..6100097 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -307,5 +307,4 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d
stream >> uid >> list1 >> list2 >> list3;
-
emit receivedMessageFromTarget(uid, list1, list2, list3);
@@ -971,5 +970,4 @@ void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& dat
{
bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
-
if (!res)
res = mDisplayDetails->appMessage( cmsg, data );