Mercurial > geeqie.yaz
changeset 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 | 57f6da2510d9 |
children | 0c912a2d94f1 |
files | ChangeLog README TODO doc/10_5_editor_commands.html po/it.po src/editors.c src/editors.h src/image-load.c src/img-view.c src/layout_image.c src/pan-view.c |
diffstat | 11 files changed, 166 insertions(+), 125 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jun 12 23:45:45 2005 +0000 +++ b/ChangeLog Mon Jun 13 21:39:13 2005 +0000 @@ -1,3 +1,16 @@ +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>. + Sun Jun 12 19:25:26 2005 John Ellis <johne@verizon.net> * format_canon.[ch]: Reimplement canon raw parser to use convenience
--- a/README Sun Jun 12 23:45:45 2005 +0000 +++ b/README Mon Jun 13 21:39:13 2005 +0000 @@ -351,10 +351,15 @@ Use of the following to display output window for the command: %v Display result of command in output window, must occur as first two - characters in the command. + characters in the command, or immediately after the "%w" macro. %V Like v above, but when used with %p, only displays output window for multiple files. The output of a single file is suppressed. + Additional macros: + + %w Prevent full screen from deactivating when command is executed, + must occur as the first two characters. + ======== Additional comments: Advanced options:
--- a/TODO Sun Jun 12 23:45:45 2005 +0000 +++ b/TODO Mon Jun 13 21:39:13 2005 +0000 @@ -91,7 +91,7 @@ ------------- - > update translations: it( ) ( ) ( ) +d> update translations: it(x) ( ) ( ) > document recent additions/changes: > Added 'Fast jpeg thumbnailing'.
--- a/doc/10_5_editor_commands.html Sun Jun 12 23:45:45 2005 +0000 +++ b/doc/10_5_editor_commands.html Mon Jun 13 21:39:13 2005 +0000 @@ -5,7 +5,7 @@ <TITLE>Editor Options - GQview User Manual</TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)"> <META NAME="CREATED" CONTENT="20040805;23590500"> - <META NAME="CHANGED" CONTENT="20050131;8430800"> + <META NAME="CHANGED" CONTENT="20050613;17101000"> </HEAD> <BODY LANG="en-US" DIR="LTR"> <CENTER> @@ -86,8 +86,9 @@ <P ALIGN=CENTER>%v</P> </TD> <TD WIDTH=80%> - <P>Display the result of the command in an output window, must - occur as the first two characters.</P> + <P>Display the result of the command in an output window. Must + occur as the first two characters, or immediately after the “%w” + macro.</P> </TD> </TR> <TR VALIGN=TOP> @@ -100,6 +101,15 @@ file is suppressed.</P> </TD> </TR> + <TR VALIGN=TOP> + <TD WIDTH=20%> + <P ALIGN=CENTER>%w</P> + </TD> + <TD WIDTH=80%> + <P>Prevent full screen from deactivating when command is + executed. Must occur as the first two characters.</P> + </TD> + </TR> </TABLE> </DL> </DL> @@ -152,4 +162,4 @@ <P STYLE="margin-bottom: 0in"><BR> </P> </BODY> -</HTML> +</HTML> \ No newline at end of file
--- a/po/it.po Sun Jun 12 23:45:45 2005 +0000 +++ b/po/it.po Mon Jun 13 21:39:13 2005 +0000 @@ -1,21 +1,21 @@ -# translation of gqview-1.5.9_it.po to Italiano +# translation of gqview-2.1.0_it.po to Italiano # This file is distributed under the same license as the PACKAGE package. -# Costantino <inverness1ATvirgilio.it>, 2005. # Un ringraziamento per i preziosi suggerimenti a Marco Colombo <m.colomboATed.ac.uk> +# Kostantino <inverness1ATvirgilio.it>, 2005. # Copyright (C) Christopher R. Gabriel <cgabriel@pluto.linux.it>, 2000 - 2001. -# Costantino <inverness1ATvirgilio.it>, 2005. +# Kostantino <inverness1ATvirgilio.it>, 2005. msgid "" msgstr "" -"Project-Id-Version: gqview-1.5.9_it\n" +"Project-Id-Version: gqview-2.1.0_it\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-03-05 16:24-0500\n" -"PO-Revision-Date: 2005-02-26 16:44+0100\n" -"Last-Translator: Costantino <inverness1ATvirgilio.it>\n" -"Language-Team: Italiano <it@li.org>\n" +"PO-Revision-Date: 2005-03-11 17:26+0100\n" +"Last-Translator: Kostantino <inverness1ATvirgilio.it>\n" +"Language-Team: Italiano <tp@lists.linux.it>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.3.1\n" +"X-Generator: KBabel 1.9.1\n" #: src/bar_info.c:30 msgid "Favorite" @@ -1234,9 +1234,8 @@ msgstr "C_erca..." #: src/layout_util.c:768 -#, fuzzy msgid "Pan _view" -msgstr "Vista avanzata" +msgstr "_Vista panoramica" #: src/layout_util.c:769 msgid "_Print..." @@ -1615,19 +1614,17 @@ msgstr "Ruota di _180 gradi" #: src/pan-view.c:3109 -#, fuzzy, c-format +#, c-format msgid "%d images, %s" -msgstr "%d immagini" +msgstr "%d immagini, %s" #: src/pan-view.c:3180 src/pan-view.c:3233 -#, fuzzy msgid "Sorting images..." -msgstr "Sto ordinando..." +msgstr "Sto ordinando le immagini..." #: src/pan-view.c:3552 src/pan-view.c:3879 -#, fuzzy msgid "Date:" -msgstr "Data" +msgstr "Data:" #: src/pan-view.c:3562 src/preferences.c:849 src/print.c:3201 src/print.c:3408 msgid "Size:" @@ -1635,21 +1632,19 @@ #: src/pan-view.c:3617 msgid "path found" -msgstr "" +msgstr "il percorso è stato trovato" #: src/pan-view.c:3617 -#, fuzzy msgid "filename found" -msgstr "Il file non è stato trovato" +msgstr "Il file è stato trovato" #: src/pan-view.c:3665 -#, fuzzy msgid "partial match" -msgstr "parziale" +msgstr "corrispondenza parziale" #: src/pan-view.c:3876 src/pan-view.c:3909 msgid "no match" -msgstr "" +msgstr "nessuna corrispondenza" #: src/pan-view.c:4179 src/search.c:2140 msgid "Folder not found" @@ -1657,88 +1652,79 @@ #: src/pan-view.c:4180 msgid "The entered path is not a folder" -msgstr "" +msgstr "Il percorso immesso non corrisponde ad una cartella" #: src/pan-view.c:4285 -#, fuzzy msgid "Timeline" -msgstr "Bilineare" +msgstr "Linea tempo" #: src/pan-view.c:4286 -#, fuzzy msgid "Calendar" -msgstr "Pu_lisci" +msgstr "Calendario" #: src/pan-view.c:4288 -#, fuzzy msgid "Folders (flower)" -msgstr "Cartelle" +msgstr "Cartelle (fiore)" #: src/pan-view.c:4289 msgid "Grid" -msgstr "" +msgstr "Griglia" #: src/pan-view.c:4298 -#, fuzzy msgid "Dots" -msgstr "punti" +msgstr "Punti" #: src/pan-view.c:4299 -#, fuzzy msgid "No Images" -msgstr "Immagine" +msgstr "Nessuna immagine" #: src/pan-view.c:4300 -#, fuzzy msgid "Small Thumbnails" -msgstr "Miniature" +msgstr "Miniature Piccole" #: src/pan-view.c:4301 -#, fuzzy msgid "Normal Thumbnails" -msgstr "Miniature" +msgstr "Miniature Normali" #: src/pan-view.c:4302 -#, fuzzy msgid "Large Thumbnails" -msgstr "Miniature" +msgstr "Miniature Grandi" #: src/pan-view.c:4303 msgid "1:10 (10%)" -msgstr "" +msgstr "1:10 (10%)" #: src/pan-view.c:4304 msgid "1:4 (25%)" -msgstr "" +msgstr "1:4 (25%)" #: src/pan-view.c:4305 msgid "1:3 (33%)" -msgstr "" +msgstr "1:3 (33%)" #: src/pan-view.c:4306 msgid "1:2 (50%)" -msgstr "" +msgstr "1:2 (50%)" #: src/pan-view.c:4307 msgid "1:1 (100%)" -msgstr "" +msgstr "1:1 (100%)" #: src/pan-view.c:4358 -#, fuzzy msgid "Find:" -msgstr "File:" +msgstr "Trova:" #: src/pan-view.c:4409 msgid "Find" -msgstr "" +msgstr "Trova" #: src/pan-view.c:4470 msgid "Pan View Performance" -msgstr "" +msgstr "Esecuzione Vista Panoramica" #: src/pan-view.c:4477 msgid "Pan view performance may be poor." -msgstr "" +msgstr "L'esecuzione in vista panoramica può essere scadente." #: src/pan-view.c:4478 msgid "" @@ -1746,6 +1732,9 @@ "can be enabled. Note that both options must be enabled to notice a change in " "performance." msgstr "" +"Le opzioni seguenti possono essere abilitate per migliorare l'esecuzione delle miniature in modalità vista panoramica. " +"Nota che, per rilevare una modifica nella resa, entrambe le opzioni " +"devono essere abilitate." #: src/pan-view.c:4486 src/preferences.c:852 msgid "Cache thumbnails" @@ -1757,7 +1746,7 @@ #: src/pan-view.c:4494 msgid "Do not show this dialog again" -msgstr "" +msgstr "Non mostrare ancora questo" #: src/preferences.c:390 msgid "Nearest (worst, but fastest)" @@ -1853,7 +1842,7 @@ #: src/preferences.c:872 msgid "Faster jpeg thumbnailing (may reduce quality)" -msgstr "" +msgstr "Miniaturizzazione JPEG veloce (potrebbe ridurre la qualità)" #: src/preferences.c:875 msgid "Slide show" @@ -2549,8 +2538,7 @@ #: src/thumb.c:379 msgid "Thumbnail image in cache failed to load, trying to recreate.\n" -msgstr "" -"Non sono riuscito a caricare le miniature dalla cache: provo a ricrearle.\n" +msgstr "Non sono riuscito a caricare le miniature dalla cache: provo a ricrearle.\n" #: src/ui_bookmark.c:148 #, c-format @@ -3154,3 +3142,4 @@ msgstr "" "Il nome del file non è valido:\n" "%s" +
--- 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); +} + +
--- a/src/editors.h Sun Jun 12 23:45:45 2005 +0000 +++ b/src/editors.h Mon Jun 13 21:39:13 2005 +0000 @@ -18,6 +18,8 @@ void start_editor_from_file(gint n, const gchar *path); void start_editor_from_path_list(gint n, GList *list); +gint editor_window_flag_set(gint n); + #endif
--- a/src/image-load.c Sun Jun 12 23:45:45 2005 +0000 +++ b/src/image-load.c Mon Jun 13 21:39:13 2005 +0000 @@ -217,7 +217,7 @@ b = read(il->load_fd, &buf, sizeof(buf)); - if (b > 1 && + if (b > 0 && format_raw_img_exif_offsets_fd(il->load_fd, il->path, buf, b, &offset, NULL)) { if (debug) printf("Raw file %s contains embedded image\n", il->path); @@ -231,66 +231,47 @@ return FALSE; } - if (gdk_pixbuf_loader_write(il->loader, buf, b, NULL)) - { - il->bytes_read += b + offset; - - if (b < sizeof(buf)) - { - /* end of file already */ - - image_loader_stop(il); - - if (!il->pixbuf) return FALSE; - - image_loader_done_delay(il); - return TRUE; - } - else - { - /* larger file */ - - /* read until size is known */ - while(il->loader && !gdk_pixbuf_loader_get_pixbuf(il->loader) && b > 0) - { - b = read(il->load_fd, &buf, sizeof(buf)); - if (b < 0 || (b > 0 && !gdk_pixbuf_loader_write(il->loader, buf, b, NULL))) - { - image_loader_stop(il); - return FALSE; - } - il->bytes_read += b; - } - if (!il->pixbuf) image_loader_sync_pixbuf(il); - - if (il->bytes_read == il->bytes_total || b < sizeof(buf)) - { - /* done, handle (broken) loaders that do not have pixbuf till close */ - image_loader_stop(il); - - if (!il->pixbuf) return FALSE; - - image_loader_done_delay(il); - return TRUE; - } - - if (!il->pixbuf) - { - image_loader_stop(il); - return FALSE; - } - - /* finally, progressive loading :) */ - il->idle_id = g_idle_add_full(il->idle_priority, image_loader_idle_cb, il, NULL); - return TRUE; - } - } - else + if (!gdk_pixbuf_loader_write(il->loader, buf, b, NULL)) { image_loader_stop(il); return FALSE; } + il->bytes_read += b + offset; + + /* read until size is known */ + while (il->loader && !gdk_pixbuf_loader_get_pixbuf(il->loader) && b > 0) + { + b = read(il->load_fd, &buf, sizeof(buf)); + if (b < 0 || (b > 0 && !gdk_pixbuf_loader_write(il->loader, buf, b, NULL))) + { + image_loader_stop(il); + return FALSE; + } + il->bytes_read += b; + } + if (!il->pixbuf) image_loader_sync_pixbuf(il); + + if (il->bytes_read == il->bytes_total || b < 1) + { + /* done, handle (broken) loaders that do not have pixbuf till close */ + image_loader_stop(il); + + if (!il->pixbuf) return FALSE; + + image_loader_done_delay(il); + return TRUE; + } + + if (!il->pixbuf) + { + image_loader_stop(il); + return FALSE; + } + + /* finally, progressive loading :) */ + il->idle_id = g_idle_add_full(il->idle_priority, image_loader_idle_cb, il, NULL); + return TRUE; }
--- a/src/img-view.c Sun Jun 12 23:45:45 2005 +0000 +++ b/src/img-view.c Mon Jun 13 21:39:13 2005 +0000 @@ -528,7 +528,11 @@ } if (n != -1) { - view_fullscreen_toggle(vw, TRUE); + if (!editor_window_flag_set(n)) + { + view_fullscreen_toggle(vw, TRUE); + } + imd = view_window_active_image(vw); start_editor_from_file(n, image_get_path(imd)); } } @@ -1023,14 +1027,20 @@ static void view_edit_cb(GtkWidget *widget, gpointer data) { ViewWindow *vw; + ImageWindow *imd; gint n; vw = submenu_item_get_data(widget); n = GPOINTER_TO_INT(data); if (!vw) return; - view_fullscreen_toggle(vw, TRUE); - start_editor_from_file(n, image_get_path(vw->imd)); + if (!editor_window_flag_set(n)) + { + view_fullscreen_toggle(vw, TRUE); + } + + imd = view_window_active_image(vw); + start_editor_from_file(n, image_get_path(imd)); } static void view_alter_cb(GtkWidget *widget, gpointer data)
--- a/src/layout_image.c Sun Jun 12 23:45:45 2005 +0000 +++ b/src/layout_image.c Mon Jun 13 21:39:13 2005 +0000 @@ -282,7 +282,10 @@ } if (n != -1) { - layout_image_full_screen_stop(lw); + if (!editor_window_flag_set(n)) + { + layout_image_full_screen_stop(lw); + } start_editor_from_file(n, layout_image_get_path(lw)); } } @@ -568,8 +571,10 @@ lw = submenu_item_get_data(widget); n = GPOINTER_TO_INT(data); - layout_image_full_screen_stop(lw); - + if (!editor_window_flag_set(n)) + { + layout_image_full_screen_stop(lw); + } start_editor_from_file(n, layout_image_get_path(lw)); }
--- a/src/pan-view.c Sun Jun 12 23:45:45 2005 +0000 +++ b/src/pan-view.c Mon Jun 13 21:39:13 2005 +0000 @@ -3523,7 +3523,10 @@ } if (n != -1 && path) { - pan_fullscreen_toggle(pw, TRUE); + if (!editor_window_flag_set(n)) + { + pan_fullscreen_toggle(pw, TRUE); + } start_editor_from_file(n, path); stop_signal = TRUE; } @@ -4656,7 +4659,10 @@ path = pan_menu_click_path(pw); if (path) { - pan_fullscreen_toggle(pw, TRUE); + if (!editor_window_flag_set(n)) + { + pan_fullscreen_toggle(pw, TRUE); + } start_editor_from_file(n, path); } }