summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--gurpm/RPMProgressDialog.pm4
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 622fdd86..c3c7e906 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- library:
+ o restore main_window when globall progress bar dialog is deleted
+
Version 7.20 - 19 March 2013, by Thierry Vignaud
- library:
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;