Proc.new { |pos|
autotable.reinsert(pos, vbox, filename)
$notebook.set_page(1)
+ autotable.queue_draws << proc { $vbox2textview[vbox].grab_focus }
Proc.new {
perform_delete.call
$notebook.set_page(1)
class Gtk::AutoTable < Gtk::VBox
+ attr_accessor :queue_draws
+
def initialize(row_spacings)
@children = []
@containers = []
@width = -1
@old_widths = []
+ @queue_draws = []
@row_spacings = row_spacings
@table = nil
super
end
}
@timeout = Gtk.timeout_add(100) {
- if @queue_draw
- queue_draw
- @queue_draw = false
+ if @queue_draws.size > 0
+ @queue_draws.each { |elem| elem.call }
+ @queue_draws.clear
end
true
}
put(e, e[:xnew], e[:ynew])
}
show_all
- @queue_draw = true
+ @queue_draws << proc { queue_draw }
end
end
end