ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CV/bin/cv
(Generate patch)

Comparing CV/bin/cv (file contents):
Revision 1.66 by root, Wed Feb 15 19:47:20 2006 UTC vs.
Revision 1.71 by root, Thu Oct 4 10:30:12 2007 UTC

115 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) { 115 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) {
116 unless ($help) { 116 unless ($help) {
117 require Gtk2::PodViewer; 117 require Gtk2::PodViewer;
118 118
119 $help = new Gtk2::Window; 119 $help = new Gtk2::Window;
120 $w->set_role ("help"); 120 $help->set_role ("help");
121 $help->set_title ("CV: Help"); 121 $help->set_title ("CV: Help");
122 $help->set_default_size (500, 300); 122 $help->set_default_size (500, 300);
123 $help->signal_connect (delete_event => sub { $help->hide; 1 }); 123 $help->signal_connect (delete_event => sub { $help->hide; 1 });
124 124
125 $help->add (my $sw = new Gtk2::ScrolledWindow); 125 $help->add (my $sw = new Gtk2::ScrolledWindow);
160 160
161 $schnauzer->set_geometry_hints; 161 $schnauzer->set_geometry_hints;
162} 162}
163 163
164if (@ARGV) { 164if (@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
177main Gtk2; 186main Gtk2;
187
188Gtk2::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
424The program that gets executed when the user presses C<CTRL-e> in the 435The program that gets executed when the user presses C<CTRL-e> in the
425Schnauzer or image window. The default is C<gimp>. 436Schnauzer or image window. The default is C<gimp>.
426 437
438=item CV_AUDIO_PLAYER
439
440Program used to play all sorts of audio (wav, aif, mp3, ogg...), default "play".
441Will be called like C<< $CV_AUDIO_PLAYER -- <path> >>.
442
427=item CV_PRINT_DESTINATION 443=item CV_PRINT_DESTINATION
428 444
429The default (perl-style) destination to use in the print dialog. 445The default (perl-style) destination to use in the print dialog.
430 446
431=item CV_TRASHCAN 447=item CV_TRASHCAN

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines