From f4f9c7ea02a06bdb0a3046268253e5efc1f09aad Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 18 Sep 2005 07:41:28 +0000 Subject: [PATCH] tools/gst-inspect.c: Revert the GOption code. Original commit message from CVS: * tools/gst-inspect.c: Revert the GOption code. --- ChangeLog | 4 ++++ tools/gst-inspect.c | 23 +++++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d1ee32..afa9a30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-09-18 David Schleef + + * tools/gst-inspect.c: Revert the GOption code. + 2005-09-17 David Schleef * check/Makefile.am: Fix environment variables. diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 4e16438..77ee3cc 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -1070,19 +1070,15 @@ print_element_info (GstElementFactory * factory, gboolean print_names) return 0; } -gboolean print_all = FALSE; -GOptionEntry options[] = { - {"print-all", 'a', 0, G_OPTION_ARG_NONE, &print_all, - N_("Print all elements"), NULL} - , - {NULL} -}; - int main (int argc, char *argv[]) { - GOptionContext *context; - GError *error = NULL; + gboolean print_all = FALSE; + struct poptOption options[] = { + {"print-all", 'a', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &print_all, 0, + N_("Print all elements"), NULL}, + POPT_TABLEEND + }; #ifdef GETTEXT_PACKAGE bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); @@ -1090,12 +1086,7 @@ main (int argc, char *argv[]) textdomain (GETTEXT_PACKAGE); #endif - context = g_option_context_new ("- inspect plugins"); - g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); -// g_option_context_add_group (context, gst_get_option_group ()); - g_option_context_parse (context, &argc, &argv, &error); - - gst_init (NULL, NULL); + gst_init_with_popt_table (&argc, &argv, options); if (print_all && argc > 2) { g_print ("-a requires no extra arguments\n"); -- 2.7.4