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

Comparing CV/bin/cv (file contents):
Revision 1.73 by root, Thu Nov 22 08:52:57 2007 UTC vs.
Revision 1.75 by root, Sat Mar 1 04:11:26 2008 UTC

37 my $s = new Gtk2::CV::Schnauzer; 37 my $s = new Gtk2::CV::Schnauzer;
38 38
39 $s->signal_connect_after (key_press_event => \&std_keys); 39 $s->signal_connect_after (key_press_event => \&std_keys);
40 $s->signal_connect (activate => sub { 40 $s->signal_connect (activate => sub {
41 my $label = sprintf "%s (%d)", 41 my $label = sprintf "%s (%d)",
42 (File::Spec->splitpath ($_[1]))[2], 42 (Glib::filename_display_name +(File::Spec->splitpath ($_[1]))[2]),
43 -s $_[1]; 43 -s $_[1];
44 $info->set_label ($label); 44 $info->set_label ($label);
45 $viewer->load_image ($_[1]) if $viewer; # TODO: error, or chose ANY viewer 45 $viewer->load_image ($_[1]) if $viewer; # TODO: error, or chose ANY viewer
46 }); 46 });
47 47
169 $viewer->show_all; 169 $viewer->show_all;
170 }; 170 };
171 171
172 if (@ARGV == 1 && $ARGV[0] eq "-0r") { 172 if (@ARGV == 1 && $ARGV[0] eq "-0r") {
173 local $/; 173 local $/;
174 $schnauzer->set_paths ([map Glib::filename_to_unicode $_, split /\x00/, <STDIN>], 1, $show_first); 174 $schnauzer->set_paths ([split /\x00/, <STDIN>], 1, $show_first);
175 } elsif (@ARGV == 1 && -d $ARGV[0]) { 175 } elsif (@ARGV == 1 && -d $ARGV[0]) {
176 $schnauzer->set_dir (Glib::filename_to_unicode shift, $show_first); 176 $schnauzer->set_dir (shift, $show_first);
177 } else { 177 } else {
178 if ($ARGV[0] eq "-g") { 178 if ($ARGV[0] eq "-g") {
179 shift @ARGV; 179 shift @ARGV;
180 @ARGV = map +(File::Glob::bsd_glob $_, File::Glob::GLOB_BRACE | File::Glob::GLOB_QUOTE), @ARGV; 180 @ARGV = map +(File::Glob::bsd_glob $_, File::Glob::GLOB_BRACE | File::Glob::GLOB_QUOTE), @ARGV;
181 } 181 }
182 $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV], 1, $show_first); 182 $schnauzer->set_paths ([@ARGV], 1, $show_first);
183 } 183 }
184} else { 184} else {
185 $schnauzer->set_dir (File::Spec->curdir, sub { 185 $schnauzer->set_dir (File::Spec->curdir, sub {
186 $mainwin->show_all; 186 $mainwin->show_all;
187 $viewer->show_all; 187 $viewer->show_all;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines