… | |
… | |
81 | |
81 | |
82 | $viewer->signal_connect (button3_press_event => sub { |
82 | $viewer->signal_connect (button3_press_event => sub { |
83 | $mainwin->visible |
83 | $mainwin->visible |
84 | ? $mainwin->hide |
84 | ? $mainwin->hide |
85 | : $mainwin->show_all; |
85 | : $mainwin->show_all; |
|
|
86 | 1; |
86 | }); |
87 | }); |
87 | |
88 | |
88 | $schnauzer = new_schnauzer; |
89 | $schnauzer = new_schnauzer; |
89 | |
90 | |
90 | $mainwin = new Gtk2::Window; |
91 | $mainwin = new Gtk2::Window; |
91 | $mainwin->set_title ("CV"); |
92 | $mainwin->set_title ("CV"); |
92 | $mainwin->add (my $vbox = new Gtk2::VBox); |
93 | $mainwin->add (my $vbox = new Gtk2::VBox); |
|
|
94 | $mainwin->signal_connect (delete_event => sub { $mainwin->hide; 1; }); |
93 | |
95 | |
94 | $vbox->add ($schnauzer); |
96 | $vbox->add ($schnauzer); |
95 | $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); |
97 | $vbox->pack_end (my $frame = new Gtk2::Frame, 0, 0, 0); |
96 | $frame->add (my $hbox = new Gtk2::HBox 0, 0); |
98 | $frame->add (my $hbox = new Gtk2::HBox 0, 0); |
97 | $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0); |
99 | $hbox->pack_start ((new Gtk2::Label "Info"), 0, 0, 0); |
… | |
… | |
164 | end move to last file |
166 | end move to last file |
165 | |
167 | |
166 | ctrl-g generate icons for the selected files |
168 | ctrl-g generate icons for the selected files |
167 | ctrl-d delete selected files WITHOUT ASKING AGAIN |
169 | ctrl-d delete selected files WITHOUT ASKING AGAIN |
168 | |
170 | |
|
|
171 | =head1 SECURITY CONSIDERATIONS |
|
|
172 | |
|
|
173 | CV uses Pixbuf to load images. Pixbuf is not considered safe for this |
|
|
174 | purpose, though (from the gtk-2.2 release notes): |
|
|
175 | |
|
|
176 | "While efforts have been made to make gdk-pixbuf robust against invalid |
|
|
177 | images, using gdk-pixbuf to load untrusted data is not recommended, due to |
|
|
178 | the likelyhood that there are additional problems where an invalid image |
|
|
179 | could cause gdk-pixbuf to crash or worse." |
|
|
180 | |
169 | =head1 BUGS/TODO |
181 | =head1 BUGS/TODO |
|
|
182 | |
|
|
183 | Pixbuf doesn't honor G_BROKEN_FILENAMES, so accessing files with names |
|
|
184 | incompatible with utf-8 fails. |
170 | |
185 | |
171 | rotate on disk |
186 | rotate on disk |
172 | print |
187 | print |
173 | lots of ui issues |
188 | lots of ui issues |
174 | save(?) |
189 | save(?) |