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

Comparing CV/bin/cv (file contents):
Revision 1.62 by root, Tue Oct 4 04:55:47 2005 UTC vs.
Revision 1.67 by root, Mon Mar 20 04:18:01 2006 UTC

70 } else { 70 } else {
71 &std_keys 71 &std_keys
72 or $schnauzer->signal_emit (key_press_event => $_[1]) 72 or $schnauzer->signal_emit (key_press_event => $_[1])
73 } 73 }
74 }); 74 });
75 $self->signal_connect (delete_event => sub { $_[0]->destroy; 0 });
75 $self->signal_connect (destroy => sub { 76 $self->signal_connect (destroy => sub {
76 $viewer = undef if $viewer == $_[0]; 77 $viewer = undef if $viewer == $_[0];
77 78
78 main_quit Gtk2 unless --$viewer_count; 79 main_quit Gtk2 unless --$viewer_count;
80
81 0
79 }); 82 });
80 83
81 $self->signal_connect (button3_press_event => sub { 84 $self->signal_connect (button3_press_event => sub {
82 $mainwin->visible 85 $mainwin->visible
83 ? $mainwin->hide 86 ? $mainwin->hide
84 : $mainwin->show_all; 87 : $mainwin->show_all;
88
85 1 89 1
86 }); 90 });
87 91
88 Gtk2::CV::Plugin->call (new_imagewindow => $self); 92 Gtk2::CV::Plugin->call (new_imagewindow => $self);
89 93
99 if ($key == $Gtk2::Gdk::Keysyms{q}) { 103 if ($key == $Gtk2::Gdk::Keysyms{q}) {
100 $viewer->destroy; 104 $viewer->destroy;
101 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{v}) { 105 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{v}) {
102 my $w = new Gtk2::Window; 106 my $w = new Gtk2::Window;
103 107
108 $w->set_role ("schnauzer");
104 $w->set_title ("CV: Schnauzer"); 109 $w->set_title ("CV: Schnauzer");
105 $w->add (my $s = new_schnauzer); 110 $w->add (my $s = new_schnauzer);
106 $s->set_dir (File::Spec->curdir); 111 $s->set_dir (File::Spec->curdir);
107 $s->set_geometry_hints; 112 $s->set_geometry_hints;
108 $w->show_all; 113 $w->show_all;
110 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) { 115 } elsif ($ctrl && $key == $Gtk2::Gdk::Keysyms{h}) {
111 unless ($help) { 116 unless ($help) {
112 require Gtk2::PodViewer; 117 require Gtk2::PodViewer;
113 118
114 $help = new Gtk2::Window; 119 $help = new Gtk2::Window;
120 $help->set_role ("help");
115 $help->set_title ("CV: Help"); 121 $help->set_title ("CV: Help");
116 $help->set_default_size (500, 300); 122 $help->set_default_size (500, 300);
117 $help->signal_connect (delete_event => sub { $help->hide; 1 }); 123 $help->signal_connect (delete_event => sub { $help->hide; 1 });
118 124
119 $help->add (my $sw = new Gtk2::ScrolledWindow); 125 $help->add (my $sw = new Gtk2::ScrolledWindow);
136 $::cur_viewer = $viewer; 142 $::cur_viewer = $viewer;
137 143
138 $schnauzer = new_schnauzer; 144 $schnauzer = new_schnauzer;
139 145
140 $mainwin = new Gtk2::Window; 146 $mainwin = new Gtk2::Window;
147 $mainwin->set_role ("main");
141 $mainwin->set_title ("CV"); 148 $mainwin->set_title ("CV");
142 $mainwin->add (my $vbox = new Gtk2::VBox); 149 $mainwin->add (my $vbox = new Gtk2::VBox);
143 $mainwin->signal_connect (delete_event => sub { $mainwin->hide; 1 }); 150 $mainwin->signal_connect (delete_event => sub { $mainwin->hide; 1 });
144 151
145 $vbox->add ($schnauzer); 152 $vbox->add ($schnauzer);
155} 162}
156 163
157if (@ARGV) { 164if (@ARGV) {
158 @ARGV == 1 && -d $ARGV[0] 165 @ARGV == 1 && -d $ARGV[0]
159 ? $schnauzer->set_dir (Glib::filename_to_unicode shift) 166 ? $schnauzer->set_dir (Glib::filename_to_unicode shift)
160 : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV]); 167 : $schnauzer->set_paths ([map Glib::filename_to_unicode $_, @ARGV], 1);
161 $schnauzer->show_all; 168 $schnauzer->show_all;
162 $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []); 169 $schnauzer->handle_key ($Gtk2::Gdk::Keysyms{space}, []);
163} else { 170} else {
164 $schnauzer->set_dir (File::Spec->curdir); 171 $schnauzer->set_dir (File::Spec->curdir);
165 $mainwin->show_all; 172 $mainwin->show_all;
292 r set scaling mode to 'nearest' (fastest) 299 r set scaling mode to 'nearest' (fastest)
293 s set scaling mode to 'bilinear' (default) 300 s set scaling mode to 'bilinear' (default)
294 shift-s set scaling mode to 'hyper' (slowest) 301 shift-s set scaling mode to 'hyper' (slowest)
295 t rotate clockwise 90° 302 t rotate clockwise 90°
296 T rotate counterclockwise° 303 T rotate counterclockwise°
304 a apply all rotations loslessly to a jpeg file (using exiftran)
297 ctrl-v open a new visual schnauzer window for the current dir 305 ctrl-v open a new visual schnauzer window for the current dir
306 ctrl-c clone the current image window
298 ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image 307 ctrl-e run an editor ($CV_EDITOR or "gimp") on the current image
299 ctrl-p fire up the print dialog 308 ctrl-p fire up the print dialog
300 escape cancel a crop action 309 escape cancel a crop action
301 310
302And when playing movies, these additional keys are active: 311And when playing movies, these additional keys are active:
319Left-clicking into the image window will let you crop the image (usually 328Left-clicking into the image window will let you crop the image (usually
320to zoom into large images that CV scales down). 329to zoom into large images that CV scales down).
321 330
322=head2 THE VISUAL SCHNAUZER 331=head2 THE VISUAL SCHNAUZER
323 332
333Any image-loading action in a schnauzer window acts on the
334"last-recently-activated" imagewindow, which currently is simply the last
335image window that received a keypress.
336
324You can use the following keys in the schnauzer window: 337You can use the following keys in the schnauzer window:
325 338
326 ctrl-space, 339 ctrl-space,
327 space move to and display next image 340 space move to and display next image
328 ctrl-backspace, 341 ctrl-backspace,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines