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.
24 bindtextdomain("booh")
33 def save_undo(name, closure, params)
34 @undo_actions << { :name => name, :closure => closure, :params => params }
38 todo = @undo_actions.pop
39 redo_closure = todo[:closure].call(*todo[:params])
41 statusbar.push(0, utf8(_("Undo %s.") % todo[:name]))
42 @redo_actions << { :name => todo[:name], :redo => redo_closure, :undo => todo }
43 return !@undo_actions.empty?
47 redo_item = @redo_actions.pop
50 statusbar.push(0, utf8(_("Redo %s.") % redo_item[:name]))
51 @undo_actions << redo_item[:undo]
52 return !@redo_actions.empty?