Mercurial > geeqie.yaz
diff src/editors.c @ 1616:475bbae6a7a3
do not block the files sent to external editors like gimp
author | nadvornik |
---|---|
date | Sun, 31 May 2009 11:08:00 +0000 |
parents | 1b2ddc6b2b27 |
children |
line wrap: on
line diff
--- a/src/editors.c Sat May 30 20:18:22 2009 +0000 +++ b/src/editors.c Sun May 31 11:08:00 2009 +0000 @@ -1287,6 +1287,23 @@ return !!(editor->flags & EDITOR_DEST); } +gboolean editor_blocks_file(const gchar *key) +{ + EditorDescription *editor; + if (!key) return FALSE; + + editor = g_hash_table_lookup(editors, key); + if (!editor) return FALSE; + + /* Decide if the image file should be blocked during editor execution + Editors like gimp can be used long time after the original file was + saved, for editing unrelated files. + %f vs. %F seems to be a good heuristic to detect this kind of editors. + */ + + return !(editor->flags & EDITOR_SINGLE_COMMAND); +} + const gchar *editor_get_error_str(EditorFlags flags) { if (flags & EDITOR_ERROR_EMPTY) return _("Editor template is empty.");