[gobject-introspection/mallard-templates] g-ir-doc-tool: use True and False instead of %TRUE and %FALSE



commit 14a438299675a5df7d931adf87b9d935ea8381bc
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date:   Sun Feb 19 15:27:54 2012 +0100

    g-ir-doc-tool: use True and False instead of %TRUE and %FALSE

 giscanner/mallardwriter.py                         |    2 ++
 .../GIRepository.BaseInfo.equal.page               |    2 +-
 .../GIRepository.BaseInfo.is_deprecated.page       |    2 +-
 .../GIRepository.BaseInfo.iterate_attributes.page  |    2 +-
 .../GIRepository.Repository.is_registered.page     |    2 +-
 .../GIRepository.arg_info_is_caller_allocates.page |    4 ++--
 .../GIRepository.arg_info_is_optional.page         |    2 +-
 .../GIRepository.arg_info_is_return_value.page     |    2 +-
 .../GIRepository.arg_info_is_skip.page             |    2 +-
 .../GIRepository.arg_info_may_be_null.page         |    2 +-
 ...GIRepository.callable_info_get_caller_owns.page |    2 +-
 ...ry.callable_info_iterate_return_attributes.page |    2 +-
 ...GIRepository.callable_info_may_return_null.page |    2 +-
 .../GIRepository.callable_info_skip_return.page    |    2 +-
 .../GIRepository.field_info_get_field.page         |    2 +-
 .../GIRepository.field_info_set_field.page         |    2 +-
 .../GIRepository.function_info_invoke.page         |    2 +-
 .../GIRepository.object_info_get_abstract.page     |    2 +-
 .../GIRepository.object_info_get_fundamental.page  |    2 +-
 .../GIRepository.signal_info_true_stops_emit.page  |    2 +-
 .../GIRepository.struct_info_is_gtype_struct.page  |    2 +-
 .../GIRepository.type_info_is_pointer.page         |    2 +-
 .../GIRepository.type_info_is_zero_terminated.page |    4 ++--
 .../GIRepository.union_info_is_discriminated.page  |    2 +-
 .../GIRepository.vfunc_info_invoke.page            |    2 +-
 25 files changed, 28 insertions(+), 26 deletions(-)
---
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index b54d587..dbc94ad 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -101,6 +101,8 @@ class MallardFormatterPython(MallardFormatter):
     def format(cls, doc):
         doc = MallardFormatter.format(doc)
         doc = doc.replace('%NULL', 'None')
+        doc = doc.replace('%TRUE', 'True')
+        doc = doc.replace('%FALSE', 'False')
         return doc
 
 class MallardWriter(object):
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.equal.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.equal.page
index 6d42488..268a6db 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.equal.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.equal.page
@@ -36,7 +36,7 @@ TypeLib; use this function instead to do <link xref="GIBaseInfo">GIBaseInfo</lin
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if and only if @info1 equals @info2.</p></td>
+<td><p>True if and only if @info1 equals @info2.</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.is_deprecated.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.is_deprecated.page
index b91a2f1..77de622 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.is_deprecated.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.is_deprecated.page
@@ -26,7 +26,7 @@ deprecated or not.</p>
 <table>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if deprecated</p></td>
+<td><p>True if deprecated</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.iterate_attributes.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.iterate_attributes.page
index 748dcc7..b0058bc 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.iterate_attributes.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.BaseInfo.iterate_attributes.page
@@ -68,7 +68,7 @@ g_print ("attribute name: %s value: %s", name, value);
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if there are more attributes</p></td>
+<td><p>True if there are more attributes</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.is_registered.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.is_registered.page
index 5503bec..862a6da 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.is_registered.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.is_registered.page
@@ -51,7 +51,7 @@ quickly as this function will if it has already been loaded.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if namespace-version is loaded, %FALSE otherwise</p></td>
+<td><p>True if namespace-version is loaded, False otherwise</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_caller_allocates.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_caller_allocates.page
index eedb9fc..dc010cf 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_caller_allocates.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_caller_allocates.page
@@ -28,7 +28,7 @@ def arg_info_is_caller_allocates(info)
 <p>Obtain if the argument is a pointer to a struct or object that will
 receive an output of a function.  The default assumption for
 %GI_DIRECTION_OUT arguments which have allocation is that the
-callee allocates; if this is %TRUE, then the caller must allocate.</p>
+callee allocates; if this is True, then the caller must allocate.</p>
 
 <table>
 <tr>
