-rw-r--r-- | kabc/addresseeview.cpp | 15 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 29 |
2 files changed, 11 insertions, 33 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 487e8a5..2dda968 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -412,31 +412,29 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo | |||
412 | findButton( Ok )->setText( i18n("Remote")); | 412 | findButton( Ok )->setText( i18n("Remote")); |
413 | findButton( User1 )->setText( i18n("Local")); | 413 | findButton( User1 )->setText( i18n("Local")); |
414 | QWidget* topframe = new QWidget( this ); | 414 | QWidget* topframe = new QWidget( this ); |
415 | //QVBox* topframe = new QVBox( this ); | ||
416 | setMainWidget( topframe ); | 415 | setMainWidget( topframe ); |
417 | QBoxLayout* bl; | 416 | QBoxLayout* bl; |
418 | if ( QApplication::desktop()->width() < 640 ) { | 417 | if ( QApplication::desktop()->width() < 640 ) { |
419 | bl = new QVBoxLayout( topframe ); | 418 | bl = new QVBoxLayout( topframe ); |
420 | |||
421 | } else { | 419 | } else { |
422 | bl = new QHBoxLayout( topframe ); | 420 | bl = new QHBoxLayout( topframe ); |
423 | |||
424 | } | 421 | } |
425 | QVBox* subframe = new QVBox( topframe ); | 422 | QVBox* subframe = new QVBox( topframe ); |
426 | bl->addWidget(subframe ); | 423 | bl->addWidget(subframe ); |
427 | QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); | 424 | QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); |
425 | if ( takeloc ) | ||
426 | lab->setBackgroundColor(Qt::green.light() ); | ||
428 | AddresseeView * av = new AddresseeView( subframe ); | 427 | AddresseeView * av = new AddresseeView( subframe ); |
429 | av->setAddressee( loc ); | 428 | av->setAddressee( loc ); |
430 | subframe = new QVBox( topframe ); | 429 | subframe = new QVBox( topframe ); |
431 | bl->addWidget(subframe ); | 430 | bl->addWidget(subframe ); |
432 | lab = new QLabel( i18n("Remote Addressee"), subframe ); | 431 | lab = new QLabel( i18n("Remote Addressee"), subframe ); |
432 | if ( !takeloc ) | ||
433 | lab->setBackgroundColor(Qt::green.light() ); | ||
433 | av = new AddresseeView( subframe ); | 434 | av = new AddresseeView( subframe ); |
434 | av->setAddressee( rem ); | 435 | av->setAddressee( rem ); |
435 | 436 | QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote())); | |
436 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 437 | QObject::connect(this,SIGNAL(user1Clicked()),this, SLOT(slot_local())); |
437 | SLOT(slot_remote())); | ||
438 | QObject::connect(this,SIGNAL(user1Clicked()), | ||
439 | SLOT(slot_local())); | ||
440 | #ifndef DESKTOP_VERSION | 438 | #ifndef DESKTOP_VERSION |
441 | showMaximized(); | 439 | showMaximized(); |
442 | #else | 440 | #else |
@@ -452,7 +450,6 @@ int AddresseeChooser::executeD( bool local ) | |||
452 | else | 450 | else |
453 | findButton( Ok )->setFocus(); | 451 | findButton( Ok )->setFocus(); |
454 | exec(); | 452 | exec(); |
455 | qDebug("returning %d ",mSyncResult ); | ||
456 | return mSyncResult; | 453 | return mSyncResult; |
457 | } | 454 | } |
458 | void AddresseeChooser::slot_remote() | 455 | void AddresseeChooser::slot_remote() |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b1a951c..cc8eb52 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2627,35 +2627,17 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i | |||
2627 | return 2; | 2627 | return 2; |
2628 | break; | 2628 | break; |
2629 | case SYNC_PREF_ASK: | 2629 | case SYNC_PREF_ASK: |
2630 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), local->revision().toString().latin1(), remote->revision().toString().latin1() ); | 2630 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), local->revision().toString().latin1(), remote->revision().toString().latin1() ); |
2631 | if ( lastSync > remote->revision() ) | 2631 | if ( lastSync > remote->revision() ) |
2632 | return 1; | 2632 | return 1; |
2633 | if ( lastSync > local->revision() ) | 2633 | if ( lastSync > local->revision() ) |
2634 | return 2; | 2634 | return 2; |
2635 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), local->revision().toString().latin1(), remote->revision().toString().latin1() ); | ||
2636 | localIsNew = local->revision() >= remote->revision(); | 2635 | localIsNew = local->revision() >= remote->revision(); |
2637 | #if 0 | 2636 | //qDebug("conflict! ************************************** "); |
2638 | if ( localIsNew ) | ||
2639 | getEventViewerDialog()->setColorMode( 1 ); | ||
2640 | else | ||
2641 | getEventViewerDialog()->setColorMode( 2 ); | ||
2642 | getEventViewerDialog()->setIncidence(local); | ||
2643 | if ( localIsNew ) | ||
2644 | getEventViewerDialog()->setColorMode( 2 ); | ||
2645 | else | ||
2646 | getEventViewerDialog()->setColorMode( 1 ); | ||
2647 | getEventViewerDialog()->addIncidence(remote); | ||
2648 | getEventViewerDialog()->setColorMode( 0 ); | ||
2649 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); | ||
2650 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); | ||
2651 | getEventViewerDialog()->showMe(); | ||
2652 | result = getEventViewerDialog()->executeS( localIsNew ); | ||
2653 | #endif | ||
2654 | qDebug("conflict! ************************************** "); | ||
2655 | { | 2637 | { |
2656 | KPIM::AddresseeChooser acd ( *local,*remote, localIsNew , this ); | 2638 | KPIM::AddresseeChooser acd ( *local,*remote, localIsNew , this ); |
2657 | result = acd.executeD(localIsNew); | 2639 | result = acd.executeD(localIsNew); |
2658 | return result; | 2640 | return result; |
2659 | } | 2641 | } |
2660 | break; | 2642 | break; |
2661 | case SYNC_PREF_FORCE_LOCAL: | 2643 | case SYNC_PREF_FORCE_LOCAL: |
@@ -2974,7 +2956,6 @@ bool KABCore::syncAB(QString filename, int mode) | |||
2974 | #endif | 2956 | #endif |
2975 | } | 2957 | } |
2976 | 2958 | ||
2977 | |||
2978 | void KABCore::confSync() | 2959 | void KABCore::confSync() |
2979 | { | 2960 | { |
2980 | static KSyncPrefsDialog* sp = 0; | 2961 | static KSyncPrefsDialog* sp = 0; |