summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 5ce90a9..30fa85b 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -322,97 +322,97 @@ void AddressbookWindow::importvCard() {
322 setDocument((const QString&) str ); 322 setDocument((const QString&) str );
323 } 323 }
324 324
325} 325}
326 326
327void AddressbookWindow::setDocument( const QString &filename ) 327void AddressbookWindow::setDocument( const QString &filename )
328{ 328{
329 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); 329 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() );
330 330
331 if ( filename.find(".vcf") != int(filename.length()) - 4 ){ 331 if ( filename.find(".vcf") != int(filename.length()) - 4 ){
332 332
333 333
334 334
335 switch( QMessageBox::information( this, tr ( "Right file type ?" ), 335 switch( QMessageBox::information( this, tr ( "Right file type ?" ),
336 tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ), 336 tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ),
337 tr( "&Yes" ), tr( "&No" ), QString::null, 337 tr( "&Yes" ), tr( "&No" ), QString::null,
338 0, // Enter == button 0 338 0, // Enter == button 0
339 2 ) ) { // Escape == button 2 339 2 ) ) { // Escape == button 2
340 case 0: 340 case 0:
341 qWarning("YES clicked"); 341 qWarning("YES clicked");
342 break; 342 break;
343 case 1: 343 case 1:
344 qWarning("NO clicked"); 344 qWarning("NO clicked");
345 return; 345 return;
346 break; 346 break;
347 } 347 }
348 } 348 }
349 349
350 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 350 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
351 filename ); 351 filename );
352 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 352 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
353 OContactAccess::List allList = access->allRecords(); 353 OContactAccess::List allList = access->allRecords();
354 qWarning( "Found number of contacts in File: %d", allList.count() ); 354 qWarning( "Found number of contacts in File: %d", allList.count() );
355 355
356 if ( !allList.count() ) { 356 if ( !allList.count() ) {
357 QMessageBox::information( this, "Import VCard", 357 QMessageBox::information( this, "Import VCard",
358 "It was impossible to import the VCard.\n" 358 "It was impossible to import the VCard.\n"
359 "The VCard may be corrupted!" ); 359 "The VCard may be corrupted!" );
360 } 360 }
361 361
362 bool doAsk = true; 362 bool doAsk = true;
363 OContactAccess::List::Iterator it; 363 OContactAccess::List::Iterator it;
364 for ( it = allList.begin(); it != allList.end(); ++it ){ 364 for ( it = allList.begin(); it != allList.end(); ++it ){
365 qWarning("Adding Contact from: %s", (*it).fullName().latin1() ); 365 qWarning("Adding Contact from: %s", (*it).fullName().latin1() );
366 if ( doAsk ){ 366 if ( doAsk ){
367 switch( QMessageBox::information( this, tr ( "Add Contact?" ), 367 switch( QMessageBox::information( this, tr ( "Add Contact?" ),
368 tr( "Do you really want add contact for \n%1?" ) 368 tr( "Do you really want add contact for \n%1?" )
369 .arg( (*it).fullName().latin1() ), 369 .arg( (*it).fullName().latin1() ),
370 tr( "&Yes" ), tr( "&No" ), tr( "&AllYes"), 370 tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"),
371 0, // Enter == button 0 371 0, // Enter == button 0
372 2 ) ) { // Escape == button 2 372 2 ) ) { // Escape == button 2
373 case 0: 373 case 0:
374 qWarning("YES clicked"); 374 qWarning("YES clicked");
375 m_abView->addEntry( *it ); 375 m_abView->addEntry( *it );
376 break; 376 break;
377 case 1: 377 case 1:
378 qWarning("NO clicked"); 378 qWarning("NO clicked");
379 break; 379 break;
380 case 2: 380 case 2:
381 qWarning("YesAll clicked"); 381 qWarning("YesAll clicked");
382 doAsk = false; 382 doAsk = false;
383 break; 383 break;
384 } 384 }
385 }else 385 }else
386 m_abView->addEntry( *it ); 386 m_abView->addEntry( *it );
387 387
388 } 388 }
389 389
390 delete access; 390 delete access;
391} 391}
392 392
393void AddressbookWindow::resizeEvent( QResizeEvent *e ) 393void AddressbookWindow::resizeEvent( QResizeEvent *e )
394{ 394{
395 QMainWindow::resizeEvent( e ); 395 QMainWindow::resizeEvent( e );
396 396
397 397
398} 398}
399 399
400AddressbookWindow::~AddressbookWindow() 400AddressbookWindow::~AddressbookWindow()
401{ 401{
402 ToolBarDock dock; 402 ToolBarDock dock;
403 int dummy; 403 int dummy;
404 bool bDummy; 404 bool bDummy;
405 getLocation ( listTools, dock, dummy, bDummy, dummy ); 405 getLocation ( listTools, dock, dummy, bDummy, dummy );
406 m_config.setToolBarDock( dock ); 406 m_config.setToolBarDock( dock );
407 m_config.save(); 407 m_config.save();
408} 408}
409 409
410void AddressbookWindow::slotUpdateToolbar() 410void AddressbookWindow::slotUpdateToolbar()
411{ 411{
412 OContact ce = m_abView->currentEntry(); 412 OContact ce = m_abView->currentEntry();
413 actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); 413 actionMail->setEnabled( !ce.defaultEmail().isEmpty() );
414} 414}
415 415
416void AddressbookWindow::slotListNew() 416void AddressbookWindow::slotListNew()
417{ 417{
418 OContact cnt; 418 OContact cnt;