[gtkada] testgtk/main_windows.adb patch proposal.

Nicolas Setton setton at adacore.com
Mon Jul 16 16:50:06 CEST 2012


Patch entered in the development branch - thank you.

Nicolas

On 11 Jul 2012, at 21:24, Pascal wrote:

> Hello, in testgtk-main_windows from GtkAda GPL 2012, Help dialog is not destroyed when closing the window.
> Here is a patch proposal:
> 
> --- ./testgtk/main_windows.adb.0	2012-05-18 10:03:33.000000000 +0200
> +++ ./testgtk/main_windows.adb	2012-07-10 22:18:55.000000000 +0200
> @@ -158,7 +158,7 @@
>    package Notebook_Cb is new Gtk.Handlers.User_Callback
>      (Gtk_Notebook_Record, Gtk_Notebook);
> 
> -   Help_Dialog : Gtk.Dialog.Gtk_Dialog;
> +   Help_Dialog : aliased Gtk.Dialog.Gtk_Dialog;
>    Help_Text   : Gtk.Text_Buffer.Gtk_Text_Buffer;
>    --  The dialog used to display the help window
> 
> @@ -522,6 +522,10 @@
>                      Auto_Shrink => True);
>          Set_Title (Help_Dialog, "testgtk help");
>          Set_Default_Size (Help_Dialog, 640, 450);
> +         Destroy_Dialog_Handler.Connect
> +           (Help_Dialog, "destroy",
> +            Destroy_Dialog_Handler.To_Marshaller (Destroy_Dialog'Access),
> +            Help_Dialog'Access);
> 
>          Set_Spacing (Get_Vbox (Help_Dialog), 3);
> 
> HTH, Pascal.
> http://blady.pagesperso-orange.fr
> 
> 
> _______________________________________________
> gtkada mailing list
> gtkada at lists.adacore.com
> http://lists.adacore.com/mailman/listinfo/gtkada
> 



More information about the gtkada mailing list