[gegl] gegl-options: print the mode in full text, not with the value of the enum
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl-options: print the mode in full text, not with the value of the enum
- Date: Mon, 2 Apr 2012 09:42:34 +0000 (UTC)
commit b3f79fb4db791559a30ae6cbf21395d1fed92685
Author: Michael Murà <mure michael gmail com>
Date: Mon Apr 2 04:53:12 2012 +0900
gegl-options: print the mode in full text, not with the value of the enum
bin/gegl-options.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/bin/gegl-options.c b/bin/gegl-options.c
index fdd4722..e538402 100644
--- a/bin/gegl-options.c
+++ b/bin/gegl-options.c
@@ -108,15 +108,31 @@ parse_args (gint argc,
static void
print_opts (GeglOptions *o)
{
+ char *mode_str;
+ switch (o->mode)
+ {
+ case GEGL_RUN_MODE_DISPLAY:
+ mode_str = "Display on screen"; break;
+ case GEGL_RUN_MODE_XML:
+ mode_str = "Print XML"; break;
+ case GEGL_RUN_MODE_OUTPUT:
+ mode_str = "Output in a file"; break;
+ case GEGL_RUN_MODE_HELP:
+ mode_str = "Display help information"; break;
+ default:
+ g_warning ("Unknown GeglOption mode: %d", o->mode);
+ break;
+ }
+
fprintf (stderr,
"Parsed commandline:\n"
-"\tmode: %i\n"
+"\tmode: %s\n"
"\tfile: %s\n"
"\txml: %s\n"
"\toutput: %s\n"
"\trest: %s\n"
"\t\n",
- o->mode,
+ mode_str,
o->file==NULL?"(null)":o->file,
o->xml==NULL?"(null)":o->xml,
o->output==NULL?"(null)":o->output,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]