summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-07-29 11:18:29 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-07-29 11:18:29 +0000
commitefdd2c7205a92de5f6bb4beef8baa5eb7212ecc3 (patch)
tree2a8ff824b3ff6dc75a7b98601bd8b393f26efc6d /perl-install/standalone
parentd1111388fe7b88c1516beb14864d1f6d7e74eb27 (diff)
downloaddrakx-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar
drakx-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar.gz
drakx-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar.bz2
drakx-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar.xz
drakx-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.zip
(show_prev)
- kill useless variables - simplify
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/draksplash13
1 files changed, 5 insertions, 8 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index 8c8866a0c..b6ff8ceef 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -486,13 +486,7 @@ sub set_thm_values() {
}
-my ($prev_pic, $prev_canvas);
-
#- Desc => destroy properly all widget of preview window
-sub kill_preview() {
- $prev_window->destroy; undef($prev_window);
- undef($prev_pic);
-}
#- Desc => create a new window with a preview of splash screen
#- Args => $img_file (str) full path to preview file
sub show_prev {
@@ -501,6 +495,7 @@ sub show_prev {
$prev_window->set_title(
#-PO: First %s is theme name, second %s (in parenthesis) is resolution
N("%s BootSplash (%s) preview", $theme{name}, $theme{res}{res}));
+ my $prev_pic;
eval { $prev_pic = gtkcreate_pixbuf($img_file) };
if (my $err = $@) {
err_dialog(N("Error"),
@@ -513,9 +508,11 @@ sub show_prev {
$prev_pic->scale_simple($theme{res}{w}, $theme{res}{h}, 'hyper');
$prev_window->add(Gtk2::Image->new_from_pixbuf($prev_pic));
- $prev_window->signal_connect(delete_event => \&kill_preview);
+ $prev_window->signal_connect(delete_event => sub {
+ $prev_window->destroy; undef($prev_window);
+ undef($prev_pic);
+ });
$prev_window->show_all;
-
}
#- Desc => define the max size of boot's scales