author | zautrix <zautrix> | 2004-08-06 16:59:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-06 16:59:46 (UTC) |
commit | b41f6fbe8e52f0b063ded2eebadfc885aa93ae73 (patch) (side-by-side diff) | |
tree | cfe689cc48c176486c53e1147229993524a8b935 | |
parent | 02963edb373e263bd50ab431633ea66adf32a4aa (diff) | |
download | kdepimpi-b41f6fbe8e52f0b063ded2eebadfc885aa93ae73.zip kdepimpi-b41f6fbe8e52f0b063ded2eebadfc885aa93ae73.tar.gz kdepimpi-b41f6fbe8e52f0b063ded2eebadfc885aa93ae73.tar.bz2 |
mail name fix
-rw-r--r-- | libkdepim/addresseeview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index aa9b7f3..547441c 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -5,129 +5,129 @@ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <kabc/address.h> #include <kabc/addressee.h> #include <kabc/phonenumber.h> #include <kglobal.h> //US#include <kglobalsettings.h> #include <kiconloader.h> #include <klocale.h> //US #include <kstringhandler.h> #include <qscrollview.h> #include <qregexp.h> #include <qfile.h> #include <qapplication.h> #include "addresseeview.h" #ifndef DESKTOP_VERSION #include <qtopia/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #endif static int kphoneInstalled = 0; using namespace KPIM; AddresseeView::AddresseeView( QWidget *parent, const char *name ) //US : KTextBrowser( parent, name ) : QTextBrowser( parent, name ) { //US setWrapPolicy( QTextEdit::AtWordBoundary ); setLinkUnderline( false ); // setVScrollBarMode( QScrollView::AlwaysOff ); //setHScrollBarMode( QScrollView::AlwaysOff ); //US QStyleSheet *sheet = styleSheet(); //US QStyleSheetItem *link = sheet->item( "a" ); //US link->setColor( KGlobalSettings::linkColor() ); } void AddresseeView::setSource(const QString& n) { qDebug("********AddresseeView::setSource %s", n.latin1()); #ifndef DESKTOP_VERSION if ( n.left( 6 ) == "mailto" ) { - QCopEnvelope e("QPE/Application/kmpi", "newMail(QString)"); + QCopEnvelope e("QPE/Application/ompi", "newMail(QString)"); e << n.mid(7); } if ( n.left( 7 ) == "phoneto" ) { QString mess = "-ring:" + n.mid(8); QCopEnvelope e("QPE/Application/kppi", mess.latin1()); } #endif } void AddresseeView::setAddressee( const KABC::Addressee& addr ) { bool kphoneAvail = false; #ifndef DESKTOP_VERSION if ( ! kphoneInstalled ) { if ( QFile::exists( QPEApplication::qpeDir() + "/bin/kppi" ) ) kphoneInstalled = 1; else kphoneInstalled = -1; } if ( kphoneInstalled > 0 ) kphoneAvail = true; #if 0 if ( kphoneAvail ) qDebug("KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); else qDebug("NOOOOOOOOOOOo KPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPone avail "); #endif #endif mAddressee = addr; // clear view setText( QString::null ); if ( mAddressee.isEmpty() ) return; QString name = ( mAddressee.formattedName().isEmpty() ? mAddressee.assembledName() : mAddressee.formattedName() ); QString dynamicPart; QStringList emails = mAddressee.emails(); QStringList::ConstIterator emailIt; QString type = i18n( "Email" ); emailIt = emails.begin(); if ( emailIt != emails.end() ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) .arg( type ) .arg( name ) .arg( *emailIt ) .arg( *emailIt ); ++emailIt; } KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); KABC::PhoneNumber::List::ConstIterator phoneIt; for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { if ( kphoneAvail ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\"><a href=\"phoneto:%2 \">%3</a></td></tr>" ) |