GLib has a specific type of NULL-terminated string arrays:
`G_TYPE_STRV`, which is the `GType` of `char**` aka `GStrv`.
By using this type, we can avoid having a `GimpStringArray` which is a
bit cumbersome to use for both the C API, as well as bindings. By using
`GStrv`, we allow other languages to pass on string lists as they are
used to, while the bindings will make sure to do the right thing.
In the end, it makes the API a little bit simpler for everyone, and
reduces confusion for people who are used to working with string arrays
in other C/GLib based code (and not having 2 different types to denote
the same thing).
Related: https://gitlab.gnome.org/GNOME/gimp/-/issues/5919
The colon-separated list used in the plugin originally comes from
gimp_help_get_locales() anyway. My previous code was using different
lists of locales in different places, which was inconsistent.
Be a little cleverer about what locale we care about in the context of
the help system. Variants and encoding in particular are of no interest
to us.
Let's also always add a base language (like "en" for "en_GB") rather
than fully trusting g_get_language_names() since it seems to return
funny results on some platform.
Finally check for duplicates before adding to language list.
It seems that the Windows platform could sometimes return locales in the
form en-GB (so an IETF language tag, I guess) instead of a POSIX locale.
This little hack should take care of the easy cases until we get a
better and generic fix.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-06-12 Sven Neumann <sven@gimp.org>
Added basic support for using the online user manual:
* app/widgets/gimphelp.c
* plug-ins/help/gimphelp.c: moved some help logic to the core.
The
default help domain is now constructed in the core and passed to
the help plug-ins just like the plug-in help domains.
* app/config/Makefile.am
* app/config/gimprc-blurbs.h
* app/config/gimpguiconfig.[ch]: added gimprc properties to
specify the location of the online user manual and to decide if
it
should be used instead of a locally installed copy.
svn path=/trunk/; revision=25938
2008-05-16 Sven Neumann <sven@gimp.org>
* plug-ins/help/Makefile.am
* plug-ins/help/gimphelpprogress.[ch]
* plug-ins/help/gimphelpprogress-private.h: new files providing a
simple framework for progress indication and cancellation.
* plug-ins/help/gimphelp.[ch]
* plug-ins/help/gimphelpdomain.[ch]
* plug-ins/help/gimphelpitem.[ch]
* plug-ins/help/gimphelplocale.[ch]
* plug-ins/help/gimphelptypes.h
* plug-ins/help/help.c
* plug-ins/help/locales.[ch]: changed accordingly (passing NULL
as progress for now). Also updated copyright headers.
* plug-ins/help-browser/help-browser.c: same here.
* plug-ins/help/gimp-help-lookup.c: use the new API and show some
progress indication when the --verbose command-line option is used.
svn path=/trunk/; revision=25674
2008-04-02 Sven Neumann <sven@gimp.org>
* plug-ins/help/Makefile.am
* plug-ins/help/gimphelpdomain.[ch]
* plug-ins/help/gimphelplocale.[ch]
* plug-ins/help/gimphelp.[ch]
* plug-ins/help/gimp-help-lookup.c: use GIO to access the help index.
svn path=/trunk/; revision=25331
2006-11-20 Michael Natterer <mitch@gimp.org>
* plug-ins/help/domain.[ch]
* plug-ins/help/help.h: removed these files...
* plug-ins/help/gimphelptypes.h
* plug-ins/help/gimphelp.[ch]
* plug-ins/help/gimphelpdomain.[ch]
* plug-ins/help/gimphelpitem.[ch]
* plug-ins/help/gimphelplocale.[ch]: ...completely chopped them
and added a new private utility library. Soon to be used by the
helpbrowser too.
* plug-ins/help/Makefile.am
* plug-ins/help/gimp-help-lookup.c
* plug-ins/help/help.c: changed accordingly.
2005-02-07 Sven Neumann <sven@gimp.org>
* plug-ins/help/domain.c
* plug-ins/helpbrowser/dialog.c: same trick here; should allow to
work with help files installed in an UNC path.
2004-12-05 Sven Neumann <sven@gimp.org>
* plug-ins/help/domain.c
* plug-ins/help/gimp-help-lookup.c
* plug-ins/help/help.[ch]: if the help files are not installed,
uninstall the temporary procedure and quit. Fixes bug #160258.
2004-08-14 Sven Neumann <sven@gimp.org>
* plug-ins/help/domain.[ch]: allow to specify the location of the
index files independently from the base URL.
* plug-ins/help/help.c: changed accordingly.
* plug-ins/help/gimp-help-lookup.c: added command-line options to
specify base URI and root directory for index files.
2004-08-14 Sven Neumann <sven@gimp.org>
* plug-ins/help/help.[ch]: moved some defines to the header file.
* plug-ins/help/domain.c: trivial change to remove the libgimpbase
dependency.
* plug-ins/help/Makefile.am
* plug-ins/help/gimp-help-lookup.c: added a very simple
command-line tool that allows to lookup a help-id.
2004-08-12 Sven Neumann <sven@gimp.org>
* plug-ins/common/sel_gauss.c
* plug-ins/common/unsharp.c: place the preview widget into the
upper left corner like all other plug-ins do.
* plug-ins/help/domain.c: added some (disabled) debug output.
2004-07-27 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimpbase.def
* libgimpbase/gimpmemsize.[ch]: added new files with memsize
related functions (moved here from gimputil.c) and
GIMP_TYPE_MEMSIZE (moved here from app/config/gimpconfig-types.[ch]).
* libgimpbase/gimputils.[ch]: removed gimp_memsize_to_string() here.
* libgimpbase/gimpunit.[ch]: added GIMP_TYPE_UNIT (moved here from
app/config/gimpconfig-types.[ch]).
* libgimpbase/gimpbase-private.c
* libgimp/gimptile.c
* libgimp/gimpunitcache.c
* plug-ins/help/domain.c
* app/xcf/xcf-read.c: need to include glib-object.h.
* plug-ins/common/uniteditor.c: use GIMP_TYPE_UNIT.
* app/config/gimpconfig-types.[ch]: removed code that lives in
libgimpbase now.
* app/config/gimpconfig-deserialize.c: changed accordingly.
* app/config/gimpbaseconfig.c
* app/config/gimpdisplayconfig.c
* app/core/gimpcontext.c
* app/gui/grid-dialog.c
* app/tools/gimpcolortool.c
* app/widgets/gimpaction.c
* app/widgets/gimpunitstore.c: no need to include gimpconfig-types.h
any longer.
2004-03-18 Sven Neumann <sven@gimp.org>
Added support for localized help (bug #136996). Will need some
minor touches to improve error reporting but basically it works.
* plug-ins/help/Makefile.am
* plug-ins/help/help.h: new file with common defines.
* plug-ins/help/help.c
* plug-ins/help/locales.c: include help.h, made debugging output
optional.
* plug-ins/help/domain.[ch]: added a hash table with locales for
each help domain.
2004-03-18 Sven Neumann <sven@gimp.org>
* plug-ins/help/Makefile.am
* plug-ins/help/locales.[ch]: new files with code to handle locales.
* plug-ins/help/help.c: changed accordingly.
* plug-ins/help/domain.[ch]: added support for a fallback URL to
handle missing help content. i18n support is missing still.
2004-03-09 Sven Neumann <sven@gimp.org>
Finished some work that Brix started on the help system. It's
now possibly to use an external web-browser for context help
(bug #136081):
* configure.in
* plug-ins/Makefile.am
* plug-ins/help/Makefile.am
* plug-ins/help/domain.[ch]
* plug-ins/help/help.c: new plug-in that does the help domain
management. Most of this used to live in the helpbrowser plug-in.
* plug-ins/helpbrowser/Makefile.am
* plug-ins/helpbrowser/domain.[ch]: removed these two files here.
* plug-ins/helpbrowser/helpbrowser.c: changed accordingly.
* app/widgets/gimphelp.c: use the new help plug-in.