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

Comparing CV/bin/cv (file contents):
Revision 1.23 by root, Wed Nov 12 00:59:02 2003 UTC vs.
Revision 1.35 by root, Tue Feb 8 02:54:59 2005 UTC

15my $mainwin; 15my $mainwin;
16my $viewer; 16my $viewer;
17my $schnauzer; 17my $schnauzer;
18my $info; 18my $info;
19my $help; 19my $help;
20
21my $schnauzer_idx = 0;
20 22
21sub new_schnauzer { 23sub new_schnauzer {
22 my $s = new Gtk2::CV::Schnauzer; 24 my $s = new Gtk2::CV::Schnauzer;
23 25
24 $s->signal_connect_after (key_press_event => \&std_keys); 26 $s->signal_connect_after (key_press_event => \&std_keys);
41 43
42 if ($key == $Gtk2::Gdk::Keysyms{q}) { 44 if ($key == $Gtk2::Gdk::Keysyms{q}) {
43 main_quit Gtk2; 45 main_quit Gtk2;
44 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{v}) { 46 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{v}) {
45 my $w = new Gtk2::Window; 47 my $w = new Gtk2::Window;
48
49 $w->set_title ("CV: Schnauzer");
46 $w->add (my $s = new_schnauzer); 50 $w->add (my $s = new_schnauzer);
47 $s->set_dir (File::Spec->curdir); 51 $s->set_dir (File::Spec->curdir);
52 $s->set_geometry_hints;
48 $w->show_all; 53 $w->show_all;
54
49 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) { 55 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) {
50 unless ($help) { 56 unless ($help) {
51 require Gtk2::PodViewer; 57 require Gtk2::PodViewer;
52 58
53 $help = new Gtk2::Window; 59 $help = new Gtk2::Window;
54 $help->set_title ("CV Help"); 60 $help->set_title ("CV: Help");
55 $help->set_default_size (500, 300); 61 $help->set_default_size (500, 300);
56 $help->signal_connect (delete_event => sub { $help->hide; 1 }); 62 $help->signal_connect (delete_event => sub { $help->hide; 1 });
57 63
58 $help->add (my $sw = new Gtk2::ScrolledWindow); 64 $help->add (my $sw = new Gtk2::ScrolledWindow);
59 $sw->add (my $h = new Gtk2::PodViewer); 65 $sw->add (my $h = new Gtk2::PodViewer);
96 $vbox->add ($schnauzer); 102 $vbox->add ($schnauzer);
97 $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); 103 $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0);
98 $frame->add (my $hbox = new Gtk2::HBox 0, 0); 104 $frame->add (my $hbox = new Gtk2::HBox 0, 0);
99 $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0); 105 $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0);
100 $hbox->pack_start (($info = new Gtk2::Label), 1, 1, 0); 106 $hbox->pack_start (($info = new Gtk2::Label), 1, 1, 0);
107
108 $schnauzer->set_geometry_hints;
101} 109}
102 110
103if (@ARGV) { 111if (@ARGV) {
112 $_ = Glib::filename_to_unicode $_ for @ARGV;
104 $schnauzer->set_paths (\@ARGV); 113 $schnauzer->set_paths (\@ARGV);
114 $schnauzer->show_all;
105 $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); 115 $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []);
106} else { 116} else {
107 $schnauzer->set_dir (File::Spec->curdir); 117 $schnauzer->set_dir (File::Spec->curdir);
108 $mainwin->show_all; 118 $mainwin->show_all;
119 $viewer->show_all;
109} 120}
110 121
111$viewer->show_all; 122$viewer->show_all;
112 123
113main Gtk2; 124main Gtk2;
136 , shrink the image by 10% 147 , shrink the image by 10%
137 . enlarge the image by 10% 148 . enlarge the image by 10%
138 n reset to normal size 149 n reset to normal size
139 m maximize to screensize 150 m maximize to screensize
140 M maxime to screensize, respecting image aspect 151 M maxime to screensize, respecting image aspect
152 ctrl-m toggle maxpect-always mode
141 u uncrop 153 u uncrop
142 r set scaling mode to 'nearest' (fastest) 154 r set scaling mode to 'nearest' (fastest)
143 s set scaling mode to 'bilinear' (default) 155 s set scaling mode to 'bilinear' (default)
144 S set scaling mode to 'hyper' (slowest) 156 S set scaling mode to 'hyper' (slowest)
145 t rotate clockwise 90° 157 t rotate clockwise 90°
146 T rotate counterclockwise° 158 T rotate counterclockwise°
147 ctrl-v open a new visual schnauzer window for the current dir 159 ctrl-v open a new visual schnauzer window for the current dir
160 ctrl-s rescan visual schnauzer files for updates/deletes etc.
161 ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image.
162
163And when playing movies, these additional keys are active:
164
165 left rewind by 10 seconds
166 right forward by 10 seconds
167 down rewind by 60 seconds
168 up forward by 60 seconds
169 pg_up rewind by 600 seconds
170 pg_down forward by 600 seconds
171 o toggle on-screen display
172 p pause/unpause
173 escape stop playing
174 9 turn volume down
175 0 turn volume up
148 176
149The following keys are redirected to the default visual schnauzer window: 177The following keys are redirected to the default visual schnauzer window:
150 178
151 space next image 179 space next image
152 backspace last image 180 backspace last image
163 page-up move one page up 191 page-up move one page up
164 page-down move one page down 192 page-down move one page down
165 home move to first file 193 home move to first file
166 end move to last file 194 end move to last file
167 195
196 ctrl-d delete selected files WITHOUT ASKING AGAIN
168 ctrl-g generate icons for the selected files 197 ctrl-g generate icons for the selected files
169 ctrl-d delete selected files WITHOUT ASKING AGAIN 198 ctrl-u update selected (or all) icons if neccessary
199 ctrl-a select all files
200
201=head1 ENVIRONMENT
202
203=over 4
204
205=item CV_PRINT_DESTINATION
206
207The default (perl-style) destination to use in the print dialog.
208
209=back
170 210
171=head1 SECURITY CONSIDERATIONS 211=head1 SECURITY CONSIDERATIONS
172 212
173CV uses Pixbuf to load images. Pixbuf is not considered safe for this 213CV uses Pixbuf to load images. Pixbuf is not considered safe for this
174purpose, though (from the gtk-2.2 release notes): 214purpose, though (from the gtk-2.2 release notes):

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines