Revision: 1842
http://geeqie.svn.sourceforge.net/geeqie/?rev=1842&view=rev
Author: nadvornik
Date: 2009-09-07 20:04:22 +0000 (Mon, 07 Sep 2009)
Log Message:
-----------
fixed list of possible editors in popup menu
Modified Paths:
--------------
trunk/src/editors.c
trunk/src/editors.h
trunk/src/menu.c
Modified: trunk/src/editors.c
===================================================================
--- trunk/src/editors.c 2009-09-07 19:48:05 UTC (rev 1841)
+++ trunk/src/editors.c 2009-09-07 20:04:22 UTC (rev 1842)
@@ -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);
Modified: trunk/src/editors.h
===================================================================
--- trunk/src/editors.h 2009-09-07 19:48:05 UTC (rev 1841)
+++ trunk/src/editors.h 2009-09-07 20:04:22 UTC (rev 1842)
@@ -118,7 +118,7 @@
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: */
Modified: trunk/src/menu.c
===================================================================
--- trunk/src/menu.c 2009-09-07 19:48:05 UTC (rev 1841)
+++ trunk/src/menu.c 2009-09-07 20:04:22 UTC (rev 1842)
@@ -80,7 +80,7 @@
work = work->next;
gboolean active = TRUE;
- if (fd_list && EDITOR_ERRORS(editor_command_parse(editor,
fd_list, NULL)))
+ if (fd_list && EDITOR_ERRORS(editor_command_parse(editor,
fd_list, FALSE, NULL)))
active = FALSE;
if (active)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn