Hello,
I've attached a patch for review to bug 167501 [1]
regards
A.
[1] http://bugzilla.gnome.org/show_bug.cgi?id=167501#c13
--
"Make everything as simple as possible, but not simpler."
-- Albert Einstein
Amos Brocco
Ph.D Student
Computer Science Department - DIUF
University of Fribourg
Address: A406 Pérolles 21
Bd. Pérolles 90, CH-1700 Fribourg
WWW: http://diuf.unifr.ch/pai/people/broccoa
Phone: +41 026 300 8481
-----Messaggio originale-----
Da: BROCCO Amos
Inviato: ven 19.10.2007 18:17
A: nautilus-list gnome org
Oggetto: Nautilus Undo
Hello,
I'm implementing an undo mechanism for Nautilus (see [1]).
I've already implemented some code [2] to manage a global operation history (nautilus-undostack-manager), menu entries and callbacks.
As there is work being done to move from gnome-vfs to gvfs I've not yet added the code to actually undo-redo file operations;
at this moment, selecting Undo or Redo does not perform real file operations but just prints a message on the console.
I've put some placeholders in nautilus-file-operations.c where the code to construct "undo data" will be put.
I've considered that every file operation (including undo/redo) is performed asynchronously, so the history is protected
using a mutex. Updates for the UI (menu items sensitivity, labels and tooltips) are pushed, when necessary, by mean of signals
(the UI being FMDirectoryView).
Some additional info on how the undo history works is found in nautilus-undostack-manager.c .
Comments/advices/critics/questions/help are welcome (thank you in advance :) )
Amos
[1] http://bugzilla.gnome.org/show_bug.cgi?id=167501
[2] http://diuf.unifr.ch/pai/people/broccoa/dev/01_nautilus-undo-initial.patch
--
"Make everything as simple as possible, but not simpler."
-- Albert Einstein
Amos Brocco
Ph.D Student
Computer Science Department - DIUF
University of Fribourg
Address: A406 Pérolles 21
Bd. Pérolles 90, CH-1700 Fribourg
WWW: http://diuf.unifr.ch/pai/people/broccoa
Phone: +41 026 300 8481