with Gtk.Menu_Item; use Gtk.Menu_Item; with Gtk; use Gtk; with Gtk.Main; use Gtk.Main; with Glib.Error; use Glib.Error; with Gtk.Widget; use Gtk.Widget; --with Gtk.Object; use Gtk.Object; with Gtk.Dialog; use Gtk.Dialog; with Gtk.Label; use Gtk.Label; with Version; use Version; with Ada.Text_IO; with Gtkada.Builder; use Gtkada.Builder; with Gtk.Text_Buffer; use Gtk.Text_Buffer; with Glib; use Glib; with Glib.Object; use Glib.Object; with graphical_editor.about_callbacks; use graphical_editor.about_callbacks; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; package body graphical_editor.abouts is procedure Show_About_Widget is Builder : Gtkada_Builder; Error : Glib.Error.GError; Buffer_text : GObject; Program_Name: String:="cheddar"; begin Gtk.Main.Init; Gtk_New (Builder); Error := Add_From_File (Builder, to_string(Glade_path) & "about.glade"); if Error /= null then Ada.Text_IO.Put_Line ("Error : " & Get_Message (Error)); Error_Free (Error); return; end if; -- revoir cette écriture, en utilisant directement l'ancien format ... celui que j'ai utilisé pour show message ... Buffer_text:=Get_Object(Builder, "textbuffer1"); Gtk.Text_Buffer.Set_Text(Gtk_Text_Buffer(Buffer_text), to_string(Program_Name & " version " & Cheddar_Version & ", Copyright (C) 2002-2014, by Frank Singhoff, Alain Plantec, Jerome Legrand" & unbounded_lf & Cheddar_svn_version & unbounded_lf & "The Cheddar project was started in 2002 by Frank Singhoff, Lab-STICC Team, CNRS UMR 6285, Université de Bretagne Occidentale " & unbounded_lf & "Since 2008, Ellidiss technologies also contributes to the development of Cheddar and provides industrial support" & unbounded_lf & Program_Name & " comes with ABSOLUTELY NO WARRANTY; " & unbounded_lf & "This is free software, and you are welcome to redistribute it" & unbounded_lf & "under certain conditions; See the GNU General Public License for details.")); Register_Handler (Builder => Builder, Handler_Name => "on_button1_clicked", Handler => about_callbacks.Close_About_Widget'Access); Do_Connect (Builder); Gtk.Widget.Show_All (Get_Widget (Builder, "window1")); Gtk.Main.Main; Unref (Builder); end Show_About_Widget; end graphical_editor.abouts;