From 177b07d897f9871b5502618e416393efdce2faed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 5 May 2006 17:45:41 +0000 Subject: [PATCH] tools/: Use the string passed to g_option_context_new() for what it's intended for - the program name is already prin... Original commit message from CVS: * tools/gst-inspect.c: (main): * tools/gst-launch.c: (main): * tools/gst-run.c: (main): * tools/gst-typefind.c: (main): * tools/gst-xmlinspect.c: (main): Use the string passed to g_option_context_new() for what it's intended for - the program name is already printed elsewhere. --- ChangeLog | 11 +++++++++++ tools/gst-inspect.c | 2 +- tools/gst-launch.c | 2 +- tools/gst-run.c | 13 ++++++++----- tools/gst-typefind.c | 2 +- tools/gst-xmlinspect.c | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 996eff7617..8a5f4ed4dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-05-05 Tim-Philipp Müller + + * tools/gst-inspect.c: (main): + * tools/gst-launch.c: (main): + * tools/gst-run.c: (main): + * tools/gst-typefind.c: (main): + * tools/gst-xmlinspect.c: (main): + Use the string passed to g_option_context_new() for + what it's intended for - the program name is already + printed elsewhere. + 2006-05-05 Tim-Philipp Müller * tools/Makefile.am: diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index f7a359f23f..08371a45b8 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -1111,7 +1111,7 @@ main (int argc, char *argv[]) textdomain (GETTEXT_PACKAGE); #endif - ctx = g_option_context_new ("gst-inspect"); + ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { diff --git a/tools/gst-launch.c b/tools/gst-launch.c index dcce615141..3d6a89815e 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -532,7 +532,7 @@ main (int argc, char *argv[]) gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE); - ctx = g_option_context_new ("gst-launch"); + ctx = g_option_context_new ("PIPELINE-DESCRIPTION"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { diff --git a/tools/gst-run.c b/tools/gst-run.c index a648753f11..19e4b15c14 100644 --- a/tools/gst-run.c +++ b/tools/gst-run.c @@ -291,12 +291,19 @@ main (int argc, char **argv) gchar *highest = NULL; gchar *binary; /* actual binary we're going to run */ gchar *path = NULL; /* and its path */ + gchar *desc; GOptionContext *ctx; GError *err = NULL; int nextopt; + /* detect stuff */ + dir = get_dir_of_binary (argv[0]); + base = g_path_get_basename (argv[0]); + /* parse command line options */ - ctx = g_option_context_new ("gst-run"); + desc = g_strdup_printf ("wrapper to call versioned %s", base); + ctx = g_option_context_new (desc); + g_free (desc); g_option_context_set_ignore_unknown_options (ctx, TRUE); g_option_context_add_main_entries (ctx, wrapper_options, GETTEXT_PACKAGE); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { @@ -305,10 +312,6 @@ main (int argc, char **argv) } g_option_context_free (ctx); - /* detect stuff */ - dir = get_dir_of_binary (argv[0]); - base = g_path_get_basename (argv[0]); - /* unmangle libtool if necessary */ unmangle_libtool (&dir, &base); diff --git a/tools/gst-typefind.c b/tools/gst-typefind.c index 5ce894711f..2d43bed134 100644 --- a/tools/gst-typefind.c +++ b/tools/gst-typefind.c @@ -155,7 +155,7 @@ main (int argc, char *argv[]) textdomain (GETTEXT_PACKAGE); #endif - ctx = g_option_context_new ("gst-typefind"); + ctx = g_option_context_new ("FILES"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { diff --git a/tools/gst-xmlinspect.c b/tools/gst-xmlinspect.c index 9526754d08..bac4a409ae 100644 --- a/tools/gst-xmlinspect.c +++ b/tools/gst-xmlinspect.c @@ -777,7 +777,7 @@ main (int argc, char *argv[]) setlocale (LC_ALL, ""); - ctx = g_option_context_new ("gst-xmlinspect"); + ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) {