[gegl] Bring back option for "gegl" binary to show graphs.
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Bring back option for "gegl" binary to show graphs.
- Date: Tue, 19 Jul 2011 22:39:33 +0000 (UTC)
commit 8c101b704a9f2350f1ad98f551db4ed43e4443ed
Author: Jon Nordby <jononor gmail com>
Date: Wed Jul 20 00:26:05 2011 +0200
Bring back option for "gegl" binary to show graphs.
Partial revert of 57ac8cfd3262978d19680f69c6b9ce7311fd1085
bin/gegl-options.c | 2 +-
bin/gegl-options.h | 1 +
bin/gegl.c | 12 ++++++++++++
3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/bin/gegl-options.c b/bin/gegl-options.c
index 494bc39..e2d1d4f 100644
--- a/bin/gegl-options.c
+++ b/bin/gegl-options.c
@@ -28,7 +28,7 @@ static GeglOptions *opts_new (void)
{
GeglOptions *o = g_malloc0 (sizeof (GeglOptions));
- o->mode = GEGL_RUN_MODE_HELP;
+ o->mode = GEGL_RUN_MODE_DISPLAY;
o->xml = NULL;
o->output = NULL;
o->files = NULL;
diff --git a/bin/gegl-options.h b/bin/gegl-options.h
index 8989fc6..073d62b 100644
--- a/bin/gegl-options.h
+++ b/bin/gegl-options.h
@@ -24,6 +24,7 @@
typedef enum
{
GEGL_RUN_MODE_HELP,
+ GEGL_RUN_MODE_DISPLAY,
GEGL_RUN_MODE_OUTPUT,
GEGL_RUN_MODE_XML
} GeglRunMode;
diff --git a/bin/gegl.c b/bin/gegl.c
index f08b6d2..38cbeb5 100644
--- a/bin/gegl.c
+++ b/bin/gegl.c
@@ -214,6 +214,18 @@ main (gint argc,
switch (o->mode)
{
+ case GEGL_RUN_MODE_DISPLAY:
+ {
+ GeglNode *output = gegl_node_new_child (gegl,
+ "operation", "gegl:display",
+ "window-title", o->file,
+ NULL);
+ gegl_node_connect_from (output, "input", gegl_node_get_output_proxy (gegl, "output"), "output");
+ gegl_node_process (output);
+ g_object_unref (output);
+ g_main_loop_run (g_main_loop_new (NULL, TRUE));
+ }
+ break;
case GEGL_RUN_MODE_XML:
g_printf ("%s\n", gegl_node_to_xml (gegl, path_root));
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]