author | zautrix <zautrix> | 2004-09-18 19:07:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-18 19:07:00 (UTC) |
commit | 28f894fd2a0dfbd5f09f9e530f359981efe0198c (patch) (unidiff) | |
tree | 426565d2716916f48b0c3e68b41e963fd10a3463 /kaddressbook | |
parent | ec8099bf369e5b8327ca6cfd78b34366353e3abf (diff) | |
download | kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.zip kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.tar.gz kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.tar.bz2 |
more AB sync
-rw-r--r-- | kaddressbook/kabcore.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b1a951c..cc8eb52 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2622,45 +2622,27 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i | |||
2622 | break; | 2622 | break; |
2623 | case SYNC_PREF_NEWEST: | 2623 | case SYNC_PREF_NEWEST: |
2624 | if ( local->revision() > remote->revision() ) | 2624 | if ( local->revision() > remote->revision() ) |
2625 | return 1; | 2625 | return 1; |
2626 | else | 2626 | else |
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: |
2662 | return 1; | 2644 | return 1; |
2663 | break; | 2645 | break; |
2664 | case SYNC_PREF_FORCE_REMOTE: | 2646 | case SYNC_PREF_FORCE_REMOTE: |
2665 | return 2; | 2647 | return 2; |
2666 | break; | 2648 | break; |
@@ -2969,17 +2951,16 @@ bool KABCore::syncAB(QString filename, int mode) | |||
2969 | } | 2951 | } |
2970 | } | 2952 | } |
2971 | setModified(); | 2953 | setModified(); |
2972 | } | 2954 | } |
2973 | 2955 | ||
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; |
2981 | if ( ! sp ) { | 2962 | if ( ! sp ) { |
2982 | sp = new KSyncPrefsDialog( this, "syncprefs", true ); | 2963 | sp = new KSyncPrefsDialog( this, "syncprefs", true ); |
2983 | } | 2964 | } |
2984 | sp->usrReadConfig(); | 2965 | sp->usrReadConfig(); |
2985 | #ifndef DESKTOP_VERSION | 2966 | #ifndef DESKTOP_VERSION |