summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-01 15:39:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-01 15:39:33 +0000
commitce434ae886a34dc2bfbb2a2120cf9d2427e4b057 (patch)
tree12ba07e4a4839d1d02a3a73257daeed15b0e48c5 /perl-install/mygtk2.pm
parent1236c8b0479250f79e48ea3ba446abcdc52ad8db (diff)
downloaddrakx-ce434ae886a34dc2bfbb2a2120cf9d2427e4b057.tar
drakx-ce434ae886a34dc2bfbb2a2120cf9d2427e4b057.tar.gz
drakx-ce434ae886a34dc2bfbb2a2120cf9d2427e4b057.tar.bz2
drakx-ce434ae886a34dc2bfbb2a2120cf9d2427e4b057.tar.xz
drakx-ce434ae886a34dc2bfbb2a2120cf9d2427e4b057.zip
- ensure proper centering of popped windows
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 942dea148..3107510c9 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -875,7 +875,7 @@ sub _gtk__MagicWindow {
} elsif ($pop_it) {
$opts->{child} = $sub_child;
- $w = _create_Window($opts);
+ $w = _create_Window($opts, '');
$previous_popped_and_reuse_window = $w if $pop_and_reuse;
} else {
if (!$::WizardWindow) {
@@ -902,7 +902,7 @@ sub _gtk__MagicWindow {
add2hash($opts, {
child => $::WizardTable,
});
- $::WizardWindow = _create_Window($opts);
+ $::WizardWindow = _create_Window($opts, 'special_center');
}
} else {
%$opts = ();
@@ -1169,7 +1169,7 @@ sub mygtk2::MagicWindow::AUTOLOAD {
}
sub _create_Window {
- my ($opts) = @_;
+ my ($opts, $special_center) = @_;
my $no_Window_Manager = exists $opts->{no_Window_Manager} ? delete $opts->{no_Window_Manager} : !$::isStandalone;
@@ -1177,9 +1177,8 @@ sub _create_Window {
if_(!$::isInstall && !$::isWizard, border_width => 5),
#- policy: during install, we need a special code to handle the weird centering, see below
- position_policy => $::isInstall ?
- ($opts->{modal} ? 'center-always' : 'none') :
- $no_Window_Manager ? 'center-always' : 'center-on-parent',
+ position_policy => $special_center ? 'none' :
+ $no_Window_Manager ? 'center-always' : 'center-on-parent',
if_($::isInstall, position => [
$::stepswidth + ($::o->{windowwidth} - $::real_windowwidth) / 2,
@@ -1227,7 +1226,7 @@ sub _create_Window {
$w->move(max(0, $::rootwidth - ($::o->{windowwidth} + $wi) / 2),
max(0, ($::o->{windowheight} - $he) / 2));
- });
+ }) if $special_center;
}
$w;