summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-21 07:28:29 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-21 07:28:29 +0000
commit38c31f25e3082172b8bee6b966dbd3dadad636d0 (patch)
tree33f584782468c88aa1c54d4c8df20ba6948a6f8c
parent556895222b1a4a00d8b3c2c878a235367f48b678 (diff)
downloadurpmi-38c31f25e3082172b8bee6b966dbd3dadad636d0.tar
urpmi-38c31f25e3082172b8bee6b966dbd3dadad636d0.tar.gz
urpmi-38c31f25e3082172b8bee6b966dbd3dadad636d0.tar.bz2
urpmi-38c31f25e3082172b8bee6b966dbd3dadad636d0.tar.xz
urpmi-38c31f25e3082172b8bee6b966dbd3dadad636d0.zip
restore main_window when globall progress bar dialog is deleted
-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;