… | |
… | |
70 | } else { |
70 | } else { |
71 | &std_keys |
71 | &std_keys |
72 | or $schnauzer->signal_emit (key_press_event => $_[1]) |
72 | or $schnauzer->signal_emit (key_press_event => $_[1]) |
73 | } |
73 | } |
74 | }); |
74 | }); |
|
|
75 | $self->signal_connect (delete_event => sub { $_[0]->destroy; 0 }); |
75 | $self->signal_connect (destroy => sub { |
76 | $self->signal_connect (destroy => sub { |
76 | $viewer = undef if $viewer == $_[0]; |
77 | $viewer = undef if $viewer == $_[0]; |
77 | |
78 | |
78 | main_quit Gtk2 unless --$viewer_count; |
79 | main_quit Gtk2 unless --$viewer_count; |
|
|
80 | |
|
|
81 | 0 |
79 | }); |
82 | }); |
80 | |
83 | |
81 | $self->signal_connect (button3_press_event => sub { |
84 | $self->signal_connect (button3_press_event => sub { |
82 | $mainwin->visible |
85 | $mainwin->visible |
83 | ? $mainwin->hide |
86 | ? $mainwin->hide |
84 | : $mainwin->show_all; |
87 | : $mainwin->show_all; |
|
|
88 | |
85 | 1 |
89 | 1 |
86 | }); |
90 | }); |
87 | |
91 | |
88 | Gtk2::CV::Plugin->call (new_imagewindow => $self); |
92 | Gtk2::CV::Plugin->call (new_imagewindow => $self); |
89 | |
93 | |
… | |
… | |
155 | } |
159 | } |
156 | |
160 | |
157 | if (@ARGV) { |
161 | if (@ARGV) { |
158 | @ARGV == 1 && -d $ARGV[0] |
162 | @ARGV == 1 && -d $ARGV[0] |
159 | ? $schnauzer->set_dir (Glib::filename_to_unicode shift) |
163 | ? $schnauzer->set_dir (Glib::filename_to_unicode shift) |
160 | : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV]); |
164 | : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV], 1); |
161 | $schnauzer->show_all; |
165 | $schnauzer->show_all; |
162 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
166 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
163 | } else { |
167 | } else { |
164 | $schnauzer->set_dir (File::Spec->curdir); |
168 | $schnauzer->set_dir (File::Spec->curdir); |
165 | $mainwin->show_all; |
169 | $mainwin->show_all; |
… | |
… | |
292 | r set scaling mode to 'nearest' (fastest) |
296 | r set scaling mode to 'nearest' (fastest) |
293 | s set scaling mode to 'bilinear' (default) |
297 | s set scaling mode to 'bilinear' (default) |
294 | shift-s set scaling mode to 'hyper' (slowest) |
298 | shift-s set scaling mode to 'hyper' (slowest) |
295 | t rotate clockwise 90° |
299 | t rotate clockwise 90° |
296 | T rotate counterclockwise° |
300 | T rotate counterclockwise° |
|
|
301 | a apply all rotations loslessly to a jpeg file (using exiftran) |
297 | ctrl-v open a new visual schnauzer window for the current dir |
302 | ctrl-v open a new visual schnauzer window for the current dir |
|
|
303 | ctrl-c clone the current image window |
298 | ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image |
304 | ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image |
299 | ctrl-p fire up the print dialog |
305 | ctrl-p fire up the print dialog |
300 | escape cancel a crop action |
306 | escape cancel a crop action |
301 | |
307 | |
302 | And when playing movies, these additional keys are active: |
308 | And when playing movies, these additional keys are active: |
… | |
… | |
319 | Left-clicking into the image window will let you crop the image (usually |
325 | Left-clicking into the image window will let you crop the image (usually |
320 | to zoom into large images that CV scales down). |
326 | to zoom into large images that CV scales down). |
321 | |
327 | |
322 | =head2 THE VISUAL SCHNAUZER |
328 | =head2 THE VISUAL SCHNAUZER |
323 | |
329 | |
|
|
330 | Any image-loading action in a schnauzer window acts on the |
|
|
331 | "last-recently-activated" imagewindow, which currently is simply the last |
|
|
332 | image window that received a keypress. |
|
|
333 | |
324 | You can use the following keys in the schnauzer window: |
334 | You can use the following keys in the schnauzer window: |
325 | |
335 | |
326 | ctrl-space, |
336 | ctrl-space, |
327 | space move to and display next image |
337 | space move to and display next image |
328 | ctrl-backspace, |
338 | ctrl-backspace, |