~vcs-imports/gimp/+git/gimp:wip/nielsdg/bash-completion

Last commit made on 2022-05-28
Get this branch:
git clone -b wip/nielsdg/bash-completion https://git.launchpad.net/~vcs-imports/gimp/+git/gimp

Branch merges

Branch information

Name:
wip/nielsdg/bash-completion
Repository:
lp:~vcs-imports/gimp/+git/gimp

Recent commits

7e3a5a4... by NielsDG

Add a Bash completion file

dbd4751... by lumingzh

Update Chinese (China) translation

e301f2e... by Jordi Mas

Update Catalan translation

c02b483... by Jehan <email address hidden>

extensions: remove call to gettext.bind_textdomain_codeset().

I added this call originally, mimicking the C plug-ins. Yet in Python,
this function is deprecated since Python 3.8 and removed in 3.10.
Looking closer in the docs, it looks like Python's gettext module works
differently.

While all the *gettext() functions return strings in the locale's
encoding in C, unless overriden by bind_textdomain_codeset() (therefore
we need this call, in order to have locale-independent string encoding),
this is not the case in Python, whose gettext() call is already
locale-independent. The gettext.bind_textdomain_codeset() function only
applies to the specific l*gettext() functions which are deprecated too.

Fixes the warning:

> goat-exercise-py3.py:37: DeprecationWarning: bind_textdomain_codeset() is deprecated

a773e1c... by Jehan <email address hidden>

libgimp: minor nitpick fixes.

- Use GLib types even if it's the same thing here.
- Remove one redundant test (`*sp` is already tested by the for() loop).

2d192ae... by Jehan <email address hidden>

app: fix GStrv argument validation in PDB calls.

Bugs introduced in commit 8eb7f6df9e9:

- The type test was wrong.
- The UTF-8 validation test was also wrong since it was still working on
  a GimpArray even though the data was now a GStrv.

Also I stop at the first invalid UTF-8 string element, otherwise later
valid strings may hide previous invalid ones.

This bug was mostly invisible since we don't have any core PDB API with
GStrv parameter so far, only GStrv return value.

8c43e64... by Jehan <email address hidden>

app: gimp_container_get_name_array() should always return a GStrv.

Even if the container is empty, then we return a GStrv of length 1 (i.e.
an array of length 1, terminating with NULL).

In particular, it improves gimp_container_get_filtered_name_array() as
well, and in turn various list-returning functions in libgimp. This
makes the API more consistent after changes from commit 8eb7f6df9e9.

Note that a NULL return can be acceptable for error cases, but an empty
list because this is the expected result for the request should be an
empty GStrv, not NULL.

a6fab71... by Jehan <email address hidden>

app: gimp_pdb_query() returns a GStrv.

In particular, since commit 8eb7f6df9e9, even if it returns an empty
array of procedure, it still means an array of size 1 (with the unique
value being NULL).

This also fixes the public API gimp_pdb_query_procedures() which returns
a GStrv using gimp_pdb_query() internally.

Finally don't keep track of the array size, just recompute it with
g_strv_length(), which will be much less bug-prone.

8c1414e... by Jehan <email address hidden>

app: fix gimp_g_value_get_memsize() with GStrv value.

Since GStrv are NULL-terminated arrays, there is always one additional
pointer (NULL).
This is a detail, but still, wrong since commit 8eb7f6df9e9 which
replaced GimpStringArray by GStrv usage.

3fd21f9... by lumingzh

Update Chinese (China) translation