Bug-790839 GApplication command line --help enhancements

Desktop / GNOME / GLib - howetuft [gmail.com] - 3 January 2018 11:08 EST

In order to enrich information displayed by GApplication command line handling when --help is invoked, 3 new methods are proposed: . g_application_set_option_context_parameter_string . g_application_set_option_context_summary . g_application_set_option_context_description Those methods interact with the GApplication's internal GOptionContext which is created for command line parsing in g_application_parse_command_line. (please refer to the GOptionContext class for more information about option context, parameter string, summary and description.)

To illustrate the 3 methods, an example is provided: . gapplication-example-cmdline4.c

0e22d19a1 Bug-790839 GApplication command line --help enhancements
docs/reference/gio/gio-sections.txt | 3 ++
gio/gapplication.c | 82 ++++++++++++++++++++++++++++-
gio/gapplication.h | 10 +++-
gio/tests/Makefile.am | 1 +
gio/tests/gapplication-example-cmdline4.c | 85 +++++++++++++++++++++++++++++++
gio/tests/meson.build | 1 +
6 files changed, 180 insertions(+), 2 deletions(-)

Upstream: git.gnome.org


  • Share