[gtkada] Patch for gate with xalign alone property.
Pascal
p.p14 at orange.fr
Thu Jul 28 12:59:14 CEST 2011
Hello.
Despite gate won't be supported any more, here is a patch.
A gate error occurs when xalign property is not joined with yalign as attached example test2.glade.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.glade
Type: application/octet-stream
Size: 1045 bytes
Desc: not available
Url : /pipermail/gtkada/attachments/20110728/eef02261/attachment.obj
-------------- next part --------------
Patch:
--- ./src/glib-glade.adb.0 2007-06-23 04:19:34.000000000 +0200
+++ ./src/glib-glade.adb 2011-07-28 12:57:17.000000000 +0200
@@ -537,10 +537,11 @@
Put (File, To_Ada (Cur) & ", ");
- if Is_Float then
+ if Is_Float and Q /= null then
Put (File, To_Float (P.Value.all) & ", " & To_Float
(Q.Value.all));
-
+ elsif Is_Float and Q = null then
+ Put (File, To_Float (P.Value.all) & ", -1.0");
elsif Q /= null then
Put (File, To_Ada (P.Value.all) & ", " & To_Ada
(Q.Value.all));
@@ -548,7 +549,7 @@
-- ??? Need to find a clean and uniform way of handling default
-- integer values
- Put (File, To_Ada (P.Value.all) & ", -1");
+ Put (File, To_Ada (P.Value.all) & ", -1.0");
end if;
if Field3 /= "" and R /= null then
HTH gate users, Pascal.
http://blady.pagesperso-orange.fr
More information about the gtkada
mailing list