summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2004-07-03 16:54:31 (UTC)
committer zautrix <zautrix>2004-07-03 16:54:31 (UTC)
commit6c035951faeaea6d7651e5fd028c7fd2a674cdfc (patch) (side-by-side diff)
treef55c6dd1f4457a5c3d387e6511d596438988955e /libkdepim
parent1da48d95d970233f0d1ea9a7fba5c98cfcf24798 (diff)
downloadkdepimpi-6c035951faeaea6d7651e5fd028c7fd2a674cdfc.zip
kdepimpi-6c035951faeaea6d7651e5fd028c7fd2a674cdfc.tar.gz
kdepimpi-6c035951faeaea6d7651e5fd028c7fd2a674cdfc.tar.bz2
Added connection to KM when clicking on email
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/addresseeview.cpp18
-rw-r--r--libkdepim/addresseeview.h2
-rw-r--r--libkdepim/kincidenceformatter.cpp6
3 files changed, 22 insertions, 4 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp
index deafd34..70fc57c 100644
--- a/libkdepim/addresseeview.cpp
+++ b/libkdepim/addresseeview.cpp
@@ -34,8 +34,15 @@
#include "addresseeview.h"
+
+#ifndef DESKTOP_VERSION
+#include <qtopia/qcopenvelope_qws.h>
+#endif
+
+
+
using namespace KPIM;
AddresseeView::AddresseeView( QWidget *parent, const char *name )
//US : KTextBrowser( parent, name )
@@ -52,9 +59,17 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name )
//US QStyleSheetItem *link = sheet->item( "a" );
//US link->setColor( KGlobalSettings::linkColor() );
}
+void AddresseeView::setSource(const QString& n)
+{
+ //qDebug("********AddresseeView::setSource %s", n.mid(7).latin1());
+#ifndef DESKTOP_VERSION
+ QCopEnvelope e("QPE/Application/kmpi", "newMail(QString)");
+ e << n.mid(7);
+#endif
+}
void AddresseeView::setAddressee( const KABC::Addressee& addr )
{
mAddressee = addr;
@@ -84,10 +99,11 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
QString type = i18n( "Email" );
for ( emailIt = emails.begin(); emailIt != emails.end(); ++emailIt ) {
dynamicPart += QString(
"<tr><td align=\"right\"><b>%1</b></td>"
- "<td align=\"left\"><a href=\"mailto:%2\">%3</a></td></tr>" )
+ "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" )
.arg( type )
+ .arg( name )
.arg( *emailIt )
.arg( *emailIt );
type = i18n( "Other" );
}
diff --git a/libkdepim/addresseeview.h b/libkdepim/addresseeview.h
index 598ef0d..1865fc4 100644
--- a/libkdepim/addresseeview.h
+++ b/libkdepim/addresseeview.h
@@ -40,9 +40,9 @@ class AddresseeView : public QTextBrowser
@param addr The addressee object.
*/
void setAddressee( const KABC::Addressee& addr );
-
+ void setSource(const QString& n);
/**
Returns the current addressee object.
*/
KABC::Addressee addressee() const;
diff --git a/libkdepim/kincidenceformatter.cpp b/libkdepim/kincidenceformatter.cpp
index 4815519..2f41409 100644
--- a/libkdepim/kincidenceformatter.cpp
+++ b/libkdepim/kincidenceformatter.cpp
@@ -247,9 +247,10 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
if (attendees.count()) {
QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
addTag("h3",i18n("Organizer"));
mText.append("<ul><li>");
-#ifndef KORG_NOKABC
+#if 0
+ //ndef KORG_NOKABC
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
KABC::Addressee::List addressList;
addressList = add_book->findByEmail(event->organizer());
@@ -274,9 +275,10 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
addTag("h3",i18n("Attendees"));
Attendee *a;
mText.append("<ul>");
for(a=attendees.first();a;a=attendees.next()) {
-#ifndef KORG_NOKABC
+#if 0
+//ndef KORG_NOKABC
if (a->name().isEmpty()) {
addressList = add_book->findByEmail(a->email());
KABC::Addressee o = addressList.first();
if (!o.isEmpty() && addressList.size()<2) {