X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaGui.ml;h=90826e98f9f6e72265313c65495798849b5913a3;hb=de4be1b51749200158ffb1984d6da3004b3690a9;hp=f884bee2eba41145b2b9f7b33182701f6eba6c1f;hpb=1bcad789810fd37d346e690f18557aeedc6fe08c;p=helm.git diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index f884bee2e..90826e98f 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -107,7 +107,6 @@ let ask_unsaved parent = class gui () = (* creation order _is_ relevant for windows placement *) let main = new mainWin () in - let about = new aboutWin () in let fileSel = new fileSelectionWin () in let findRepl = new findReplWin () in let develList = new develListWin () in @@ -142,7 +141,7 @@ class gui () = (* glade's check widgets *) List.iter (fun w -> w#check_widgets ()) (let c w = (w :> unit>) in - [ c about; c fileSel; c main; c findRepl]); + [ c fileSel; c main; c findRepl]); (* key bindings *) List.iter (* global key bindings *) (fun (key, callback) -> self#addKeyBinding key callback) @@ -154,13 +153,33 @@ class gui () = *) [ ]; (* about win *) - ignore (about#aboutWin#event#connect#delete (fun _ -> true)); - ignore (main#aboutMenuItem#connect#activate (fun _ -> - about#aboutWin#show ())); - connect_button about#aboutDismissButton (fun _ -> - about#aboutWin#misc#hide ()); - about#aboutLabel#set_label (Pcre.replace ~pat:"@VERSION@" - ~templ:BuildTimeConf.version about#aboutLabel#label); + let parse_txt_file file = + let ch = open_in file in + let l_rev = ref [] in + try + while true do + l_rev := input_line ch :: !l_rev; + done; + assert false + with + End_of_file -> + close_in ch; + List.rev !l_rev in + let about_dialog = + GWindow.about_dialog + ~authors:(parse_txt_file "AUTHORS") + ~comments:"comments" + ~copyright:"Copyright (C) 2005, the HELM team" + ~license:(String.concat "\n" (parse_txt_file "LICENSE")) + (*?logo:GdkPixbuf.pixbuf*) + (*?logo_icon_name:string*) + ~name:"Matita" + ~version:BuildTimeConf.version + ~website:"http://helm.cs.unibo.it" + () + in + ignore (main#aboutMenuItem#connect#activate + (fun _ -> about_dialog#present ())); (* findRepl win *) let show_find_Repl () = findRepl#toplevel#misc#show (); @@ -721,7 +740,6 @@ class gui () = method console = console method sourceView: GSourceView.source_view = (source_view: GSourceView.source_view) - method about = about method fileSel = fileSel method findRepl = findRepl method main = main