3 # A.k.a `Best web-album Of the world, Or your money back, Humerus'.
5 # The acronyn sucks, however this is a tribute to Dragon Ball by
6 # Akira Toriyama, where the last enemy beaten by heroes of Dragon
7 # Ball is named "Boo". But there was already a free software project
8 # called Boo, so this one will be it "Booh". Or whatever.
11 # Copyright (c) 2004 Guillaume Cottenceau <gc3 at bluewin.ch>
13 # This software may be freely redistributed under the terms of the GNU
14 # public license version 2.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 bindtextdomain("booh")
31 def save_undo(name, closure, params)
32 @undo_actions << { :name => name, :closure => closure, :params => params }
36 todo = @undo_actions.pop
37 redo_closure = todo[:closure].call(*todo[:params])
39 statusbar.push(0, utf8(_("Undo %s.") % todo[:name]))
40 @redo_actions << { :name => todo[:name], :redo => redo_closure, :undo => todo }
41 return !@undo_actions.empty?
45 redo_item = @redo_actions.pop
48 statusbar.push(0, utf8(_("Redo %s.") % redo_item[:name]))
49 @undo_actions << redo_item[:undo]
50 return !@redo_actions.empty?