summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/interactive/gtk.pm5
-rw-r--r--perl-install/mygtk2.pm20
3 files changed, 23 insertions, 4 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 6b663b2d2..44ad58a8b 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- pop wait_messages and ensure same window is used for next wait_messages
+ (to ensure the background is not greyed,ungreyed,greyed,...)
- improved license step
- install lilo when needed (#39878)
- render some message titles as blue
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 1330fb0dd..ae07ff4e7 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -857,7 +857,8 @@ sub wait_messageW {
my $Window = gtknew('MagicWindow',
title => $title,
- pop_it => defined $o->{pop_wait_messages} ? $o->{pop_wait_messages} : !$::isInstall,
+ pop_it => defined $o->{pop_wait_messages} ? $o->{pop_wait_messages} : 1,
+ pop_and_reuse => $::isInstall,
modal => 1,
$::isInstall ? (banner => gtknew('Install_Title', text => $message)) : (),
no_Window_Manager => exists $o->{no_Window_Manager} ? $o->{no_Window_Manager} : !$::isStandalone,
@@ -880,6 +881,8 @@ sub wait_message_nextW {
}
sub wait_message_endW {
my ($_o, $Window) = @_;
+ $Window->{pop_and_reuse} and return;
+
mygtk2::may_destroy($Window);
mygtk2::flush();
}
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 657e89d49..d3fc4701e 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -667,6 +667,8 @@ sub _gtk_any_Window {
$w;
}
+my $previous_popped_window;
+
sub _gtk__MagicWindow {
my ($w, $opts) = @_;
@@ -676,6 +678,7 @@ sub _gtk__MagicWindow {
any { !$_->isa('Gtk2::DrawingArea') && $_->visible } $::WizardTable->get_children;
};
+ my $pop_and_reuse = delete $opts->{pop_and_reuse} && $pop_it;
my $sub_child = delete $opts->{child};
my $provided_banner = delete $opts->{banner};
@@ -684,11 +687,22 @@ sub _gtk__MagicWindow {
} else {
$sub_child ||= gtknew('VBox');
}
+ if ($previous_popped_window && !$pop_and_reuse) {
+ $previous_popped_window->destroy;
+ $previous_popped_window = undef;
+ }
+
+ if ($previous_popped_window && $pop_and_reuse) {
+ $w = $previous_popped_window;
+ $w->remove($w->child);
- if ($pop_it) {
+ gtkadd($w, child => $sub_child);
+ %$opts = ();
+ } elsif ($pop_it) {
$opts->{child} = $sub_child;
- $w = _create_Window($opts);
+ $w = _create_Window($opts, pop_and_reuse => $pop_and_reuse);
+ $previous_popped_window = $w if $pop_and_reuse;
} else {
if (!$::WizardWindow) {
@@ -729,7 +743,7 @@ sub _gtk__MagicWindow {
}
bless {
real_window => $w,
- child => $sub_child, pop_it => $pop_it,
+ child => $sub_child, pop_it => $pop_it, pop_and_reuse => $pop_and_reuse,
if_($provided_banner, banner => $provided_banner),
}, 'mygtk2::MagicWindow';
}