merge Barrucadus patch
authorDieter Plaetinck <dieter@plaetinck.be>
Sat, 16 May 2009 19:31:41 +0000 (21:31 +0200)
committerDieter Plaetinck <dieter@plaetinck.be>
Sat, 16 May 2009 19:31:41 +0000 (21:31 +0200)
1  2 
uzbl.c

diff --cc uzbl.c
--- 1/uzbl.c
--- 2/uzbl.c
+++ b/uzbl.c
@@@ -737,15 -726,11 +732,16 @@@ run_command (const char *command, cons
      if(args) g_string_append_printf (to_execute, " %s", args);
  
      if (sync) {
 -        result = g_spawn_command_line_sync (to_execute->str, stdout, NULL, NULL, NULL);
 -    } else result = g_spawn_command_line_async (to_execute->str, NULL);
 +        result = g_spawn_command_line_sync (to_execute->str, stdout, NULL, NULL, &err);
 +    } else result = g_spawn_command_line_async (to_execute->str, &err);
-     printf("Called %s.  Result: %s\n", to_execute->str, (result ? "TRUE" : "FALSE" ));
+     if (uzbl.state.verbose)
+         printf("Called %s.  Result: %s\n", to_execute->str, (result ? "TRUE" : "FALSE" ));
      g_string_free (to_execute, TRUE);
 +    if (err) {
 +        g_printerr("error on run_command: %s\n", err->message);
 +        g_error_free (err);
 +    }
 +    g_free (cmd);
      return result;
  }
  
@@@ -1553,7 -1517,7 +1549,6 @@@ find_xdg_file (int xdg_type, char* file
  
  static void
  settings_init () {
--    char *saveptr;
      State *s = &uzbl.state;
      Network *n = &uzbl.net;