-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 | |||
@@ -536,68 +536,68 @@ void AddressbookWindow::slotViewEdit() | |||
536 | QMessageBox::warning( this, tr("Contacts"), | 536 | QMessageBox::warning( this, tr("Contacts"), |
537 | tr("Can not edit data, currently syncing") ); | 537 | tr("Can not edit data, currently syncing") ); |
538 | } | 538 | } |
539 | } | 539 | } |
540 | 540 | ||
541 | 541 | ||
542 | 542 | ||
543 | void AddressbookWindow::writeMail() | 543 | void AddressbookWindow::writeMail() |
544 | { | 544 | { |
545 | OContact c = m_abView -> currentEntry(); | 545 | OContact c = m_abView -> currentEntry(); |
546 | QString name = c.fileAs(); | 546 | QString name = c.fileAs(); |
547 | QString email = c.defaultEmail(); | 547 | QString email = c.defaultEmail(); |
548 | 548 | ||
549 | // I prefer the OPIE-Environment variable before the | 549 | // I prefer the OPIE-Environment variable before the |
550 | // QPE-one.. | 550 | // QPE-one.. |
551 | QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); | 551 | QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); |
552 | if ( basepath.isEmpty() ) | 552 | if ( basepath.isEmpty() ) |
553 | basepath = QString::fromLatin1( getenv("QPEDIR") ); | 553 | basepath = QString::fromLatin1( getenv("QPEDIR") ); |
554 | 554 | ||
555 | // Try to access the preferred. If not possible, try to | 555 | // Try to access the preferred. If not possible, try to |
556 | // switch to the other one.. | 556 | // switch to the other one.. |
557 | if ( m_config.useQtMail() ){ | 557 | if ( m_config.useQtMail() ){ |
558 | qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); | 558 | qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); |
559 | if ( QFile::exists( basepath + "/bin/qtmail" ) ){ | 559 | if ( QFile::exists( basepath + "/bin/qtmail" ) ){ |
560 | qWarning ("QCop"); | 560 | qWarning ("QCop"); |
561 | QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); | 561 | QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); |
562 | e << name << email; | 562 | e << name << email; |
563 | return; | 563 | return; |
564 | } else | 564 | } else |
565 | m_config.setUseOpieMail( true ); | 565 | m_config.setUseOpieMail( true ); |
566 | } | 566 | } |
567 | if ( m_config.useOpieMail() ){ | 567 | if ( m_config.useOpieMail() ){ |
568 | qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1()); | 568 | qWarning ("Accessing: %s", (basepath + "/bin/opiemail").latin1()); |
569 | if ( QFile::exists( basepath + "/bin/mail" ) ){ | 569 | if ( QFile::exists( basepath + "/bin/opiemail" ) ){ |
570 | qWarning ("QCop"); | 570 | qWarning ("QCop"); |
571 | QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)"); | 571 | QCopEnvelope e("QPE/Application/opiemail", "writeMail(QString,QString)"); |
572 | e << name << email; | 572 | e << name << email; |
573 | return; | 573 | return; |
574 | } else | 574 | } else |
575 | m_config.setUseQtMail( true ); | 575 | m_config.setUseQtMail( true ); |
576 | } | 576 | } |
577 | 577 | ||
578 | } | 578 | } |
579 | 579 | ||
580 | static const char * beamfile = "/tmp/obex/contact.vcf"; | 580 | static const char * beamfile = "/tmp/obex/contact.vcf"; |
581 | 581 | ||
582 | void AddressbookWindow::slotBeam() | 582 | void AddressbookWindow::slotBeam() |
583 | { | 583 | { |
584 | QString beamFilename; | 584 | QString beamFilename; |
585 | OContact c; | 585 | OContact c; |
586 | if ( actionPersonal->isOn() ) { | 586 | if ( actionPersonal->isOn() ) { |
587 | beamFilename = addressbookPersonalVCardName(); | 587 | beamFilename = addressbookPersonalVCardName(); |
588 | if ( !QFile::exists( beamFilename ) ) | 588 | if ( !QFile::exists( beamFilename ) ) |
589 | return; // can't beam a non-existent file | 589 | return; // can't beam a non-existent file |
590 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 590 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
591 | beamFilename ); | 591 | beamFilename ); |
592 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 592 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
593 | OContactAccess::List allList = access->allRecords(); | 593 | OContactAccess::List allList = access->allRecords(); |
594 | OContactAccess::List::Iterator it = allList.begin(); // Just take first | 594 | OContactAccess::List::Iterator it = allList.begin(); // Just take first |
595 | c = *it; | 595 | c = *it; |
596 | 596 | ||
597 | delete access; | 597 | delete access; |
598 | } else { | 598 | } else { |
599 | unlink( beamfile ); // delete if exists | 599 | unlink( beamfile ); // delete if exists |
600 | mkdir("/tmp/obex/", 0755); | 600 | mkdir("/tmp/obex/", 0755); |
601 | c = m_abView -> currentEntry(); | 601 | c = m_abView -> currentEntry(); |
602 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 602 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
603 | beamfile ); | 603 | beamfile ); |