From bb909585480c3261834a36eac452a210660f1f58 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Tue, 11 Jan 2011 21:18:17 +0000 Subject: [PATCH] Stupid bug fixed (introduced a couple of commits ago): the close button for tabs always closed the first tab instead of the right one. --- matita/matita/matitaGui.ml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/matita/matita/matitaGui.ml b/matita/matita/matitaGui.ml index 71e7c2c00..63d0f999b 100644 --- a/matita/matita/matitaGui.ml +++ b/matita/matita/matitaGui.ml @@ -971,20 +971,19 @@ class gui () = method private newScript () = let scrolledWindow = GBin.scrolled_window () in let hbox = GPack.hbox () in - let tab_label = GMisc.label ~text:"foo" - ~packing:hbox#pack () in + let tab_label = GMisc.label ~text:"foo" ~packing:hbox#pack () in let _ = GMisc.label ~text:"" ~packing:(hbox#pack ~expand:true ~fill:true) () in let closebutton = GButton.button ~relief:`NONE ~packing:hbox#pack () in - let image = - GMisc.image ~stock:`CLOSE ~icon_size:`MENU () in + let image = GMisc.image ~stock:`CLOSE ~icon_size:`MENU () in closebutton#set_image image#coerce; let script = MatitaScript.script ~parent:scrolledWindow ~tab_label () in ignore (main#scriptNotebook#prepend_page ~tab_label:hbox#coerce scrolledWindow#coerce); ignore (closebutton#connect#clicked (fun () -> - self#closeScript (main#scriptNotebook#page_num hbox#coerce) script)); + self#closeScript + (main#scriptNotebook#page_num scrolledWindow#coerce) script)); main#scriptNotebook#goto_page 0; sequents_viewer#reset; sequents_viewer#load_logo; -- 2.39.2