summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Unidiff
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, 2 insertions, 4 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index c506e98..58fbccf 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -312,51 +312,49 @@ void AddressbookWindow::slotSetFont( int size )
312 // abList->resizeRows(); 312 // abList->resizeRows();
313 break; 313 break;
314 } 314 }
315} 315}
316 316
317 317
318 318
319void AddressbookWindow::importvCard() { 319void AddressbookWindow::importvCard() {
320 QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); 320 QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this );
321 if(!str.isEmpty() ){ 321 if(!str.isEmpty() ){
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" ) + 336 tr( "The selected file \n does not end with \".vcf\" \n. Do you really want to open it?" ),
337 tr ("does not end with \".vcf\" ") + ( "\n" ) +
338 tr ( "Do you really want to open it?" ),
339 tr( "&Yes" ), tr( "&No" ), QString::null, 337 tr( "&Yes" ), tr( "&No" ), QString::null,
340 0, // Enter == button 0 338 0, // Enter == button 0
341 2 ) ) { // Escape == button 2 339 2 ) ) { // Escape == button 2
342 case 0: 340 case 0:
343 qWarning("YES clicked"); 341 qWarning("YES clicked");
344 break; 342 break;
345 case 1: 343 case 1:
346 qWarning("NO clicked"); 344 qWarning("NO clicked");
347 return; 345 return;
348 break; 346 break;
349 } 347 }
350 } 348 }
351 349
352 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 350 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
353 filename ); 351 filename );
354 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 352 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
355 OContactAccess::List allList = access->allRecords(); 353 OContactAccess::List allList = access->allRecords();
356 354
357 OContactAccess::List::Iterator it; 355 OContactAccess::List::Iterator it;
358 for ( it = allList.begin(); it != allList.end(); ++it ){ 356 for ( it = allList.begin(); it != allList.end(); ++it ){
359 m_abView->addEntry( *it ); 357 m_abView->addEntry( *it );
360 } 358 }
361 359
362 delete access; 360 delete access;
@@ -788,49 +786,49 @@ bool AddressbookWindow::save()
788 return TRUE; 786 return TRUE;
789} 787}
790 788
791#ifdef __DEBUG_RELEASE 789#ifdef __DEBUG_RELEASE
792void AddressbookWindow::slotSave() 790void AddressbookWindow::slotSave()
793{ 791{
794 save(); 792 save();
795} 793}
796#endif 794#endif
797 795
798 796
799void AddressbookWindow::slotNotFound() 797void AddressbookWindow::slotNotFound()
800{ 798{
801 qWarning("Got notfound signal !"); 799 qWarning("Got notfound signal !");
802 QMessageBox::information( this, tr( "Not Found" ), 800 QMessageBox::information( this, tr( "Not Found" ),
803 tr( "Unable to find a contact for this \n search pattern!" ) ); 801 tr( "Unable to find a contact for this \n search pattern!" ) );
804 802
805 803
806} 804}
807void AddressbookWindow::slotWrapAround() 805void AddressbookWindow::slotWrapAround()
808{ 806{
809 qWarning("Got wrap signal !"); 807 qWarning("Got wrap signal !");
810 // if ( doNotifyWrapAround ) 808 // if ( doNotifyWrapAround )
811 // QMessageBox::information( this, tr( "End of list" ), 809 // QMessageBox::information( this, tr( "End of list" ),
812 // tr( "End of list. Wrap around now.. !" ) + "\n" ); 810 // tr( "End of list. Wrap around now...!" ) + "\n" );
813 811
814} 812}
815 813
816void AddressbookWindow::slotSetCategory( int c ) 814void AddressbookWindow::slotSetCategory( int c )
817{ 815{
818 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); 816 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() );
819 817
820 QString cat, book; 818 QString cat, book;
821 AbView::Views view = AbView::TableView; 819 AbView::Views view = AbView::TableView;
822 820
823 if ( c <= 0 ) 821 if ( c <= 0 )
824 return; 822 return;
825 823
826 // Checkmark Book Menu Item Selected 824 // Checkmark Book Menu Item Selected
827 if ( c < 3 ) 825 if ( c < 3 )
828 for ( unsigned int i = 1; i < 3; i++ ) 826 for ( unsigned int i = 1; i < 3; i++ )
829 catMenu->setItemChecked( i, c == (int)i ); 827 catMenu->setItemChecked( i, c == (int)i );
830 // Checkmark Category Menu Item Selected 828 // Checkmark Category Menu Item Selected
831 else 829 else
832 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 830 for ( unsigned int i = 3; i < catMenu->count(); i++ )
833 catMenu->setItemChecked( i, c == (int)i ); 831 catMenu->setItemChecked( i, c == (int)i );
834 832
835 for ( unsigned int i = 1; i < catMenu->count(); i++ ) { 833 for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
836 if (catMenu->isItemChecked( i )) { 834 if (catMenu->isItemChecked( i )) {