… | |
… | |
4 | use Encode (); |
4 | use Encode (); |
5 | |
5 | |
6 | use Gtk2 -init; |
6 | use Gtk2 -init; |
7 | use Gtk2::Gdk::Keysyms; |
7 | use Gtk2::Gdk::Keysyms; |
8 | |
8 | |
|
|
9 | use Gtk2::CV; |
|
|
10 | |
9 | use Gtk2::CV::ImageWindow; |
11 | use Gtk2::CV::ImageWindow; |
10 | use Gtk2::CV::Schnauzer; |
12 | use Gtk2::CV::Schnauzer; |
11 | |
13 | |
12 | use Gtk2::CV; |
14 | BEGIN { |
|
|
15 | require Gtk2::CV::Plugin; |
|
|
16 | require "$ENV{HOME}/.cvrc" if -r "$ENV{HOME}/.cvrc"; |
|
|
17 | } |
|
|
18 | |
|
|
19 | use Gtk2::CV::Plugin::NameCluster; |
|
|
20 | use Gtk2::CV::Plugin::RCluster; |
13 | |
21 | |
14 | Gtk2::Rc->parse (Gtk2::CV::find_rcfile "gtkrc"); |
22 | Gtk2::Rc->parse (Gtk2::CV::find_rcfile "gtkrc"); |
15 | |
23 | |
16 | use File::Spec; |
24 | use File::Spec; |
17 | |
|
|
18 | require Gtk2::CV::Plugin; |
|
|
19 | require "$ENV{HOME}/.cvrc" if -r "$ENV{HOME}/.cvrc"; |
|
|
20 | |
25 | |
21 | my $mainwin; |
26 | my $mainwin; |
22 | my $viewer; |
27 | my $viewer; |
23 | my $schnauzer; |
28 | my $schnauzer; |
24 | my $info; |
29 | my $info; |
… | |
… | |
122 | |
127 | |
123 | $schnauzer->set_geometry_hints; |
128 | $schnauzer->set_geometry_hints; |
124 | } |
129 | } |
125 | |
130 | |
126 | if (@ARGV) { |
131 | if (@ARGV) { |
|
|
132 | @ARGV == 1 && -d $ARGV[0] |
|
|
133 | ? $schnauzer->set_dir (Glib::filename_to_unicode shift) |
127 | $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV]); |
134 | : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV]); |
128 | $schnauzer->show_all; |
135 | $schnauzer->show_all; |
129 | $viewer->show_all; |
|
|
130 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
136 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
131 | } else { |
137 | } else { |
132 | $schnauzer->set_dir (File::Spec->curdir); |
138 | $schnauzer->set_dir (File::Spec->curdir); |
133 | $mainwin->show_all; |
139 | $mainwin->show_all; |
134 | $viewer->show_all; |
|
|
135 | } |
140 | } |
136 | |
141 | |
137 | $viewer->show_all; |
142 | $viewer->show_all; |
138 | |
143 | |
139 | main Gtk2; |
144 | main Gtk2; |
… | |
… | |
223 | |
228 | |
224 | =head2 THE IMAGE WINDOW |
229 | =head2 THE IMAGE WINDOW |
225 | |
230 | |
226 | You can use the following keys in the image window: |
231 | You can use the following keys in the image window: |
227 | |
232 | |
228 | q quit the program |
233 | q quit the program |
229 | < half the image size |
234 | < half the image size |
230 | > double the image size |
235 | > double the image size |
231 | , shrink the image by 10% |
236 | , shrink the image by 10% |
232 | . enlarge the image by 10% |
237 | . enlarge the image by 10% |
233 | n reset to normal size |
238 | n reset to normal size |
234 | m maximize to screensize |
239 | m maximize to screensize |
235 | M maximize to screensize, respecting image aspect |
240 | M maximize to screensize, respecting image aspect |
236 | ctrl-m toggle maxpect-always mode |
241 | ctrl-m toggle maxpect-always mode |
237 | u uncrop |
242 | u uncrop |
238 | r set scaling mode to 'nearest' (fastest) |
243 | r set scaling mode to 'nearest' (fastest) |
239 | s set scaling mode to 'bilinear' (default) |
244 | s set scaling mode to 'bilinear' (default) |
240 | shift-s set scaling mode to 'hyper' (slowest) |
245 | shift-s set scaling mode to 'hyper' (slowest) |
241 | t rotate clockwise 90° |
246 | t rotate clockwise 90° |
242 | T rotate counterclockwise° |
247 | T rotate counterclockwise° |
243 | ctrl-v open a new visual schnauzer window for the current dir |
248 | ctrl-v open a new visual schnauzer window for the current dir |
244 | ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image |
249 | ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image |
245 | ctrl-p fire up the print fialog |
250 | ctrl-p fire up the print fialog |
246 | escape cancel a crop action |
251 | escape cancel a crop action |
247 | |
252 | |
248 | And when playing movies, these additional keys are active: |
253 | And when playing movies, these additional keys are active: |
249 | |
254 | |
250 | left rewind by 10 seconds |
255 | left rewind by 10 seconds |
251 | right forward by 10 seconds |
256 | right forward by 10 seconds |
252 | down rewind by 60 seconds |
257 | down rewind by 60 seconds |
253 | up forward by 60 seconds |
258 | up forward by 60 seconds |
254 | pg_up rewind by 600 seconds |
259 | pg_up rewind by 600 seconds |
255 | pg_down forward by 600 seconds |
260 | pg_down forward by 600 seconds |
256 | o toggle on-screen display |
261 | o toggle on-screen display |
257 | p pause/unpause |
262 | p pause/unpause |
258 | escape stop playing |
263 | escape stop playing |
259 | 9 turn volume down |
264 | 9 turn volume down |
260 | 0 turn volume up |
265 | 0 turn volume up |
261 | |
266 | |
262 | Any other keys will be sent to the default schnauzer window, which can be |
267 | Any other keys will be sent to the default schnauzer window, which can be |
263 | toggled on and off by right-clicking into the image window. |
268 | toggled on and off by right-clicking into the image window. |
264 | |
269 | |
265 | Left-clicking into the image window will let you crop the image (usually |
270 | Left-clicking into the image window will let you crop the image (usually |
… | |
… | |
268 | =head2 THE VISUAL SCHNAUZER |
273 | =head2 THE VISUAL SCHNAUZER |
269 | |
274 | |
270 | You can use the following keys in the schnauzer window: |
275 | You can use the following keys in the schnauzer window: |
271 | |
276 | |
272 | ctrl-space, |
277 | ctrl-space, |
273 | space move to and display next image |
278 | space move to and display next image |
274 | ctrl-backspace, |
279 | ctrl-backspace, |
275 | backspace move to and display previous image |
280 | backspace move to and display previous image |
276 | ctrl-return, |
281 | ctrl-return, |
277 | return display selected picture, or enter directory |
282 | return display selected picture, or enter directory |
278 | |
283 | |
279 | cursor keys move selection |
284 | cursor keys move selection |
280 | page-up move one page up |
285 | page-up move one page up |
281 | page-down move one page down |
286 | page-down move one page down |
282 | home move to first file |
287 | home move to first file |
283 | end move to last file |
288 | end move to last file |
284 | |
289 | |
285 | ctrl-a select all files |
290 | ctrl-a select all files |
|
|
291 | ctrl-shift-a select all files currently displayed in the schnauzer window |
286 | ctrl-d delete selected files WITHOUT ASKING AGAIN |
292 | ctrl-d delete selected files WITHOUT ASKING AGAIN |
287 | ctrl-g force generation of thumbnais for the selected files |
293 | ctrl-g force generation of thumbnais for the selected files |
288 | ctrl-s rescan current direcory or files updates/deletes etc. |
294 | ctrl-s rescan current direcory or files updates/deletes etc. |
289 | ctrl-u update selected (or all) icons if neccessary |
295 | ctrl-u update selected (or all) icons if neccessary |
290 | ctrl-l don't use, will become a plug-in eventually |
296 | ctrl-l don't use, will become a plug-in eventually |
291 | |
297 | |
292 | 0-9, |
298 | 0-9, |
293 | a-z find the first filename beginning with this letter |
299 | a-z find the first filename beginning with this letter |
294 | |
300 | |
295 | Right-clicking into the schnauzer window displays a pop-up menu with |
301 | Right-clicking into the schnauzer window displays a pop-up menu with |
296 | additional actions. |
302 | additional actions. |
297 | |
303 | |
298 | =head1 FILES |
304 | =head1 FILES |