[gimp/soc-2011-seamless-clone2] Bug 583778 - change script-fu-server to return the output of executed...



commit fce8dc0f6262685a26dee164c3edc700067957ba
Author: Ionutz Borcoman <iborco gmail com>
Date:   Fri Dec 14 19:06:49 2012 +0100

    Bug 583778 - change script-fu-server to return the output of executed...
    
    Return the output of the command for the client to parse instead of
    always a useless "Success".

 plug-ins/script-fu/script-fu-server.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/script-fu/script-fu-server.c b/plug-ins/script-fu/script-fu-server.c
index 77e1593..2b9a480 100644
--- a/plug-ins/script-fu/script-fu-server.c
+++ b/plug-ins/script-fu/script-fu-server.c
@@ -228,6 +228,7 @@ script_fu_server_run (const gchar      *name,
   run_mode = params[0].data.d_int32;
 
   ts_set_run_mode (run_mode);
+  ts_set_print_flag (1);
 
   switch (run_mode)
     {
@@ -554,13 +555,15 @@ execute_command (SFCommand *cmd)
   if (ts_interpret_string (cmd->command) != 0)
     {
       error = TRUE;
+
       server_log ("%s\n", response->str);
     }
   else
     {
       error = FALSE;
 
-      g_string_assign (response, ts_get_success_msg ());
+      if (response->len == 0)
+        g_string_assign (response, ts_get_success_msg ());
 
       time (&clock2);
       server_log ("Request #%d processed in %f seconds, finishing on %s",


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