diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-07-29 11:18:29 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-07-29 11:18:29 +0000 |
commit | efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3 (patch) | |
tree | 2a8ff824b3ff6dc75a7b98601bd8b393f26efc6d | |
parent | d1111388fe7b88c1516beb14864d1f6d7e74eb27 (diff) | |
download | drakx-backup-do-not-use-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar drakx-backup-do-not-use-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar.gz drakx-backup-do-not-use-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar.bz2 drakx-backup-do-not-use-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.tar.xz drakx-backup-do-not-use-efdd2c7205a92de5f6bb4beef8baa5eb7212ecc3.zip |
(show_prev)
- kill useless variables
- simplify
-rwxr-xr-x | perl-install/standalone/draksplash | 13 |
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 |