author | eilers <eilers> | 2003-02-28 10:25:31 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-02-28 10:25:31 (UTC) |
commit | 81cbb2d97b4f0cd7eef56536d791434856d7ae8d (patch) (unidiff) | |
tree | 644f7c1dc38c07b67b9337a4138ca80741d0c9ca | |
parent | 18c19111466e43e91678c5a1fa50f2f561ca3257 (diff) | |
download | opie-81cbb2d97b4f0cd7eef56536d791434856d7ae8d.zip opie-81cbb2d97b4f0cd7eef56536d791434856d7ae8d.tar.gz opie-81cbb2d97b4f0cd7eef56536d791434856d7ae8d.tar.bz2 |
Beaming personal vcard on keypress is implented now !
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 0276231..8937227 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -544,10 +544,10 @@ void AddressbookWindow::slotBeam() | |||
544 | { | 544 | { |
545 | QString filename; | 545 | QString beamFilename; |
546 | OContact c; | 546 | OContact c; |
547 | if ( actionPersonal->isOn() ) { | 547 | if ( actionPersonal->isOn() ) { |
548 | filename = addressbookPersonalVCardName(); | 548 | beamFilename = addressbookPersonalVCardName(); |
549 | if (!QFile::exists(filename)) | 549 | if ( !QFile::exists( beamFilename ) ) |
550 | return; // can't beam a non-existent file | 550 | return; // can't beam a non-existent file |
551 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 551 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
552 | filename ); | 552 | beamFilename ); |
553 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 553 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
@@ -569,5 +569,6 @@ void AddressbookWindow::slotBeam() | |||
569 | 569 | ||
570 | filename = beamfile; | 570 | beamFilename = beamfile; |
571 | } | 571 | } |
572 | 572 | ||
573 | qWarning("Beaming: %s", beamFilename.latin1() ); | ||
573 | 574 | ||
@@ -576,3 +577,3 @@ void AddressbookWindow::slotBeam() | |||
576 | QString description = c.fullName(); | 577 | QString description = c.fullName(); |
577 | ir->send( filename, description, "text/x-vCard" ); | 578 | ir->send( beamFilename, description, "text/x-vCard" ); |
578 | } | 579 | } |
@@ -581,2 +582,3 @@ void AddressbookWindow::beamDone( Ir *ir ) | |||
581 | { | 582 | { |
583 | |||
582 | delete ir; | 584 | delete ir; |
@@ -641,5 +643,11 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) | |||
641 | editEntry( EditEntry ); | 643 | editEntry( EditEntry ); |
642 | 644 | } else if ( msg == "beamBusinessCard()" ) { | |
643 | 645 | QString beamFilename = addressbookPersonalVCardName(); | |
644 | 646 | if ( !QFile::exists( beamFilename ) ) | |
647 | return; // can't beam a non-existent file | ||
648 | |||
649 | Ir *ir = new Ir( this ); | ||
650 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | ||
651 | QString description = "mycard.vcf"; | ||
652 | ir->send( beamFilename, description, "text/x-vCard" ); | ||
645 | } | 653 | } |