--- CV/bin/cv 2003/11/08 01:00:08 1.21 +++ CV/bin/cv 2003/11/14 00:38:43 1.29 @@ -18,6 +18,8 @@ my $info; my $help; +my $schnauzer_idx = 0; + sub new_schnauzer { my $s = new Gtk2::CV::Schnauzer; @@ -43,15 +45,19 @@ main_quit Gtk2; } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{v}) { my $w = new Gtk2::Window; + + $w->set_title ("CV: Schnauzer"); $w->add (my $s = new_schnauzer); $s->set_dir (File::Spec->curdir); + $s->set_geometry_hints; $w->show_all; + } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) { unless ($help) { require Gtk2::PodViewer; $help = new Gtk2::Window; - $help->set_title ("CV Help"); + $help->set_title ("CV: Help"); $help->set_default_size (500, 300); $help->signal_connect (delete_event => sub { $help->hide; 1 }); @@ -83,6 +89,7 @@ $mainwin->visible ? $mainwin->hide : $mainwin->show_all; + 1; }); $schnauzer = new_schnauzer; @@ -90,17 +97,22 @@ $mainwin = new Gtk2::Window; $mainwin->set_title ("CV"); $mainwin->add (my $vbox = new Gtk2::VBox); + $mainwin->signal_connect (delete_event => sub { $mainwin->hide; 1; }); $vbox->add ($schnauzer); - $vbox->add (my $frame = new Gtk2::Frame); + $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); $frame->add (my $hbox = new Gtk2::HBox 0, 0); $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0); $hbox->pack_start (($info = new Gtk2::Label), 1, 1, 0); + + $schnauzer->set_geometry_hints; } if (@ARGV) { $schnauzer->set_paths (\@ARGV); $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); + + $viewer->load_image ($ARGV[0]); } else { $schnauzer->set_dir (File::Spec->curdir); $mainwin->show_all; @@ -136,6 +148,7 @@ n reset to normal size m maximize to screensize M maxime to screensize, respecting image aspect + ctrl-m toggle maxpect-always mode u uncrop r set scaling mode to 'nearest' (fastest) s set scaling mode to 'bilinear' (default) @@ -143,6 +156,7 @@ t rotate clockwise 90° T rotate counterclockwise° ctrl-v open a new visual schnauzer window for the current dir + ctrl-s rescan visual schnauzer files for updates/deletes etc. The following keys are redirected to the default visual schnauzer window: @@ -163,11 +177,35 @@ home move to first file end move to last file - ctrl-g generate icons for the selected files ctrl-d delete selected files WITHOUT ASKING AGAIN + ctrl-g generate icons for the selected files + ctrl-u update selected (or all) icons if neccessary + +=head1 ENVIRONMENT + +=over 4 + +=item CV_PRINT_DESTINATION + +The default (perl-style) destination to use in the print dialog. + +=back + +=head1 SECURITY CONSIDERATIONS + +CV uses Pixbuf to load images. Pixbuf is not considered safe for this +purpose, though (from the gtk-2.2 release notes): + +"While efforts have been made to make gdk-pixbuf robust against invalid +images, using gdk-pixbuf to load untrusted data is not recommended, due to +the likelyhood that there are additional problems where an invalid image +could cause gdk-pixbuf to crash or worse." =head1 BUGS/TODO + Pixbuf doesn't honor G_BROKEN_FILENAMES, so accessing files with names + incompatible with utf-8 fails. + rotate on disk print lots of ui issues