Kouhei Sutou
kous****@users*****
Wed May 10 13:36:59 JST 2006
Index: kazehakase/data/ext/ruby/kazehakase-init.rb diff -u kazehakase/data/ext/ruby/kazehakase-init.rb:1.4 kazehakase/data/ext/ruby/kazehakase-init.rb:1.5 --- kazehakase/data/ext/ruby/kazehakase-init.rb:1.4 Sun Feb 12 00:29:52 2006 +++ kazehakase/data/ext/ruby/kazehakase-init.rb Wed May 10 13:36:59 2006 @@ -4,16 +4,22 @@ DEFAULT_LOAD_PATH = $LOAD_PATH.dup class << self - def reload(kz) - if ENABLE - $LOAD_PATH.clear - $LOAD_PATH.concat(DEFAULT_LOAD_PATH) - kz.ext_reload - end + def barrier + yield rescue Exception print_error($!) end + def reload(kz) + barrier do + if ENABLE + $LOAD_PATH.clear + $LOAD_PATH.concat(DEFAULT_LOAD_PATH) + kz.ext_reload + end + end + end + def pop_statusbar(kz, id, timeout) Gtk.timeout_add(timeout) do kz.statusbar.pop(id) @@ -22,9 +28,9 @@ end def setup(kz) - kz.ext_setup - rescue Exception - print_error($!) + barrier do + kz.ext_setup + end end end