if (g_key_file_get_boolean(key_file, DESKTOP_GROUP, "X-Geeqie-Filter", NULL)) editor->flags |= EDITOR_DEST;
if (g_key_file_get_boolean(key_file, DESKTOP_GROUP, "Terminal", NULL)) editor->flags |= EDITOR_TERMINAL;
- editor->flags |= editor_command_parse(editor, NULL, NULL);
+ editor->flags |= editor_command_parse(editor, NULL, FALSE, NULL);
if ((editor->flags & EDITOR_NO_PARAM) && !category_geeqie) editor->hidden = TRUE;
} PathType;
-static gchar *editor_command_path_parse(const FileData *fd, PathType type, const EditorDescription *editor)
+static gchar *editor_command_path_parse(const FileData *fd, gboolean consider_sidecars, PathType type, const EditorDescription *editor)
{
GString *string;
gchar *pathl;
break;
}
- work2 = fd->sidecar_files;
+ work2 = consider_sidecars ? fd->sidecar_files : NULL;
while (work2)
{
FileData *sfd = work2->data;
}
-EditorFlags editor_command_parse(const EditorDescription *editor, GList *list, gchar **output)
+EditorFlags editor_command_parse(const EditorDescription *editor, GList *list, gboolean consider_sidecars, gchar **output)
{
EditorFlags flags = 0;
const gchar *p;
goto err;
}
pathl = editor_command_path_parse((FileData *)list->data,
+ consider_sidecars,
(*p == 'f') ? PATH_FILE : PATH_FILE_URL,
editor);
if (!pathl)
while (work)
{
FileData *fd = work->data;
- pathl = editor_command_path_parse(fd, (*p == 'F') ? PATH_FILE : PATH_FILE_URL, editor);
+ pathl = editor_command_path_parse(fd, consider_sidecars, (*p == 'F') ? PATH_FILE : PATH_FILE_URL, editor);
if (pathl)
{
ok = TRUE;
ed->pid = -1;
ed->flags = editor->flags;
- ed->flags |= editor_command_parse(editor, list, &command);
+ ed->flags |= editor_command_parse(editor, list, TRUE, &command);
ok = !EDITOR_ERRORS(ed->flags);
gboolean is_valid_editor_command(const gchar *key);
gboolean editor_blocks_file(const gchar *key);
-EditorFlags editor_command_parse(const EditorDescription *editor, GList *list, gchar **output);
+EditorFlags editor_command_parse(const EditorDescription *editor, GList *list, gboolean consider_sidecars, gchar **output);
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */