From 38c31f25e3082172b8bee6b966dbd3dadad636d0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 21 Mar 2013 07:28:29 +0000 Subject: restore main_window when globall progress bar dialog is deleted --- gurpm/RPMProgressDialog.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gurpm') diff --git a/gurpm/RPMProgressDialog.pm b/gurpm/RPMProgressDialog.pm index 7dd04038..2b23fdb7 100644 --- a/gurpm/RPMProgressDialog.pm +++ b/gurpm/RPMProgressDialog.pm @@ -48,7 +48,7 @@ sub title { } # package variable needed in order to simplify callbacks -my ($mainw, $urpm); +my ($mainw, $urpm, $old_main_window); my $progressbar_size = 450; my ($progress_nb, $download_nb); @@ -72,6 +72,7 @@ sub new { # my $w = ugtk2->new($title, %options, default_width => 600, width => 600); my $w = $mainw = bless(Gtk2::Window->new('toplevel'), $self); + $old_main_window = $::main_window; $::main_window = $w; $w->set_border_width(12); $w->set_title($w->title); @@ -292,6 +293,7 @@ sub DESTROY { my ($self) = @_; undef $mainw; undef $urpm; + $::main_window = $old_main_window; $self and $self->destroy; $self = undef; -- cgit v1.2.1