[gimp] pdb: update a bunch of docs where s/-1/%NULL/
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb: update a bunch of docs where s/-1/%NULL/
- Date: Sun, 25 Aug 2019 10:02:05 +0000 (UTC)
commit 24af75948388d3ae7803443df490389010935fa9
Author: Jehan <jehan girinstud io>
Date: Sun Aug 25 11:50:17 2019 +0200
pdb: update a bunch of docs where s/-1/%NULL/
Also add a none_ok on gimp_text_fontname() outarg since it is clearly
noted as being able to return no layer with invalid parameters.
app/pdb/progress-cmds.c | 2 +-
app/pdb/text-tool-cmds.c | 8 ++++----
libgimp/gimpprogress_pdb.c | 2 +-
libgimp/gimptexttool_pdb.c | 13 +++++++------
pdb/groups/progress.pdb | 2 +-
pdb/groups/text_tool.pdb | 8 ++++----
6 files changed, 18 insertions(+), 17 deletions(-)
---
diff --git a/app/pdb/progress-cmds.c b/app/pdb/progress-cmds.c
index 63eabfe05b..84b78ec6e9 100644
--- a/app/pdb/progress-cmds.c
+++ b/app/pdb/progress-cmds.c
@@ -317,7 +317,7 @@ register_progress_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_display_id ("gdisplay",
"gdisplay",
- "GimpDisplay to update progressbar in, or -1 for
a separate window",
+ "GimpDisplay to update progressbar in, or %NULL
for a separate window",
pdb->gimp, TRUE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
diff --git a/app/pdb/text-tool-cmds.c b/app/pdb/text-tool-cmds.c
index ce2d8f9426..7d1e8c6e34 100644
--- a/app/pdb/text-tool-cmds.c
+++ b/app/pdb/text-tool-cmds.c
@@ -162,7 +162,7 @@ register_text_tool_procs (GimpPDB *pdb)
"gimp-text-fontname");
gimp_procedure_set_static_strings (procedure,
"Add text at the specified location as a floating selection or a new
layer.",
- "This tool requires a fontname matching an installed PangoFT2 font. You
can specify the fontsize in units of pixels or points, and the appropriate metric is specified using the
size_type argument. The x and y parameters together control the placement of the new text by specifying the
upper left corner of the text bounding box. If the specified drawable parameter is valid, the text will be
created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the
text will appear as a new layer. Finally, a border can be specified around the final rendered text. The
border is measured in pixels. Parameter size-type is not used and is currently ignored. If you need to
display a font in points, divide the size in points by 72.0 and multiply it by the image's vertical
resolution.",
+ "This tool requires a fontname matching an installed PangoFT2 font. You
can specify the fontsize in units of pixels or points, and the appropriate metric is specified using the
size_type argument. The x and y parameters together control the placement of the new text by specifying the
upper left corner of the text bounding box. If the specified drawable parameter is valid, the text will be
created as a floating selection attached to the drawable. If the drawable parameter is not valid (%NULL), the
text will appear as a new layer. Finally, a border can be specified around the final rendered text. The
border is measured in pixels. Parameter size-type is not used and is currently ignored. If you need to
display a font in points, divide the size in points by 72.0 and multiply it by the image's vertical
resolution.",
"Martin Edlman & Sven Neumann",
"Spencer Kimball & Peter Mattis",
"1998- 2001",
@@ -176,7 +176,7 @@ register_text_tool_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"drawable",
- "The affected drawable: (-1 for a new text
layer)",
+ "The affected drawable: (%NULL for a new text
layer)",
pdb->gimp, TRUE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
@@ -233,8 +233,8 @@ register_text_tool_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_layer_id ("text-layer",
"text layer",
- "The new text layer or -1 if no layer was
created.",
- pdb->gimp, FALSE,
+ "The new text layer or %NULL if no layer was
created.",
+ pdb->gimp, TRUE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/libgimp/gimpprogress_pdb.c b/libgimp/gimpprogress_pdb.c
index 68148cd85a..a3e30badb1 100644
--- a/libgimp/gimpprogress_pdb.c
+++ b/libgimp/gimpprogress_pdb.c
@@ -37,7 +37,7 @@
/**
* _gimp_progress_init:
* @message: Message to use in the progress dialog.
- * @gdisplay: (nullable): GimpDisplay to update progressbar in, or -1 for a separate window.
+ * @gdisplay: (nullable): GimpDisplay to update progressbar in, or %NULL for a separate window.
*
* Initializes the progress bar for the current plug-in.
*
diff --git a/libgimp/gimptexttool_pdb.c b/libgimp/gimptexttool_pdb.c
index df38b0c567..29ca4e88b6 100644
--- a/libgimp/gimptexttool_pdb.c
+++ b/libgimp/gimptexttool_pdb.c
@@ -37,7 +37,7 @@
/**
* gimp_text_fontname:
* @image: The image.
- * @drawable: (nullable): The affected drawable: (-1 for a new text layer).
+ * @drawable: (nullable): The affected drawable: (%NULL for a new text layer).
* @x: The x coordinate for the left of the text bounding box.
* @y: The y coordinate for the top of the text bounding box.
* @text: The text to generate (in UTF-8 encoding).
@@ -57,14 +57,15 @@
* specifying the upper left corner of the text bounding box. If the
* specified drawable parameter is valid, the text will be created as a
* floating selection attached to the drawable. If the drawable
- * parameter is not valid (-1), the text will appear as a new layer.
+ * parameter is not valid (%NULL), the text will appear as a new layer.
* Finally, a border can be specified around the final rendered text.
* The border is measured in pixels. Parameter size-type is not used
* and is currently ignored. If you need to display a font in points,
* divide the size in points by 72.0 and multiply it by the image's
* vertical resolution.
*
- * Returns: (transfer none): The new text layer or -1 if no layer was created.
+ * Returns: (nullable) (transfer none):
+ * The new text layer or %NULL if no layer was created.
**/
GimpLayer *
gimp_text_fontname (GimpImage *image,
@@ -116,7 +117,7 @@ gimp_text_fontname (GimpImage *image,
/**
* _gimp_text_fontname: (skip)
* @image_ID: The image.
- * @drawable_ID: (nullable): The affected drawable: (-1 for a new text layer).
+ * @drawable_ID: (nullable): The affected drawable: (%NULL for a new text layer).
* @x: The x coordinate for the left of the text bounding box.
* @y: The y coordinate for the top of the text bounding box.
* @text: The text to generate (in UTF-8 encoding).
@@ -136,14 +137,14 @@ gimp_text_fontname (GimpImage *image,
* specifying the upper left corner of the text bounding box. If the
* specified drawable parameter is valid, the text will be created as a
* floating selection attached to the drawable. If the drawable
- * parameter is not valid (-1), the text will appear as a new layer.
+ * parameter is not valid (%NULL), the text will appear as a new layer.
* Finally, a border can be specified around the final rendered text.
* The border is measured in pixels. Parameter size-type is not used
* and is currently ignored. If you need to display a font in points,
* divide the size in points by 72.0 and multiply it by the image's
* vertical resolution.
*
- * Returns: The new text layer or -1 if no layer was created.
+ * Returns: (nullable): The new text layer or %NULL if no layer was created.
**/
gint32
_gimp_text_fontname (gint32 image_ID,
diff --git a/pdb/groups/progress.pdb b/pdb/groups/progress.pdb
index 417380e5ca..1c89cefe55 100644
--- a/pdb/groups/progress.pdb
+++ b/pdb/groups/progress.pdb
@@ -32,7 +32,7 @@ HELP
{ name => 'message', type => 'string', null_ok => 1,
desc => 'Message to use in the progress dialog' },
{ name => 'gdisplay', type => 'display', none_ok => 1,
- desc => 'GimpDisplay to update progressbar in, or -1 for a separate
+ desc => 'GimpDisplay to update progressbar in, or %NULL for a separate
window' }
);
diff --git a/pdb/groups/text_tool.pdb b/pdb/groups/text_tool.pdb
index c6b0fbcd3f..2365f869a7 100644
--- a/pdb/groups/text_tool.pdb
+++ b/pdb/groups/text_tool.pdb
@@ -29,7 +29,7 @@ argument. The x and y parameters together control the placement of the new
text by specifying the upper left corner of the text bounding box. If the
specified drawable parameter is valid, the text will be created as a floating
selection attached to the drawable. If the drawable parameter is not valid
-(-1), the text will appear as a new layer. Finally, a border can be specified
+(%NULL), the text will appear as a new layer. Finally, a border can be specified
around the final rendered text. The border is measured in pixels. Parameter
size-type is not used and is currently ignored. If you need to display a font
in points, divide the size in points by 72.0 and multiply it by the image's
@@ -44,7 +44,7 @@ HELP
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'drawable', type => 'drawable',
- desc => 'The affected drawable: (-1 for a new text layer)',
+ desc => 'The affected drawable: (%NULL for a new text layer)',
none_ok => 1 },
{ name => 'x', type => 'float',
desc => 'The x coordinate for the left of the text bounding box' },
@@ -65,8 +65,8 @@ HELP
);
@outargs = (
- { name => 'text_layer', type => 'layer',
- desc => 'The new text layer or -1 if no layer was created.' }
+ { name => 'text_layer', type => 'layer', none_ok => 1,
+ desc => 'The new text layer or %NULL if no layer was created.' }
);
%invoke = (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]