5 # A.k.a `Best web-album Of the world, Or your money back, Humerus'.
7 # The acronyn sucks, however this is a tribute to Dragon Ball by
8 # Akira Toriyama, where the last enemy beaten by heroes of Dragon
9 # Ball is named "Boo". But there was already a free software project
10 # called Boo, so this one will be it "Booh". Or whatever.
13 # Copyright (c) 2004 Guillaume Cottenceau <gc3 at bluewin.ch>
15 # This software may be freely redistributed under the terms of the GNU
16 # public license version 2.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 def save_undo(closure, params)
30 @undo_actions << { :closure => closure, :params => params }
34 todo = @undo_actions.pop
35 redo_closure = todo[:closure].call(*todo[:params])
36 @redo_actions << { :redo => redo_closure, :undo => todo }
37 return !@undo_actions.empty?
41 redo_item = @redo_actions.pop
43 @undo_actions << redo_item[:undo]
44 return !@redo_actions.empty?