From 96db697cf788c6b4f6c9b5185b4bb8c0a072f6eb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 11 Dec 2022 16:56:36 -0500 Subject: Sort options in command line help output --- src/jalv_console.c | 2 +- src/jalv_gtk.c | 114 ++++++++++++++++++++++++++--------------------------- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/jalv_console.c b/src/jalv_console.c index 0c8dd06..635b668 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -51,7 +51,7 @@ print_usage(const char* name, bool error) " -t Print trace messages from plugin\n" " -U URI Load the UI with the given URI\n" " -V Display version information and exit\n" - " -x Exact JACK client name (exit if taken)\n"); + " -x Exit if the requested JACK client name is taken.\n"); return error ? 1 : 0; } diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c index eddf379..fe8155f 100644 --- a/src/jalv_gtk.c +++ b/src/jalv_gtk.c @@ -75,13 +75,6 @@ int jalv_frontend_init(int* argc, char*** argv, JalvOptions* opts) { const GOptionEntry entries[] = { - {"load", - 'l', - 0, - G_OPTION_ARG_STRING, - &opts->load, - "Load state from save directory", - "DIR"}, {"preset", 'P', 0, @@ -89,13 +82,13 @@ jalv_frontend_init(int* argc, char*** argv, JalvOptions* opts) &opts->preset, "Load state from preset", "URI"}, - {"dump", - 'd', + {"scale-factor", + 'S', 0, - G_OPTION_ARG_NONE, - &opts->dump, - "Dump plugin <=> UI communication", - NULL}, + G_OPTION_ARG_DOUBLE, + &opts->scale_factor, + "UI scale factor", + "SCALE"}, {"ui-uri", 'U', 0, @@ -103,20 +96,41 @@ jalv_frontend_init(int* argc, char*** argv, JalvOptions* opts) &opts->ui_uri, "Load the UI with the given URI", "URI"}, - {"trace", - 't', + {"buffer-size", + 'b', + 0, + G_OPTION_ARG_INT, + &opts->buffer_size, + "Buffer size for plugin <=> UI communication", + "SIZE"}, + {"control", + 'c', + 0, + G_OPTION_ARG_STRING_ARRAY, + &opts->controls, + "Set control value (e.g. \"vol=1.4\")", + "SETTING"}, + {"dump", + 'd', 0, G_OPTION_ARG_NONE, - &opts->trace, - "Print trace messages from plugin", + &opts->dump, + "Dump plugin <=> UI communication", NULL}, - {"show-hidden", - 's', + {"generic-ui", + 'g', 0, G_OPTION_ARG_NONE, - &opts->show_hidden, - "Show controls for ports with notOnGUI property on generic UI", + &opts->generic_ui, + "Use Jalv generic UI and not the plugin UI", NULL}, + {"load", + 'l', + 0, + G_OPTION_ARG_STRING, + &opts->load, + "Load state from save directory", + "DIR"}, {"no-menu", 'm', 0, @@ -124,20 +138,20 @@ jalv_frontend_init(int* argc, char*** argv, JalvOptions* opts) &opts->no_menu, "Do not show Jalv menu on window", NULL}, - {"generic-ui", - 'g', + {"jack-name", + 'n', + 0, + G_OPTION_ARG_STRING, + &opts->name, + "JACK client name", + "NAME"}, + {"print-controls", + 'p', 0, G_OPTION_ARG_NONE, - &opts->generic_ui, - "Use Jalv generic UI and not the plugin UI", + &opts->print_controls, + "Print control output changes to stdout", NULL}, - {"buffer-size", - 'b', - 0, - G_OPTION_ARG_INT, - &opts->buffer_size, - "Buffer size for plugin <=> UI communication", - "SIZE"}, {"update-frequency", 'r', 0, @@ -145,40 +159,26 @@ jalv_frontend_init(int* argc, char*** argv, JalvOptions* opts) &opts->update_rate, "UI update frequency", "HZ"}, - {"scale-factor", - 'S', - 0, - G_OPTION_ARG_DOUBLE, - &opts->scale_factor, - "UI scale factor", - "SCALE"}, - {"control", - 'c', - 0, - G_OPTION_ARG_STRING_ARRAY, - &opts->controls, - "Set control value (e.g. \"vol=1.4\")", - "SETTING"}, - {"print-controls", - 'p', + {"show-hidden", + 's', 0, G_OPTION_ARG_NONE, - &opts->print_controls, - "Print control output changes to stdout", + &opts->show_hidden, + "Show controls for ports with notOnGUI property on generic UI", NULL}, - {"jack-name", - 'n', + {"trace", + 't', 0, - G_OPTION_ARG_STRING, - &opts->name, - "JACK client name", - "NAME"}, + G_OPTION_ARG_NONE, + &opts->trace, + "Print trace messages from plugin", + NULL}, {"exact-jack-name", 'x', 0, G_OPTION_ARG_NONE, &opts->name_exact, - "Exact JACK client name (exit if taken)", + "Exit if the requested JACK client name is taken", NULL}, {0, 0, 0, G_OPTION_ARG_NONE, 0, 0, 0}}; -- cgit v1.2.1