author | alwin <alwin> | 2003-12-25 02:21:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-25 02:21:47 (UTC) |
commit | e0b1bc403c2792dff3aa04a00eaf58b9defc6dac (patch) (side-by-side diff) | |
tree | bb76837783433a91f49c555b80e1d87e3dee720a | |
parent | dd78bcd2bf8dd6432b54af61e17a75dcc05c2406 (diff) | |
download | opie-e0b1bc403c2792dff3aa04a00eaf58b9defc6dac.zip opie-e0b1bc403c2792dff3aa04a00eaf58b9defc6dac.tar.gz opie-e0b1bc403c2792dff3aa04a00eaf58b9defc6dac.tar.bz2 |
called binary when sending email to a contact is "opiemail" instead
of "mail" when using opiemal as standard mailer.
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 9f668f4..00cd2a6 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -520,100 +520,100 @@ void AddressbookWindow::slotFind() } void AddressbookWindow::slotViewBack() { // :SX showList(); } void AddressbookWindow::slotViewEdit() { if(!syncing) { if (actionPersonal->isOn()) { editPersonal(); } else { editEntry( EditEntry ); } } else { QMessageBox::warning( this, tr("Contacts"), tr("Can not edit data, currently syncing") ); } } void AddressbookWindow::writeMail() { OContact c = m_abView -> currentEntry(); QString name = c.fileAs(); QString email = c.defaultEmail(); // I prefer the OPIE-Environment variable before the // QPE-one.. QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); if ( basepath.isEmpty() ) basepath = QString::fromLatin1( getenv("QPEDIR") ); // Try to access the preferred. If not possible, try to // switch to the other one.. if ( m_config.useQtMail() ){ qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); if ( QFile::exists( basepath + "/bin/qtmail" ) ){ qWarning ("QCop"); QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); e << name << email; return; } else m_config.setUseOpieMail( true ); } if ( m_config.useOpieMail() ){ - qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1()); - if ( QFile::exists( basepath + "/bin/mail" ) ){ + qWarning ("Accessing: %s", (basepath + "/bin/opiemail").latin1()); + if ( QFile::exists( basepath + "/bin/opiemail" ) ){ qWarning ("QCop"); - QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)"); + QCopEnvelope e("QPE/Application/opiemail", "writeMail(QString,QString)"); e << name << email; return; } else m_config.setUseQtMail( true ); } } static const char * beamfile = "/tmp/obex/contact.vcf"; void AddressbookWindow::slotBeam() { QString beamFilename; OContact c; if ( actionPersonal->isOn() ) { beamFilename = addressbookPersonalVCardName(); if ( !QFile::exists( beamFilename ) ) return; // can't beam a non-existent file OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, beamFilename ); OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); OContactAccess::List allList = access->allRecords(); OContactAccess::List::Iterator it = allList.begin(); // Just take first c = *it; delete access; } else { unlink( beamfile ); // delete if exists mkdir("/tmp/obex/", 0755); c = m_abView -> currentEntry(); OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, beamfile ); OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); access->add( c ); access->save(); delete access; beamFilename = beamfile; } qWarning("Beaming: %s", beamFilename.latin1() ); Ir *ir = new Ir( this ); connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); QString description = c.fullName(); ir->send( beamFilename, description, "text/x-vCard" ); } |