Mercurial > geeqie
diff src/editors.c @ 1618:552648eff4f2
do not block the files sent to external editors like gimp
author | nadvornik |
---|---|
date | Sun, 31 May 2009 11:08:00 +0000 |
parents | c9c1a16ff8ae |
children | 58a5d1e01e33 |
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 @@ -1282,6 +1282,23 @@ return !!(editor->flags & EDITOR_NO_PARAM); } +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.");