Home GnuPG
Diffusion GpgEX 296829d61514

Improve help file loading.
296829d61514Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Improve help file loading.

* gpgex.cc (get_lang_name): Rewrite using gettext.
(start_help): Improve language detection.  Remove fallback to an
external URL.
* main.h (gpgex_server): Add root_dir.
(utf8_to_wchar): Add prototype.
* main.cc (gpgex_server::root_dir): New.
(get_locale_dir): Pass then instance to GetModuleFileNameW.  Store
the root dir.
(utf8_to_wchar): New.
(DllMain): Run i18n_init after debug_init.

The help file is now only loaded for on-disk files and never anymore
from a web site. The location of the help file is determined using
the installation directory of gpgex.dll. When looking for the help
file, the language with variant (e.g. "de_DE") is tried first, if that
does not exist a file with just the language tag (e.g. "de") is tried;
if that also also fails "en" is used as language tag.

Details

Provenance
wernerAuthored on Jun 26 2013, 3:19 PM
Parents
rX29e493fc945d: Use modern gettext implementation from libgpg-error.
Branches
Unknown
Tags
Unknown