[tomboy/autosync: 240/241] [sync] crazy conflict handling
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tomboy/autosync: 240/241] [sync] crazy conflict handling
- Date: Mon, 25 Jan 2010 19:38:30 +0000 (UTC)
commit 747663d380b8f34f7b86b2e1130da17cb8b8b316
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Mon Jan 25 09:13:05 2010 -0800
[sync] crazy conflict handling
Tomboy/Synchronization/ISyncUI.cs | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/Tomboy/Synchronization/ISyncUI.cs b/Tomboy/Synchronization/ISyncUI.cs
index 0063a96..b93d271 100644
--- a/Tomboy/Synchronization/ISyncUI.cs
+++ b/Tomboy/Synchronization/ISyncUI.cs
@@ -45,17 +45,25 @@ namespace Tomboy.Sync
#region ISyncUI implementation
public void SyncStateChanged (SyncState state)
{
- Logger.Debug ("SilentUI: SyncStateChanged");
+ // TODO: Update tray/applet icon
+ // D-Bus event?
+ // libnotify bubbles when appropriate
+ Logger.Debug ("SilentUI: SyncStateChanged: {0}", state);
}
public void NoteSynchronized (string noteTitle, NoteSyncType type)
{
- Logger.Debug ("SilentUI: NoteSynchronized");
+ Logger.Debug ("SilentUI: NoteSynchronized, Title: {0}, Type: {1}", noteTitle, type);
}
public void NoteConflictDetected (NoteManager manager, Note localConflictNote, NoteUpdate remoteNote, IList<string> noteUpdateTitles)
{
- Logger.Debug ("SilentUI: NoteConflictDetected, ignoring this update");
+ Logger.Debug ("SilentUI: NoteConflictDetected, overwriting without a care");
+ // TODO: At least respect conflict prefs
+ // TODO: Implement more useful conflict handling
+ if (localConflictNote.Id != remoteNote.UUID)
+ manager.Delete (localConflictNote);
+ SyncManager.ResolveConflict (SyncTitleConflictResolution.OverwriteExisting);
}
#endregion
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]