summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-08 15:36:56 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-08 15:36:56 +0000
commit482ef7f20d4367e2565526d0d6693842f0d370cd (patch)
tree5a76352a97012e989878ee4ad7e862e1b079efe5 /perl-install/install_steps_gtk.pm
parentbdf673229f0f4abbf47ffce2432732a079521c80 (diff)
downloaddrakx-backup-do-not-use-482ef7f20d4367e2565526d0d6693842f0d370cd.tar
drakx-backup-do-not-use-482ef7f20d4367e2565526d0d6693842f0d370cd.tar.gz
drakx-backup-do-not-use-482ef7f20d4367e2565526d0d6693842f0d370cd.tar.bz2
drakx-backup-do-not-use-482ef7f20d4367e2565526d0d6693842f0d370cd.tar.xz
drakx-backup-do-not-use-482ef7f20d4367e2565526d0d6693842f0d370cd.zip
added eval around pixmap drawing for advertising.
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm50
1 files changed, 26 insertions, 24 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index bed9318dd..175ece0ea 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -541,30 +541,32 @@ sub installPackages {
my ($pix, undef) = gtkcreate_png($f);
my $dbl_area;
my $darea = new Gtk::DrawingArea;
- gtkpack($box, $advertising = gtksignal_connect(gtkset_usize($darea, $width, $height), expose_event => sub {
- if (!defined($dbl_area)) {
- $dbl_area = new Gtk::Gdk::Pixmap($darea->window, $width, $height);
- $dbl_area->draw_pixmap($darea->style->bg_gc('normal'),
- $pix, 0, 0, $width, $height);
- my $font = $darea->style->font;
- my $style= new Gtk::Style;
- $style->font(Gtk::Gdk::Font->fontset_load($font));
- my $gc_text = new Gtk::Gdk::GC($darea->window);
- $gc_text->set_foreground(gtkcolor(255, 255, 255));
- foreach (@data) {
- my ($width, $height, $lines, $widths, $heights, $ascents, $descents) = get_text_coord (
- $_->[0], $style, $_->[3], $_->[4], 1, 0, 1, 1);
- my $i = 0;
- foreach (@{$lines}) {
- $dbl_area->draw_string($style->font, $gc_text, ${$widths}[$i], ${$ascents}[$i] + ${$heights}[$i], $_);
- $i++;
- }
- }
- } else {
- $darea->window->draw_pixmap($darea->style->bg_gc('normal'),
- $dbl_area, 0, 0, 0, 0, $width, $height);
- }
- }));
+ gtkpack($box, $advertising = gtksignal_connect(gtkset_usize($darea, $width, $height), expose_event => sub {
+ eval {
+ if (!defined($dbl_area)) {
+ $dbl_area = new Gtk::Gdk::Pixmap($darea->window, $width, $height);
+ $dbl_area->draw_pixmap($darea->style->bg_gc('normal'),
+ $pix, 0, 0, $width, $height);
+ my $font = $darea->style->font;
+ my $style= new Gtk::Style;
+ $style->font(Gtk::Gdk::Font->fontset_load($font));
+ my $gc_text = new Gtk::Gdk::GC($darea->window);
+ $gc_text->set_foreground(gtkcolor(255, 255, 255));
+ foreach (@data) {
+ my ($width, $height, $lines, $widths, $heights, $ascents, $descents) =
+ get_text_coord ($_->[0], $style, $_->[3], $_->[4], 1, 0, 1, 1);
+ my $i = 0;
+ foreach (@{$lines}) {
+ $dbl_area->draw_string($style->font, $gc_text,
+ ${$widths}[$i], ${$ascents}[$i] + ${$heights}[$i], $_);
+ $i++;
+ }
+ }
+ } else {
+ $darea->window->draw_pixmap($darea->style->bg_gc('normal'),
+ $dbl_area, 0, 0, 0, 0, $width, $height);
+ }
+ }}));
}
} else {
$advertising = undef;