Package: gqview
Version: 2.0.1-1
Severity: wishlist
Tags: patch

Hi,

Currently, gqview exits fullscreen mode when one uses the
editors. This is particularly annoying when you're browsing a set of
pictures in fullscreen and you want to rotate clockwise or
counterclockwise certain pictures. You can do that using the Ctrl+9
and Ctrl+0 keyboard shortcuts, but each time you do that, gqview exits
full screen mode.

This bug has been fixed upstream in the development version. Gqview
developers introduced a new "%w" flag for editor commands:

    %w Prevent full screen from deactivating when command is executed,
       must occur as the first two characters.

However, as the latest development released is more than one year old,
I'm not sure we're going to have a stable release including this fix
any time soon. That's why I've backported the code to 2.0.1. The patch
applies cleanly on the version packaged in Debian.

The patch also modifies the default commands for rotate clockwise and
rotate counterclockwise so that they use "%w" and not "%v" (%v allows
to display the command stdout, which is not really interesting for
rotations). However, if you don't like that default configuration, we
can of course revert it while keeping the rest of the patch.

So, using this patch, one can browse and rotate his pictures in
fullscreen mode ;-)

Could you please include this patch in the Debian version of gqview ?

Thanks a lot !

Thomas

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-rc2
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages gqview depends on:
ii  libatk1.0-0                  1.12.1-1    The ATK accessibility toolkit
ii  libc6                        2.3.6-19    GNU C Library: Shared libraries
ii  libcairo2                    1.2.2-1     The Cairo 2D vector graphics libra
ii  libfontconfig1               2.3.2-7     generic font configuration library
ii  libglib2.0-0                 2.10.3-3    The GLib library of C routines
ii  libgtk2.0-0                  2.8.18-7    The GTK+ graphical user interface 
ii  libpango1.0-0                1.12.3-1+b1 Layout and rendering of internatio
ii  libx11-6                     2:1.0.0-8   X11 client-side library
ii  libxcursor1                  1.1.5.2-5   X cursor management library
ii  libxext6                     1:1.0.0-4   X11 miscellaneous extension librar
ii  libxfixes3                   1:3.0.1.2-4 X11 miscellaneous 'fixes' extensio
ii  libxi6                       1:1.0.0-5   X11 Input extension library
ii  libxinerama1                 1:1.0.1-4.1 X11 Xinerama extension library
ii  libxrandr2                   2:1.1.0.2-4 X11 RandR extension library
ii  libxrender1                  1:0.9.0.2-4 X Rendering Extension client libra

Versions of packages gqview recommends:
pn  libjpeg-progs                 <none>     (no description available)

-- no debconf information
Title: Editor Options - GQview User Manual
@@ -100,6 +101,15 @@ file is suppressed.

+ + + +
Seulement dans gqview-2.0.1.new/: config.h Seulement dans gqview-2.0.1.new/: config.log Seulement dans gqview-2.0.1.new/: config.status diff -ru gqview-2.0.1/doc/10_5_editor_commands.html gqview-2.0.1.new/doc/10_5_editor_commands.html --- gqview-2.0.1/doc/10_5_editor_commands.html 2005-03-01 17:00:03.000000000 +0100 +++ gqview-2.0.1.new/doc/10_5_editor_commands.html 2006-08-16 22:40:16.000000000 +0200 @@ -5,7 +5,7 @@ - +
@@ -86,8 +86,9 @@

%v

-

Display the result of the command in an output window, must - occur as the first two characters.

+

Display the result of the command in an output window. Must + occur as the first two characters, or immediately after the “%w” + macro.

+

%w

+
+

Prevent full screen from deactivating when command is + executed. Must occur as the first two characters.

+
@@ -152,4 +162,4 @@


