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

Comparing CV/bin/cv (file contents):
Revision 1.37 by root, Fri Mar 18 03:45:29 2005 UTC vs.
Revision 1.41 by root, Mon Jun 27 19:42:53 2005 UTC

12use Gtk2::CV; 12use Gtk2::CV;
13 13
14Gtk2::Rc->parse (Gtk2::CV::find_rcfile "gtkrc"); 14Gtk2::Rc->parse (Gtk2::CV::find_rcfile "gtkrc");
15 15
16use File::Spec; 16use File::Spec;
17
18require Gtk2::CV::Plugin;
19require "$ENV{HOME}/.cvrc" if -r "$ENV{HOME}/.cvrc";
17 20
18my $mainwin; 21my $mainwin;
19my $viewer; 22my $viewer;
20my $schnauzer; 23my $schnauzer;
21my $info; 24my $info;
46 Gtk2::Gdk::CHARS, 'replace', 49 Gtk2::Gdk::CHARS, 'replace',
47 Encode::encode_utf8 $path, 50 Encode::encode_utf8 $path,
48 ); 51 );
49 }); 52 });
50 53
54 Gtk2::CV::Plugin->call (new_schnauzer => $s);
55
51 $s; 56 $s;
52} 57}
53 58
54sub std_keys { 59sub std_keys {
55 my $key = $_[1]->keyval; 60 my $key = $_[1]->keyval;
85 } 90 }
86 91
87 $help->show_all; 92 $help->show_all;
88 } else { 93 } else {
89 #$mainwin->show_all; 94 #$mainwin->show_all;
90 $schnauzer->handle_key ($key, $state); 95 return $self->{schnauzer}->signal_emit (key_press_event => $_[1]);
91 } 96 }
92 97
93 1; 98 1;
94} 99}
95 100
106 ? $mainwin->hide 111 ? $mainwin->hide
107 : $mainwin->show_all; 112 : $mainwin->show_all;
108 1; 113 1;
109 }); 114 });
110 115
116 Gtk2::CV::Plugin->call (new_imagewindow => $viewer);
117
111 $schnauzer = new_schnauzer; 118 $schnauzer = new_schnauzer;
112 119
113 $mainwin = new Gtk2::Window; 120 $mainwin = new Gtk2::Window;
114 $mainwin->set_title ("CV"); 121 $mainwin->set_title ("CV");
115 $mainwin->add (my $vbox = new Gtk2::VBox); 122 $mainwin->add (my $vbox = new Gtk2::VBox);
118 $vbox->add ($schnauzer); 125 $vbox->add ($schnauzer);
119 $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); 126 $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0);
120 $frame->add (my $hbox = new Gtk2::HBox 0, 0); 127 $frame->add (my $hbox = new Gtk2::HBox 0, 0);
121 $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0); 128 $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0);
122 $hbox->pack_start (($info = new Gtk2::Label), 1, 1, 0); 129 $hbox->pack_start (($info = new Gtk2::Label), 1, 1, 0);
130 $info->set (wrap => 1);
123 131
124 $schnauzer->set_geometry_hints; 132 $schnauzer->set_geometry_hints;
125} 133}
126 134
127if (@ARGV) { 135if (@ARGV) {
215 223
216=head1 ENVIRONMENT 224=head1 ENVIRONMENT
217 225
218=over 4 226=over 4
219 227
228=item CV_EDITOR
229
230The program that gets executed when the user presses C<CTRL-e> in the
231Schnauzer or image window. The default is C<gimp>.
232
220=item CV_PRINT_DESTINATION 233=item CV_PRINT_DESTINATION
221 234
222The default (perl-style) destination to use in the print dialog. 235The default (perl-style) destination to use in the print dialog.
236
237=item CV_TRASHCAN
238
239When set, must point to a directory where all files that are deleted are
240moved to. If unset, files that are deleted are really being deleted.
223 241
224=back 242=back
225 243
226=head1 SECURITY CONSIDERATIONS 244=head1 SECURITY CONSIDERATIONS
227 245

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines