-rw-r--r-- | kaddressbook/kabcore.cpp | 7 | ||||
-rw-r--r-- | kmicromail/composemail.cpp | 6 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 4 |
4 files changed, 14 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 6522ccc..5cd9649 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2032,41 +2032,44 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt emailList.append(list[i].preferredEmail()); uidList.append(list[i].uid()); } bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); } /* this method will be called through the QCop interface from other apps to show details of a contact. */ 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; if ( ! uid.isEmpty() ) { Addressee adrr = mAddressBook->findByUid( uid ); if ( !adrr.isEmpty() ) { foundUid = uid; + } if ( email == "sendbacklist" ) { + qDebug("ssssssssssssssssssssssend "); QStringList nameList; QStringList emailList; QStringList uidList; nameList.append(adrr.realName()); emailList = adrr.emails(); uidList.append( adrr.preferredEmail()); bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); + return; } - } + } if ( email == "sendback" ) return; if (foundUid.isEmpty()) { //find the uid of the person first Addressee::List namelist; Addressee::List emaillist; if (!name.isEmpty()) namelist = mAddressBook->findByName( name ); diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 5f446fa..f7604ad 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -41,24 +41,30 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) : ComposeMailUI( parent, name, modal, flags ) { mPickLineEdit = 0; connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); settings = s; m_replyid = ""; KConfig config( locateLocal("config", "kabcrc") ); config.setGroup( "General" ); QString whoami_uid = config.readEntry( "WhoAmI" ); + if ( whoami_uid.isEmpty() ) { + QMessageBox::information( 0, tr( "Hint" ), + tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), + tr( "Ok" ) ); + + } else bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); #ifdef DESKTOP_VERSION KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); QStringList mails = con.emails(); QString defmail = con.preferredEmail(); if ( mails.count() == 0) QMessageBox::information( 0, tr( "Hint" ), tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), tr( "Ok" ) ); if (defmail.length()!=0) { fromBox->insertItem(defmail); } diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 6100097..5ba32b6 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -341,25 +341,24 @@ ExternalAppHandler::ExternalAppHandler() mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); } ExternalAppHandler::~ExternalAppHandler() { } void ExternalAppHandler::loadConfig() { mDefaultItems.clear(); - mEmailAppAvailable = UNDEFINED; mPhoneAppAvailable = UNDEFINED; mFaxAppAvailable = UNDEFINED; mSMSAppAvailable = UNDEFINED; mPagerAppAvailable = UNDEFINED; QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); if (opiepath.isEmpty()) opiepath = qtopiapath; @@ -411,25 +410,25 @@ ExternalAppHandler *ExternalAppHandler::instance() { if ( !sInstance ) { sInstance = staticDeleter.setObject( new ExternalAppHandler() ); sInstance->loadConfig(); } return sInstance; } void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2) { DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2); - + // qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() ); mDefaultItems.append(dai); } QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) { QList<DefaultAppItem> list; DefaultAppItem* dai; for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) { diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 4790980..7f683a8 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -36,32 +36,32 @@ $Id$ #include "kpimglobalprefs.h" KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; static KStaticDeleter<KPimGlobalPrefs> staticDeleter; KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) : KPrefs("kkdepimrc") { KPrefs::setCurrentGroup( "ExternalApplications" ); - addItemInt( "EmailChannelType", &mEmailClient, NONE_EMC ); + addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); addItemString( "EmailChannel", &mEmailOtherChannel, "" ); addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); - addItemInt( "PhoneChannelType", &mPhoneClient, NONE_PHC ); + addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); addItemString( "FaxChannel", &mFaxOtherChannel, "" ); addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC ); addItemString( "SMSChannel", &mSMSOtherChannel, "" ); addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" ); |