summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp6
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" );
}