diff options
author | David Cantrell <dcantrel@mortise.boston.redhat.com> | 2007-08-08 18:14:08 -0400 |
---|---|---|
committer | David Cantrell <dcantrel@mortise.boston.redhat.com> | 2007-08-08 18:14:08 -0400 |
commit | 3bb8494e1ed5af0a48ad0211c3219e653167854f (patch) | |
tree | 712022b759a7f132993d311f569d949196930f6d /libparted/Makefile.am | |
parent | 3769f0a1775773bbb9074492b72bc81b1ed33c7e (diff) | |
download | parted-3bb8494e1ed5af0a48ad0211c3219e653167854f.tar.gz |
History with undo and redo capabilities.
Author: Matt Davis <mattdavis@gmail.com>
Here is a working version of the history with undo/redo capabilities. The
idea here was based on a talk with Otavio Salvador who mentioned the concepts
from Vanni Brutto. The idea being to capture all changes and only apply them
all at once. This protects the user from performing an unwanted change. What
I did was capture all disk modifications that are committed to disk, and put
them in a list. The history manager allows the list to be traversed linearly,
so that a change can be undone, viewed in parted (print command), or reapplied
again. Nothing actually happens to the physical disk until the 'save' command
is issued.
Jim Meyering suggested that the functionality might be useful to libparted
thus most of the functionality has been moved there. The stdout displays
(printf) are placed in parted.c as the library should not do any output
printing on its own.
Three commands were added:
1) Undo : Undoes a disk modification
2) Redo : Redoes the most recent 'undone' modification
3) Save : Actually commits the list of non-undone modifications to disk
I feel a bit more testing needs to be done, but I am happy with the results
right now.
Diffstat (limited to 'libparted/Makefile.am')
-rw-r--r-- | libparted/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libparted/Makefile.am b/libparted/Makefile.am index 0b013cc..83f4a3e 100644 --- a/libparted/Makefile.am +++ b/libparted/Makefile.am @@ -24,6 +24,7 @@ libparted_la_SOURCES = debug.c \ timer.c \ unit.c \ disk.c \ + history.c \ cs/geom.c \ cs/constraint.c \ cs/natmath.c \ |