Mercurial > geeqie
diff src/editors.c @ 60:9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
* editors.[ch]: Add "%w" macro to disable full screen deactivation when
running an editor command.
* img-view.c, layout_image.c, pan-view.c: Honor %w editor flag to
prevent exit of full screen.
* image-load.c (image_load_begin): Fix to not treat short reads as
end of file condition.
* README, doc/10_5_editor_commands.html: Document %w macro for editor
commands.
* po/it.po: Update Italian translation,
submitted by Kostantino <inverness1ATvirgilio.it>.
author | gqview |
---|---|
date | Mon, 13 Jun 2005 21:39:13 +0000 |
parents | d907d608745f |
children | 3602a4aa7c71 |
line wrap: on
line diff
--- a/src/editors.c Sun Jun 12 23:45:45 2005 +0000 +++ b/src/editors.c Mon Jun 13 21:39:13 2005 +0000 @@ -464,10 +464,16 @@ * * Only one of the macros %f or %p may be used in a given commmand. * - * %v must be the first two characters in a command, causes a window to display + * %v must be the first two characters[1] in a command, causes a window to display * showing the output of the command(s). * %V same as %v except in the case of %p only displays a window for multiple files, * operating on a single file is suppresses the output dialog. + * + * %w must be first two characters in a command, presence will disable full screen + * from exiting upon invocation. + * + * + * [1] Note: %v,%V may also be preceded by "%w". */ static void editor_command_run(const gchar *template, const gchar *text, GList *list) { @@ -478,6 +484,9 @@ for_each = (strstr(template, "%p") != NULL); + /* no window state change flag, skip */ + if (strncmp(template, "%w", 2) == 0) template += 2; + if (strncmp(template, "%v", 2) == 0) { template += 2; @@ -582,3 +591,14 @@ start_editor_from_path_list(n, list); g_list_free(list); } + +gint editor_window_flag_set(gint n) +{ + if (n < 0 || n >= GQVIEW_EDITOR_SLOTS || + !editor_command[n] || + strlen(editor_command[n]) == 0) return TRUE; + + return (strncmp(editor_command[n], "%w", 2) == 0); +} + +