- + \ Pas de fin de ligne à la fin du fichier. Seulement dans gqview-2.0.1.new/doc: Makefile Seulement dans gqview-2.0.1.new/: Makefile Seulement dans gqview-2.0.1.new/po: Makefile Seulement dans gqview-2.0.1.new/po: Makefile.in Seulement dans gqview-2.0.1.new/po: POTFILES diff -ru gqview-2.0.1/README gqview-2.0.1.new/README --- gqview-2.0.1/README 2005-05-14 21:33:47.000000000 +0200 +++ gqview-2.0.1.new/README 2006-08-16 22:49:32.000000000 +0200 @@ -361,10 +361,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 immediatly 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: Seulement dans gqview-2.0.1.new/src: bar_exif.o Seulement dans gqview-2.0.1.new/src: bar_info.o Seulement dans gqview-2.0.1.new/src: bar_sort.o Seulement dans gqview-2.0.1.new/src: cache_maint.o Seulement dans gqview-2.0.1.new/src: cache.o Seulement dans gqview-2.0.1.new/src: cellrenderericon.o Seulement dans gqview-2.0.1.new/src: collect-dlg.o Seulement dans gqview-2.0.1.new/src: collect-io.o Seulement dans gqview-2.0.1.new/src: collect.o Seulement dans gqview-2.0.1.new/src: collect-table.o Seulement dans gqview-2.0.1.new/src: .deps Seulement dans gqview-2.0.1.new/src: dnd.o Seulement dans gqview-2.0.1.new/src: dupe.o diff -ru gqview-2.0.1/src/editors.c gqview-2.0.1.new/src/editors.c --- gqview-2.0.1/src/editors.c 2005-03-01 17:00:03.000000000 +0100 +++ gqview-2.0.1.new/src/editors.c 2006-08-16 22:41:14.000000000 +0200 @@ -55,8 +55,8 @@ NULL, NULL, NULL, NULL, NULL, NULL, - N_("Rotate jpeg clockwise"), "%vif jpegtran -rotate 90 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi", - N_("Rotate jpeg counterclockwise"), "%vif jpegtran -rotate 270 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi", + N_("Rotate jpeg clockwise"), "%wif jpegtran -rotate 90 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi", + N_("Rotate jpeg counterclockwise"), "%wif jpegtran -rotate 270 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi", NULL, NULL }; @@ -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); +} + + diff -ru gqview-2.0.1/src/editors.h gqview-2.0.1.new/src/editors.h --- gqview-2.0.1/src/editors.h 2005-03-01 17:00:03.000000000 +0100 +++ gqview-2.0.1.new/src/editors.h 2006-08-16 22:36:18.000000000 +0200 @@ -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 Seulement dans gqview-2.0.1.new/src: editors.o Seulement dans gqview-2.0.1.new/src: exif.o Seulement dans gqview-2.0.1.new/src: filelist.o Seulement dans gqview-2.0.1.new/src: fullscreen.o Seulement dans gqview-2.0.1.new/src: globals.o Seulement dans gqview-2.0.1.new/src: gqview Seulement dans gqview-2.0.1.new/src/icons: icons_inline.h Seulement dans gqview-2.0.1.new/src/icons: Makefile Seulement dans gqview-2.0.1.new/src: image-load.o Seulement dans gqview-2.0.1.new/src: image.o Seulement dans gqview-2.0.1.new/src: image-overlay.o diff -ru gqview-2.0.1/src/img-view.c gqview-2.0.1.new/src/img-view.c --- gqview-2.0.1/src/img-view.c 2005-03-01 17:00:03.000000000 +0100 +++ gqview-2.0.1.new/src/img-view.c 2006-08-16 22:37:35.000000000 +0200 @@ -527,7 +527,10 @@ } if (n != -1) { - view_fullscreen_toggle(vw, TRUE); + if (!editor_window_flag_set(n)) + { + view_fullscreen_toggle(vw, TRUE); + } start_editor_from_file(n, image_get_path(imd)); } } @@ -1030,7 +1033,10 @@ n = GPOINTER_TO_INT(data); if (!vw) return; - view_fullscreen_toggle(vw, TRUE); + if (!editor_window_flag_set(n)) + { + view_fullscreen_toggle(vw, TRUE); + } start_editor_from_file(n, image_get_path(vw->imd)); } Seulement dans gqview-2.0.1.new/src: img-view.o Seulement dans gqview-2.0.1.new/src: info.o Seulement dans gqview-2.0.1.new/src: layout_config.o diff -ru gqview-2.0.1/src/layout_image.c gqview-2.0.1.new/src/layout_image.c --- gqview-2.0.1/src/layout_image.c 2005-03-01 17:00:03.000000000 +0100 +++ gqview-2.0.1.new/src/layout_image.c 2006-08-16 22:38:40.000000000 +0200 @@ -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,7 +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)); } Seulement dans gqview-2.0.1.new/src: layout_image.o Seulement dans gqview-2.0.1.new/src: layout.o Seulement dans gqview-2.0.1.new/src: layout_util.o Seulement dans gqview-2.0.1.new/src: main.o Seulement dans gqview-2.0.1.new/src: Makefile Seulement dans gqview-2.0.1.new/src: md5-util.o Seulement dans gqview-2.0.1.new/src: menu.o Seulement dans gqview-2.0.1.new/src: pixbuf_util.o Seulement dans gqview-2.0.1.new/src: preferences.o Seulement dans gqview-2.0.1.new/src: print.o Seulement dans gqview-2.0.1.new/src: rcfile.o Seulement dans gqview-2.0.1.new/src: remote.o Seulement dans gqview-2.0.1.new/src: search.o Seulement dans gqview-2.0.1.new/src: similar.o Seulement dans gqview-2.0.1.new/src: slideshow.o Seulement dans gqview-2.0.1.new/src: thumb.o Seulement dans gqview-2.0.1.new/src: thumb_standard.o Seulement dans gqview-2.0.1.new/src: ui_bookmark.o Seulement dans gqview-2.0.1.new/src: ui_fileops.o Seulement dans gqview-2.0.1.new/src: ui_help.o Seulement dans gqview-2.0.1.new/src: ui_icons.h Seulement dans gqview-2.0.1.new/src: ui_menu.o Seulement dans gqview-2.0.1.new/src: ui_misc.o Seulement dans gqview-2.0.1.new/src: ui_pathsel.o Seulement dans gqview-2.0.1.new/src: ui_spinner.o Seulement dans gqview-2.0.1.new/src: ui_tabcomp.o Seulement dans gqview-2.0.1.new/src: ui_tree_edit.o Seulement dans gqview-2.0.1.new/src: ui_utildlg.o Seulement dans gqview-2.0.1.new/src: utilops.o Seulement dans gqview-2.0.1.new/src: view_dir_list.o Seulement dans gqview-2.0.1.new/src: view_dir_tree.o Seulement dans gqview-2.0.1.new/src: view_file_icon.o Seulement dans gqview-2.0.1.new/src: view_file_list.o Seulement dans gqview-2.0.1.new/: stamp-h1

Reply via email to