don't wrongly overwrite GtkContainer#remove
authorgc <gc>
Sun, 17 Jun 2007 17:02:23 +0000 (17:02 +0000)
committergc <gc>
Sun, 17 Jun 2007 17:02:23 +0000 (17:02 +0000)
bin/booh
lib/booh/GtkAutoTable.rb

index 4cd0b34..2ce0159 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -1338,7 +1338,7 @@ def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
                     msg 3, "scheduling for delete: #{fullpath}"
                     $todelete << fullpath
                 end
-                autotable.remove(vbox)
+                autotable.remove_widget(vbox)
                 if after
                     $vbox2widgets[after][:textview].grab_focus
                     autoscroll_if_needed($autotable_sw, $vbox2widgets[after][:image], $vbox2widgets[after][:textview])
@@ -1385,7 +1385,7 @@ def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
             }
             save_undo(_("paste"),
                       proc { |cuts|
-                          cuts.each { |elem| autotable.remove(elem[:vbox]) }
+                          cuts.each { |elem| autotable.remove_widget(elem[:vbox]) }
                           $notebook.set_page(1)
                           proc {
                               cuts.each { |elem|
index ec83cff..c81c177 100644 (file)
@@ -102,7 +102,7 @@ class Gtk::AutoTable < Gtk::EventBox
     end
 
     #- remove a widget from the list of automatically handled widgets
-    def remove(widget)
+    def remove_widget(widget)
         @children.each_with_index { |chld, index|
             if chld[:widget] == widget
                 @children.delete_at(index)