Bug 61103 - The InternalEditorAction asks in a very cryptic way for conflict resolution
Summary: The InternalEditorAction asks in a very cryptic way for conflict resolution
Status: RESOLVED FIXED
Alias: None
Product: kpilot
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Reinhold Kainhofer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-11 21:32 UTC by Reinhold Kainhofer
Modified: 2003-07-27 23:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhold Kainhofer 2003-07-11 21:33:00 UTC
Version:           KPilot 4.4.0 (HEAD), pilot-link 0.11.7 (using KDE Devel)
Installed from:    Compiled sources

When a record has been edited in an internal viewer of KPilot, and the same record is marked dirty on the handheld, the InternalEditorAction asks the user which version should be used. The phrase is always 
"The record with ID %1 of the database \"%2\" was changed on the handheld and in the internal editor. Which version is the current one?"

For databases like AddressDB, MemoDB, TodoDB and DatebookDB we know the record structure and we have the classes awailable, so in these cases the question should give a short summary of the record (i.e. Name for the addressDB, description for DdatebookDB, todo text for ToDoDB and memo title for MemoDB).
Comment 1 Reinhold Kainhofer 2003-07-11 21:40:44 UTC
Also, once the KHexEdit widget is available, we can just show the raw record data 
(read-only) for the conflicting records, so the user can at lease get a quick look at 
some familiar strings inbetween unprintable characters. That's certainly better than 
just giving an arbitrary number (the index) which doesn't tell you anything about the  
record contents. 
Comment 2 Reinhold Kainhofer 2003-07-27 23:26:46 UTC
Subject: kdepim/kpilot

CVS commit by kainhofe: 

Fixed bug #61103. The internal editor action now displays the contents of the conflicting records to the user and lets him decide which one overrides.

For this I added a function getTextRepresentation(bool richText) to PilotAppCategory, PilotAddress, PilotMemo, PilotDateEnty and PilotTodoEnty, which returns the contents of the record as a string that can be shown to the user. Moved the corresponding code from the internal viewers to the classes.

If there is no nice-text representation, I now use KHE::KHexEdit to show the raw contents to the user, so he gets an idea of the conflicting records.

Screenshots of the new resolution dialogs are at:
http://reinhold.kainhofer.com/Linux/KPilot/pictures/KPilot_InternalEditorSync1.png
http://reinhold.kainhofer.com/Linux/KPilot/pictures/KPilot_InternalEditorSync2.png
http://reinhold.kainhofer.com/Linux/KPilot/pictures/KPilot_InternalEditorSync3.png
http://reinhold.kainhofer.com/Linux/KPilot/pictures/KPilot_InternalEditorSync4.png

CCMAIL: 61103-done@bugs.kde.org


  M +1 -0      kpilot/.cvsignore   1.16
  M +3 -4      kpilot/Makefile.am   1.80
  M +3 -111    kpilot/addressWidget.cc   1.61
  M +137 -11   kpilot/internalEditorAction.cc   1.4
  M +2 -0      kpilot/internalEditorAction.h   1.2
  M +2 -3      kpilot/todoEditor.cc   1.5
  M +2 -44     kpilot/todoWidget.cc   1.4
  M +106 -1    lib/pilotAddress.cc   1.12
  M +11 -6     lib/pilotAddress.h   1.7
  M +2 -0      lib/pilotAppCategory.h   1.9
  M +130 -6    lib/pilotDateEntry.cc   1.12
  M +8 -7      lib/pilotDateEntry.h   1.12
  M +13 -3     lib/pilotMemo.cc   1.7
  M +2 -1      lib/pilotMemo.h   1.6
  M +55 -7     lib/pilotTodoEntry.cc   1.14
  M +10 -9     lib/pilotTodoEntry.h   1.10