Revision: 1843
http://geeqie.svn.sourceforge.net/geeqie/?rev=1843&view=rev
Author: nadvornik
Date: 2009-09-07 20:44:29 +0000 (Mon, 07 Sep 2009)
Log Message:
-----------
start_editor_from_filelist_full fixes
fixed return value from start_editor_from_filelist_full()
call editor_command_parse to detect possible problems early enough
Modified Paths:
--------------
trunk/src/editors.c
trunk/src/utilops.c
Modified: trunk/src/editors.c
===================================================================
--- trunk/src/editors.c 2009-09-07 20:04:22 UTC (rev 1842)
+++ trunk/src/editors.c 2009-09-07 20:44:29 UTC (rev 1843)
@@ -1225,15 +1225,19 @@
{
EditorFlags error;
EditorDescription *editor;
- if (!key) return FALSE;
+ if (!key) return EDITOR_ERROR_EMPTY;
editor = g_hash_table_lookup(editors, key);
- if (!editor) return FALSE;
- if (!list && !(editor->flags & EDITOR_NO_PARAM)) return FALSE;
+ if (!editor) return EDITOR_ERROR_EMPTY;
+ if (!list && !(editor->flags & EDITOR_NO_PARAM)) return
EDITOR_ERROR_NO_FILE;
- error = editor_command_start(editor, editor->name, list,
working_directory, cb, data);
+ error = editor_command_parse(editor, list, TRUE, NULL);
+ if (EDITOR_ERRORS(error)) return error;
+
+ error |= editor_command_start(editor, editor->name, list,
working_directory, cb, data);
+
if (EDITOR_ERRORS(error))
{
gchar *text = g_strdup_printf(_("%s\n\"%s\""),
editor_get_error_str(error), editor->file);
@@ -1242,7 +1246,7 @@
g_free(text);
}
- return error;
+ return EDITOR_ERRORS(error);
}
EditorFlags start_editor_from_filelist(const gchar *key, GList *list)
Modified: trunk/src/utilops.c
===================================================================
--- trunk/src/utilops.c 2009-09-07 20:04:22 UTC (rev 1842)
+++ trunk/src/utilops.c 2009-09-07 20:44:29 UTC (rev 1843)
@@ -872,7 +872,7 @@
}
}
- if (flags)
+ if (EDITOR_ERRORS(flags))
{
gchar *text = g_strdup_printf(_("%s\nUnable to start
external command.\n"), editor_get_error_str(flags));
file_util_warning_dialog(ud->messages.fail, text,
GTK_STOCK_DIALOG_ERROR, NULL);
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