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.
This commit is contained in:
Tim-Philipp Müller 2006-05-05 17:45:41 +00:00
parent 73fd4a213a
commit 177b07d897
6 changed files with 23 additions and 9 deletions

View file

@ -1,3 +1,14 @@
2006-05-05 Tim-Philipp Müller <tim at centricular dot net>
* 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 <tim at centricular dot net>
* tools/Makefile.am:

View file

@ -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)) {

View file

@ -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)) {

View file

@ -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);

View file

@ -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)) {

View file

@ -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)) {