[gtkada] Examples global improvement patch proposals.

Emmanuel Briot briot at adacore.com
Wed Aug 1 15:23:14 CEST 2012


> 
> a) Add a clean quit callback on window delete event:

The patch is incorrect. You are not supposed to call Gtk.Main.Main_Quit yourself, just return False from the delete_event callback.
Please attach the patches to your message, rather than paste them, to avoid copy-paste error and make it easier to apply the patch.


> b) More understandable message on exception:

I do not understand this patch. Because of the call to Add_Watch, the callback should already be automatically disabled, and thus the message you put in your exception handler does not make sense.

> c) Ready to use example:

Why not, assuming the user runs the example from the test directory.
I have applied that patch.

> d) Precise help message on screen:
> 
> --- ./examples/documentation/banner.adb.0	2012-05-18 10:04:14.000000000 +0200
> +++ ./examples/documentation/banner.adb	2012-07-09 13:27:11.000000000 +0200
> @@ -18,7 +18,7 @@
>    Set_Position (Win, Win_Pos_Center);
>    Set_Size_Request (Win, 300, 300);
> 
> -   Gtk_New (Label, "You should show a pixmap instead...");
> +   Gtk_New (Label, "You should show a pixmap instead... (ctrl-c to exit)");
>    Add (Win, Label);



Patch applied

Emmanuel



More information about the gtkada mailing list