[gegl] bin: add a system command, permitting launching commandlines from slides



commit 650429df4d8c5114e25d1acb3319370a4d0fb8b0
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed May 29 13:52:42 2019 +0200

    bin: add a system command, permitting launching commandlines from slides

 bin/ui-core.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/bin/ui-core.c b/bin/ui-core.c
index 1d728e872..4564aa0a9 100644
--- a/bin/ui-core.c
+++ b/bin/ui-core.c
@@ -7491,6 +7491,18 @@ int cmd_star (COMMAND_ARGS) /* "star", -1, "", "query or set number of stars"*/
 static void
 index_item_destroy (IndexItem *item);
 
+  int cmd_system (COMMAND_ARGS);
+int cmd_system (COMMAND_ARGS) /* "system", -1, "", "systemes passed commandline"*/
+{
+  GError *error = NULL;
+  static GPid pid = 0;
+  g_spawn_async (NULL, &argv[1], NULL,
+                 G_SPAWN_SEARCH_PATH|G_SPAWN_SEARCH_PATH_FROM_ENVP,
+                 NULL, NULL, &pid, &error);
+  return 0;
+}
+
+
   int cmd_discard (COMMAND_ARGS);
 int cmd_discard (COMMAND_ARGS) /* "discard", 0, "", "moves the current image to a .discard subfolder"*/
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]