… | |
… | |
160 | |
160 | |
161 | $schnauzer->set_geometry_hints; |
161 | $schnauzer->set_geometry_hints; |
162 | } |
162 | } |
163 | |
163 | |
164 | if (@ARGV) { |
164 | if (@ARGV) { |
165 | @ARGV == 1 && -d $ARGV[0] |
165 | my $show_first = sub { |
166 | ? $schnauzer->set_dir (Glib::filename_to_unicode shift) |
|
|
167 | : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV], 1); |
|
|
168 | $schnauzer->show_all; |
166 | $schnauzer->show_all; |
169 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
167 | $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); |
|
|
168 | $viewer->show_all; |
|
|
169 | }; |
|
|
170 | |
|
|
171 | if (@ARGV == 1 && $ARGV[0] eq "-0r") { |
|
|
172 | local $/; |
|
|
173 | $schnauzer->set_paths ([map Glib::filename_to_unicode $_, split /\x00/, <STDIN>], 1, $show_first); |
|
|
174 | } elsif (@ARGV == 1 && -d $ARGV[0]) { |
|
|
175 | $schnauzer->set_dir (Glib::filename_to_unicode shift, $show_first); |
|
|
176 | } else { |
|
|
177 | $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV], 1, $show_first); |
|
|
178 | } |
170 | } else { |
179 | } else { |
171 | $schnauzer->set_dir (File::Spec->curdir); |
180 | $schnauzer->set_dir (File::Spec->curdir, sub { |
172 | $mainwin->show_all; |
181 | $mainwin->show_all; |
173 | } |
|
|
174 | |
|
|
175 | $viewer->show_all; |
182 | $viewer->show_all; |
|
|
183 | }); |
|
|
184 | } |
176 | |
185 | |
177 | main Gtk2; |
186 | main Gtk2; |
|
|
187 | |
|
|
188 | Gtk2::CV::flush_aio; |
178 | |
189 | |
179 | __DATA__ |
190 | __DATA__ |
180 | |
191 | |
181 | =encoding utf-8 |
192 | =encoding utf-8 |
182 | |
193 | |
… | |
… | |
422 | =item CV_EDITOR |
433 | =item CV_EDITOR |
423 | |
434 | |
424 | The program that gets executed when the user presses C<CTRL-e> in the |
435 | The program that gets executed when the user presses C<CTRL-e> in the |
425 | Schnauzer or image window. The default is C<gimp>. |
436 | Schnauzer or image window. The default is C<gimp>. |
426 | |
437 | |
|
|
438 | =item CV_AUDIO_PLAYER |
|
|
439 | |
|
|
440 | Program used to play all sorts of audio (wav, aif, mp3, ogg...), default "play". |
|
|
441 | Will be called like C<< $CV_AUDIO_PLAYER -- <path> >>. |
|
|
442 | |
427 | =item CV_PRINT_DESTINATION |
443 | =item CV_PRINT_DESTINATION |
428 | |
444 | |
429 | The default (perl-style) destination to use in the print dialog. |
445 | The default (perl-style) destination to use in the print dialog. |
430 | |
446 | |
431 | =item CV_TRASHCAN |
447 | =item CV_TRASHCAN |