Mercurial > geeqie
diff src/editors.c @ 1742:eb64f542341b
fixed list of possible editors in popup menu
author | nadvornik |
---|---|
date | Mon, 07 Sep 2009 20:04:22 +0000 |
parents | 8e64965c1d92 |
children | 1cc12c4b841a |
line wrap: on
line diff
--- a/src/editors.c Mon Sep 07 19:48:05 2009 +0000 +++ b/src/editors.c Mon Sep 07 20:04:22 2009 +0000 @@ -319,7 +319,7 @@ 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; @@ -639,7 +639,7 @@ } 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; @@ -668,7 +668,7 @@ break; } - work2 = fd->sidecar_files; + work2 = consider_sidecars ? fd->sidecar_files : NULL; while (work2) { FileData *sfd = work2->data; @@ -741,7 +741,7 @@ } -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; @@ -818,6 +818,7 @@ goto err; } pathl = editor_command_path_parse((FileData *)list->data, + consider_sidecars, (*p == 'f') ? PATH_FILE : PATH_FILE_URL, editor); if (!pathl) @@ -851,7 +852,7 @@ 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; @@ -961,7 +962,7 @@ 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);