@@ -37,7 +37,7 @@ callee allocates; if this is %TRUE, then the caller must allocate.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if caller is required to have allocated the argument</p></td>
+<td><p>True if caller is required to have allocated the argument</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_optional.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_optional.page
index 1b10052..cf4cd16 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_optional.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_optional.page
@@ -34,7 +34,7 @@ def arg_info_is_optional(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if it is an optional argument</p></td>
+<td><p>True if it is an optional argument</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_return_value.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_return_value.page
index 43dc779..47ba38b 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_return_value.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_return_value.page
@@ -35,7 +35,7 @@ parameter or a return value.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if it is a return value</p></td>
+<td><p>True if it is a return value</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_skip.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_skip.page
index e0374e6..798fb24 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_skip.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_is_skip.page
@@ -34,7 +34,7 @@ def arg_info_is_skip(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if argument is only useful in C.</p></td>
+<td><p>True if argument is only useful in C.</p></td>
 </tr>
 </table>
 <p>Since 1.29.0</p>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_may_be_null.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_may_be_null.page
index 2d7afcc..d61a1e4 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_may_be_null.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.arg_info_may_be_null.page
@@ -34,7 +34,7 @@ def arg_info_may_be_null(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if it accepts None</p></td>
+<td><p>True if it accepts None</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_get_caller_owns.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_get_caller_owns.page
index ea9f843..de4f865 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_get_caller_owns.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_get_caller_owns.page
@@ -35,7 +35,7 @@ def callable_info_get_caller_owns(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if the caller owns the return value, %FALSE otherwise.</p></td>
+<td><p>True if the caller owns the return value, False otherwise.</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_iterate_return_attributes.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_iterate_return_attributes.page
index a33fdb2..a6ca95e 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_iterate_return_attributes.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_iterate_return_attributes.page
@@ -62,7 +62,7 @@ similar API.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if there are more attributes</p></td>
+<td><p>True if there are more attributes</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_may_return_null.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_may_return_null.page
index 6666f2f..ce2836c 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_may_return_null.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_may_return_null.page
@@ -34,7 +34,7 @@ def callable_info_may_return_null(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if callable could return None</p></td>
+<td><p>True if callable could return None</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_skip_return.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_skip_return.page
index 6a30bf2..50c2f33 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_skip_return.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.callable_info_skip_return.page
@@ -34,7 +34,7 @@ def callable_info_skip_return(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if return value is only useful in C.</p></td>
+<td><p>True if return value is only useful in C.</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_get_field.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_get_field.page
index 5873188..124f920 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_get_field.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_get_field.page
@@ -53,7 +53,7 @@ even if that is actually readable.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if reading the field succeeded, otherwise %FALSE</p></td>
+<td><p>True if reading the field succeeded, otherwise False</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_set_field.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_set_field.page
index d5a9580..039ab95 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_set_field.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.field_info_set_field.page
@@ -55,7 +55,7 @@ with a type such as 'char *' must be set with a setter function.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if writing the field succeeded, otherwise %FALSE</p></td>
+<td><p>True if writing the field succeeded, otherwise False</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.function_info_invoke.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.function_info_invoke.page
index 01429a9..c82f30f 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.function_info_invoke.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.function_info_invoke.page
@@ -79,7 +79,7 @@ have been g_module_symbol()&lt;!-- --&gt;ed before calling this function.</p><p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if the function has been invoked, %FALSE if an</p></td>
+<td><p>True if the function has been invoked, False if an</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_abstract.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_abstract.page
index 43182c3..87eadd6 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_abstract.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_abstract.page
@@ -35,7 +35,7 @@ instantiated</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if the object type is abstract</p></td>
+<td><p>True if the object type is abstract</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_fundamental.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_fundamental.page
index 9910356..a12ed1b 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_fundamental.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.object_info_get_fundamental.page
@@ -35,7 +35,7 @@ G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if the object type is a fundamental type</p></td>
+<td><p>True if the object type is a fundamental type</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.signal_info_true_stops_emit.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.signal_info_true_stops_emit.page
index 3803e19..9b20fc0 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.signal_info_true_stops_emit.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.signal_info_true_stops_emit.page
@@ -35,7 +35,7 @@ stop the emission of the signal.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if returning true stops the signal emission</p></td>
+<td><p>True if returning true stops the signal emission</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.struct_info_is_gtype_struct.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.struct_info_is_gtype_struct.page
index ea9756d..2331908 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.struct_info_is_gtype_struct.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.struct_info_is_gtype_struct.page
@@ -36,7 +36,7 @@ from generated public APIs.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if this is a class struct, %FALSE otherwise</p></td>
+<td><p>True if this is a class struct, False otherwise</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_pointer.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_pointer.page
index 5f474cd..a677cf7 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_pointer.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_pointer.page
@@ -34,7 +34,7 @@ def type_info_is_pointer(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if it is a pointer</p></td>
+<td><p>True if it is a pointer</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_zero_terminated.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_zero_terminated.page
index b795780..4acf474 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_zero_terminated.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.type_info_is_zero_terminated.page
@@ -26,7 +26,7 @@
 def type_info_is_zero_terminated(info)
 </code></synopsis>
 <p>Obtain if the last element of the array is None. The type tag must be a
-<link xref="GI_TYPE_TAG_ARRAY">GI_TYPE_TAG_ARRAY</link> or %FALSE will returned.</p>
+<link xref="GI_TYPE_TAG_ARRAY">GI_TYPE_TAG_ARRAY</link> or False will returned.</p>
 
 <table>
 <tr>
@@ -35,7 +35,7 @@ def type_info_is_zero_terminated(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if zero terminated</p></td>
+<td><p>True if zero terminated</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.union_info_is_discriminated.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.union_info_is_discriminated.page
index e2908c2..fe5536f 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.union_info_is_discriminated.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.union_info_is_discriminated.page
@@ -34,7 +34,7 @@ def union_info_is_discriminated(info)
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if this is a discriminated union, %FALSE otherwise</p></td>
+<td><p>True if this is a discriminated union, False otherwise</p></td>
 </tr>
 </table>
 </page>
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.vfunc_info_invoke.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.vfunc_info_invoke.page
index 0d26921..bb404e8 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.vfunc_info_invoke.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.vfunc_info_invoke.page
@@ -84,7 +84,7 @@ argument lists.</p><p>error occurred.</p>
 </tr>
 <tr>
 <td><p>Returns :</p></td>
-<td><p>%TRUE if the function has been invoked, %FALSE if an</p></td>
+<td><p>True if the function has been invoked, False if an</p></td>
 </tr>
 </table>
 </page>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]