… | |
… | |
43 | $viewer->load_image ($_[1]); |
43 | $viewer->load_image ($_[1]); |
44 | }); |
44 | }); |
45 | |
45 | |
46 | Gtk2::CV::Plugin->call (new_schnauzer => $s); |
46 | Gtk2::CV::Plugin->call (new_schnauzer => $s); |
47 | |
47 | |
48 | $s; |
48 | $s |
49 | } |
49 | } |
50 | |
50 | |
51 | sub std_keys { |
51 | sub std_keys { |
52 | my $key = $_[1]->keyval; |
52 | my $key = $_[1]->keyval; |
53 | my $state = $_[1]->state; |
53 | my $state = $_[1]->state; |
… | |
… | |
102 | |
102 | |
103 | $viewer->signal_connect (button3_press_event => sub { |
103 | $viewer->signal_connect (button3_press_event => sub { |
104 | $mainwin->visible |
104 | $mainwin->visible |
105 | ? $mainwin->hide |
105 | ? $mainwin->hide |
106 | : $mainwin->show_all; |
106 | : $mainwin->show_all; |
107 | 1; |
107 | 1 |
108 | }); |
108 | }); |
109 | |
109 | |
110 | Gtk2::CV::Plugin->call (new_imagewindow => $viewer); |
110 | Gtk2::CV::Plugin->call (new_imagewindow => $viewer); |
111 | |
111 | |
112 | $schnauzer = new_schnauzer; |
112 | $schnauzer = new_schnauzer; |
113 | |
113 | |
114 | $mainwin = new Gtk2::Window; |
114 | $mainwin = new Gtk2::Window; |
115 | $mainwin->set_title ("CV"); |
115 | $mainwin->set_title ("CV"); |
116 | $mainwin->add (my $vbox = new Gtk2::VBox); |
116 | $mainwin->add (my $vbox = new Gtk2::VBox); |
117 | $mainwin->signal_connect (delete_event => sub { $mainwin->hide; 1; }); |
117 | $mainwin->signal_connect (delete_event => sub { $mainwin->hide; 1 }); |
118 | |
118 | |
119 | $vbox->add ($schnauzer); |
119 | $vbox->add ($schnauzer); |
120 | $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); |
120 | $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); |
121 | $frame->add (my $hbox = new Gtk2::HBox 0, 0); |
121 | $frame->add (my $hbox = new Gtk2::HBox 0, 0); |
122 | $hbox->pack_start ((new Gtk2::Label "Info: "), 0, 0, 0); |
122 | $hbox->pack_start ((new Gtk2::Label "Info: "), 0, 0, 0); |
… | |
… | |
127 | |
127 | |
128 | $schnauzer->set_geometry_hints; |
128 | $schnauzer->set_geometry_hints; |
129 | } |
129 | } |
130 | |
130 | |
131 | if (@ARGV) { |
131 | if (@ARGV) { |
|
|
132 | @ARGV == 1 && -d $ARGV[0] |
|
|
133 | ? $schnauzer->set_dir (Glib::filename_to_unicode shift) |
132 | $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV]); |
134 | : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV]); |
133 | $schnauzer->show_all; |
135 | $schnauzer->show_all; |
134 | $viewer->show_all; |
|
|
135 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
136 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
136 | } else { |
137 | } else { |
137 | $schnauzer->set_dir (File::Spec->curdir); |
138 | $schnauzer->set_dir (File::Spec->curdir); |
138 | $mainwin->show_all; |
139 | $mainwin->show_all; |
139 | $viewer->show_all; |
|
|
140 | } |
140 | } |
141 | |
141 | |
142 | $viewer->show_all; |
142 | $viewer->show_all; |
143 | |
143 | |
144 | main Gtk2; |
144 | main Gtk2; |
… | |
… | |
169 | |
169 | |
170 | This algorithm is quite unprecise - it doesn't make a difference between |
170 | This algorithm is quite unprecise - it doesn't make a difference between |
171 | files, device nodes, symlinks and the like, and filetype detection is done |
171 | files, device nodes, symlinks and the like, and filetype detection is done |
172 | using the file extension only. |
172 | using the file extension only. |
173 | |
173 | |
|
|
174 | =item * queuing for all time-consuming background tasks |
|
|
175 | |
|
|
176 | All tasks, such as unlinking files or generating thumbnails, that can be |
|
|
177 | done in the background will be done so - no waiting required, even when |
|
|
178 | changing directories. |
|
|
179 | |
174 | =item * use of asynchronous I/O |
180 | =item * use of asynchronous I/O |
175 | |
181 | |
176 | CV tries to use asynchronous I/O whereever it makes sense, for example |
182 | CV tries to use asynchronous I/O whereever it makes sense, for example |
177 | while scanning directories, waiting for stat data or unlinking files. This |
183 | while scanning directories, waiting for stat data, unlinking files or |
178 | usually decreases scanning times for large directories a bit (especially |
184 | generating thumbnails. This usually decreases scanning times for large |
179 | on RAID devices and over NFS). |
185 | directories a bit (especially on RAID devices and over NFS) and makes CV |
|
|
186 | much more interactive. |
180 | |
187 | |
181 | =item * fast image loading |
188 | =item * fast image loading |
182 | |
189 | |
183 | The time span between the user issuing a command and displaying the new |
190 | The time span between the user issuing a command and displaying the new |
184 | image should be as small as possible. CV uses optimized (especially |
191 | image should be as small as possible. CV uses optimized (especially |
… | |
… | |
228 | |
235 | |
229 | =head2 THE IMAGE WINDOW |
236 | =head2 THE IMAGE WINDOW |
230 | |
237 | |
231 | You can use the following keys in the image window: |
238 | You can use the following keys in the image window: |
232 | |
239 | |
233 | q quit the program |
240 | q quit the program |
234 | < half the image size |
241 | < half the image size |
235 | > double the image size |
242 | > double the image size |
236 | , shrink the image by 10% |
243 | , shrink the image by 10% |
237 | . enlarge the image by 10% |
244 | . enlarge the image by 10% |
238 | n reset to normal size |
245 | n reset to normal size |
239 | m maximize to screensize |
246 | m maximize to screensize |
240 | M maximize to screensize, respecting image aspect |
247 | M maximize to screensize, respecting image aspect |
241 | ctrl-m toggle maxpect-always mode |
248 | ctrl-m toggle maxpect-always mode |
242 | u uncrop |
249 | u uncrop |
243 | r set scaling mode to 'nearest' (fastest) |
250 | r set scaling mode to 'nearest' (fastest) |
244 | s set scaling mode to 'bilinear' (default) |
251 | s set scaling mode to 'bilinear' (default) |
245 | shift-s set scaling mode to 'hyper' (slowest) |
252 | shift-s set scaling mode to 'hyper' (slowest) |
246 | t rotate clockwise 90° |
253 | t rotate clockwise 90° |
247 | T rotate counterclockwise° |
254 | T rotate counterclockwise° |
248 | ctrl-v open a new visual schnauzer window for the current dir |
255 | ctrl-v open a new visual schnauzer window for the current dir |
249 | ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image |
256 | ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image |
250 | ctrl-p fire up the print fialog |
257 | ctrl-p fire up the print fialog |
251 | escape cancel a crop action |
258 | escape cancel a crop action |
252 | |
259 | |
253 | And when playing movies, these additional keys are active: |
260 | And when playing movies, these additional keys are active: |
254 | |
261 | |
255 | left rewind by 10 seconds |
262 | left rewind by 10 seconds |
256 | right forward by 10 seconds |
263 | right forward by 10 seconds |
257 | down rewind by 60 seconds |
264 | down rewind by 60 seconds |
258 | up forward by 60 seconds |
265 | up forward by 60 seconds |
259 | pg_up rewind by 600 seconds |
266 | pg_up rewind by 600 seconds |
260 | pg_down forward by 600 seconds |
267 | pg_down forward by 600 seconds |
261 | o toggle on-screen display |
268 | o toggle on-screen display |
262 | p pause/unpause |
269 | p pause/unpause |
263 | escape stop playing |
270 | escape stop playing |
264 | 9 turn volume down |
271 | 9 turn volume down |
265 | 0 turn volume up |
272 | 0 turn volume up |
266 | |
273 | |
267 | Any other keys will be sent to the default schnauzer window, which can be |
274 | Any other keys will be sent to the default schnauzer window, which can be |
268 | toggled on and off by right-clicking into the image window. |
275 | toggled on and off by right-clicking into the image window. |
269 | |
276 | |
270 | Left-clicking into the image window will let you crop the image (usually |
277 | Left-clicking into the image window will let you crop the image (usually |
… | |
… | |
273 | =head2 THE VISUAL SCHNAUZER |
280 | =head2 THE VISUAL SCHNAUZER |
274 | |
281 | |
275 | You can use the following keys in the schnauzer window: |
282 | You can use the following keys in the schnauzer window: |
276 | |
283 | |
277 | ctrl-space, |
284 | ctrl-space, |
278 | space move to and display next image |
285 | space move to and display next image |
279 | ctrl-backspace, |
286 | ctrl-backspace, |
280 | backspace move to and display previous image |
287 | backspace move to and display previous image |
281 | ctrl-return, |
288 | ctrl-return, |
282 | return display selected picture, or enter directory |
289 | return display selected picture, or enter directory |
283 | |
290 | |
284 | cursor keys move selection |
291 | cursor keys move selection |
285 | page-up move one page up |
292 | page-up move one page up |
286 | page-down move one page down |
293 | page-down move one page down |
287 | home move to first file |
294 | home move to first file |
288 | end move to last file |
295 | end move to last file |
289 | |
296 | |
290 | ctrl-a select all files |
297 | ctrl-a select all files |
|
|
298 | ctrl-shift-a select all files currently displayed in the schnauzer window |
291 | ctrl-d delete selected files WITHOUT ASKING AGAIN |
299 | ctrl-d delete selected files WITHOUT ASKING AGAIN |
292 | ctrl-g force generation of thumbnais for the selected files |
300 | ctrl-g force generation of thumbnais for the selected files |
293 | ctrl-s rescan current direcory or files updates/deletes etc. |
301 | ctrl-s rescan current direcory or files updates/deletes etc. |
294 | ctrl-u update selected (or all) icons if neccessary |
302 | ctrl-u update selected (or all) icons if neccessary |
295 | ctrl-l don't use, will become a plug-in eventually |
303 | ctrl-l don't use, will become a plug-in eventually |
296 | |
304 | |
297 | 0-9, |
305 | 0-9, |
298 | a-z find the first filename beginning with this letter |
306 | a-z find the first filename beginning with this letter |
299 | |
307 | |
300 | Right-clicking into the schnauzer window displays a pop-up menu with |
308 | Right-clicking into the schnauzer window displays a pop-up menu with |
301 | additional actions. |
309 | additional actions. |
302 | |
310 | |
303 | =head1 FILES |
311 | =head1 FILES |