author | eilers <eilers> | 2002-12-11 16:54:48 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-12-11 16:54:48 (UTC) |
commit | 4322cafd7d14341e53027dadf417febe8bd49a56 (patch) (side-by-side diff) | |
tree | 8d4c82d18742792a60accdc2150a1f1598e1d935 /core/pim/addressbook/addressbook.cpp | |
parent | 7e573bad07c4046e0050ff7027c2a994d3580002 (diff) | |
download | opie-4322cafd7d14341e53027dadf417febe8bd49a56.zip opie-4322cafd7d14341e53027dadf417febe8bd49a56.tar.gz opie-4322cafd7d14341e53027dadf417febe8bd49a56.tar.bz2 |
Implemented dialog box for every received vcard to get user permission
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 60db2b4..e009d52 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -351,10 +351,34 @@ void AddressbookWindow::setDocument( const QString &filename ) filename ); OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); OContactAccess::List allList = access->allRecords(); + qWarning( "Found number of contacts in File: %d", allList.count() ); + bool doAsk = true; OContactAccess::List::Iterator it; for ( it = allList.begin(); it != allList.end(); ++it ){ + qWarning("Adding Contact from: %s", (*it).fullName().latin1() ); + if ( doAsk ){ + switch( QMessageBox::information( this, tr ( "Add Contact ?" ), + tr( "Do you really want add contact for \n%1 ?" ) + .arg( (*it).fullName().latin1() ), + tr( "&Yes" ), tr( "&No" ), tr( "&AllYes"), + 0, // Enter == button 0 + 2 ) ) { // Escape == button 2 + case 0: + qWarning("YES clicked"); + m_abView->addEntry( *it ); + break; + case 1: + qWarning("NO clicked"); + break; + case 2: + qWarning("YesAll clicked"); + doAsk = false; + break; + } + }else m_abView->addEntry( *it ); + } delete access; |