Mercurial > geeqie.yaz
diff src/editors.c @ 135:15c1925b3bfb
improved external delete command
author | nadvornik |
---|---|
date | Thu, 16 Aug 2007 20:57:09 +0000 |
parents | 9009856628f7 |
children | 18c2a29e681c |
line wrap: on
line diff
--- a/src/editors.c Wed Aug 15 21:37:51 2007 +0000 +++ b/src/editors.c Thu Aug 16 20:57:09 2007 +0000 @@ -396,7 +396,7 @@ } else { - ret = system(result->str); + ret = !system(result->str); } if (path_change) chdir(current_path); @@ -450,7 +450,7 @@ return FALSE; } -static void editor_command_start(const gchar *template, const gchar *text, GList *list) +static gint editor_command_start(const gchar *template, const gchar *text, GList *list) { EditorVerboseData *vd; @@ -458,7 +458,7 @@ vd->list = path_list_copy(list); vd->total = g_list_length(list); - editor_command_next(vd); + return editor_command_next(vd); } static gint editor_line_break(const gchar *template, gchar **front, const gchar **end) @@ -544,7 +544,7 @@ while (work) { gchar *path = work->data; - editor_command_one(template, path, NULL); + ret = editor_command_one(template, path, NULL); work = work->next; } } @@ -588,14 +588,11 @@ vd = editor_verbose_window(template, text); editor_verbose_window_progress(vd, _("running...")); - editor_verbose_start(vd, result->str); + ret = editor_verbose_start(vd, result->str); } else { - int status = system(result->str); - /* FIXME: consistent return values */ - if (!WIFEXITED(status) || WEXITSTATUS(status)) - ret = FALSE; + ret = !system(result->str); } g_free(front);