[PATCH] Numbered Backups

Allen Winter winter at kde.org
Mon Jan 16 23:37:49 GMT 2006


Hi,

Attached is a patch that provides numbered backups (eg. fred.~1~, fred.~2~, ..., fred.~N~, where N is limited,
default=10) in the KSaveFile class.  It also renames the current backupFile() method to simpleBackupFile()
and then provides a new backupFile() method that reads the user's global configfile for backup file
parameters: the backup type, the backup extension, and the max number of backups.

Thus we could extend to other file backup schemes later, if desired.

An idea that would compliment this very well, and also provide a very cheap revision control method,
is a File->Revert capability which works as our typical file selector dialog, but filters on the backup extension.

For example, you are drawing in Krita.  You have 10 numbered backups of that drawing.  You totally screw-up
and want to revert back to an older version.   Select File->Revert, and  file selection dialog pop-ups with all
10 backups listed.  If you have preview on, you could click each backup file, preview each drawing, then select
which one you'd like to revert to.   Click <OK>.  Click <Yes> are sure you want to revert?

Anyhow, comments appreciated.

Regards,
Allen
-- 
Let's Keep the Political Talk Out of KDE PLEASE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksavefile.patch
Type: text/x-diff
Size: 11100 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060116/9a724984/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksavefiletest.cpp
Type: text/x-c++src
Size: 2909 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060116/9a724984/attachment.cpp>


More information about the kde-core-devel mailing list