summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp53
1 files changed, 13 insertions, 40 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 4303cab..fe4841a 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -90,4 +90,6 @@
#include "kcmconfigs/kcmkabconfig.h"
#include "kcmconfigs/kcmkdepimconfig.h"
+#include "kpimglobalprefs.h"
+#include "externalapphandler.h"
@@ -468,27 +470,5 @@ void KABCore::sendMail()
void KABCore::sendMail( const QString& email )
{
-//US original kde implementation : kapp->invokeMailer( email, "" );
-
-/*US original qtopia implementation
- PimContact c = abList->currentEntry();
- QString name = c.fileAs();
- QString email = c.defaultEmail();
-#ifndef QT_NO_COP
- QCopEnvelope e(Service::channel("Email"), "writeMail(QString,QString)");
- e << name << email;
-#else
-*/
-
-
-#ifndef QT_NO_COP
- QCString channel = KABPrefs::instance()->mEmailChannel.latin1();
- qDebug("Using QCopEnvelope e(\"" + channel + "\", \"writeMail(QMap(QString,QString))\")");
-
- QCopEnvelope e(channel, "writeMail(QString,QString)");
- //US we need no names in the To field. The emailadresses are enough
- e << "" << email;
-#else
- KMessageBox::sorry( this, i18n( "This version does not support sending emails." ) );
-#endif
+ bool result = ExternalAppHandler::instance()->mailToContacts(email);
}
@@ -551,4 +531,8 @@ void KABCore::mailVCard( const QStringList& uids )
}
}
+
+ bool result = ExternalAppHandler::instance()->mailAttachments(urls.join(", "));
+
+
/*US
kapp->invokeMailer( QString::null, QString::null, QString::null,
@@ -558,17 +542,4 @@ void KABCore::mailVCard( const QStringList& uids )
urls ); // attachments
*/
-#ifndef QT_NO_COP
- QCString channel = KABPrefs::instance()->mEmailChannel.latin1();
- qDebug("Using QCopEnvelope e(\"" + channel + "\", \"writeMail(QMap(QString,QString))\")");
-
- QMap<QString, QString> parameterMap;
- parameterMap.insert("ATTACHMENT<n>", urls.join(", "));
-
- QCopEnvelope e(channel, "writeMail(QMap(QString,QString))");
- e << parameterMap;
-#else
- KMessageBox::sorry( this, i18n( "This version does not support sending emails." ) );
-#endif
-
}
@@ -1198,9 +1169,11 @@ QString KABCore::getNameByPhone( const QString &phone )
void KABCore::openConfigDialog()
{
- KABPrefs* prefs = KABPrefs::instance();
- KCMultiDialog* ConfigureDialog = new KCMultiDialog( prefs, "PIM", this ,"kabconfigdialog", true );
- KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
+ KABPrefs* kab_prefs = KABPrefs::instance();
+ KPimGlobalPrefs* kpim_prefs = KPimGlobalPrefs::instance();
+
+ KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true );
+ KCMKabConfig* kabcfg = new KCMKabConfig( kab_prefs, ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
ConfigureDialog->addModule(kabcfg );
- KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Pim")) , "KCMKdeLibConfig" );
+ KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( kpim_prefs, ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
ConfigureDialog->addModule(kdelibcfg );