From de4be1b51749200158ffb1984d6da3004b3690a9 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Wed, 20 Jul 2005 16:13:24 +0000 Subject: [PATCH] New files AUTHORS and LICENSE. New about dialog box (automatically generated according to the Gnome Interface Guidelines). The dialog box is filled with the informations from AUTHORS and LICENSE. --- helm/matita/AUTHORS | 4 +++ helm/matita/LICENSE | 23 ++++++++++++ helm/matita/matita.glade | 75 --------------------------------------- helm/matita/matitaGui.ml | 38 ++++++++++++++------ helm/matita/matitaGui.mli | 1 - 5 files changed, 55 insertions(+), 86 deletions(-) create mode 100644 helm/matita/AUTHORS create mode 100644 helm/matita/LICENSE diff --git a/helm/matita/AUTHORS b/helm/matita/AUTHORS new file mode 100644 index 000000000..9cf03ca6c --- /dev/null +++ b/helm/matita/AUTHORS @@ -0,0 +1,4 @@ +Andrea Asperti +Enrico Tassi +Claudio Sacerdoti Coen +Stefano Zacchiroli diff --git a/helm/matita/LICENSE b/helm/matita/LICENSE new file mode 100644 index 000000000..7665cd2ce --- /dev/null +++ b/helm/matita/LICENSE @@ -0,0 +1,23 @@ +Copyright (C) 2000-2005, HELM Team. + +Matita is part of HELM, an Hypertextual, Electronic +Library of Mathematics, developed at the Computer Science +Department, University of Bologna, Italy. + +HELM is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +HELM is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with HELM; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. + +For details, see the HELM World-Wide-Web page, +http://helm.cs.unibo.it/ diff --git a/helm/matita/matita.glade b/helm/matita/matita.glade index 2e4a84f55..d86e895d7 100644 --- a/helm/matita/matita.glade +++ b/helm/matita/matita.glade @@ -3,81 +3,6 @@ - - Matita: about - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - <b>Matita @VERSION@</b> - -<tt>http://helm.cs.unibo.it</tt> - -Copyright (C) 2005, -<i>the HELM team</i> - False - True - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 5 - 5 - - - 0 - False - False - - - - - - True Cic browser 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 diff --git a/helm/matita/matitaGui.mli b/helm/matita/matitaGui.mli index 550d86c60..a2b15513e 100644 --- a/helm/matita/matitaGui.mli +++ b/helm/matita/matitaGui.mli @@ -48,7 +48,6 @@ object (** {2 Access to singleton instances of lower-level GTK widgets} *) - method about : MatitaGeneratedGui.aboutWin method fileSel : MatitaGeneratedGui.fileSelectionWin method main : MatitaGeneratedGui.mainWin method findRepl : MatitaGeneratedGui.findReplWin -- 2.39.2