diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-09-11 18:11:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-09-11 18:11:16 +0000 |
commit | 2223e5b1c42f333a8b88468d125236e39135eb03 (patch) | |
tree | ea5cba80a84f808d6ec1645342b19a0e351ed499 /perl-install | |
parent | 08da869bd28c9906fd135db0b5a5151d0f258bb8 (diff) | |
download | drakx-2223e5b1c42f333a8b88468d125236e39135eb03.tar drakx-2223e5b1c42f333a8b88468d125236e39135eb03.tar.gz drakx-2223e5b1c42f333a8b88468d125236e39135eb03.tar.bz2 drakx-2223e5b1c42f333a8b88468d125236e39135eb03.tar.xz drakx-2223e5b1c42f333a8b88468d125236e39135eb03.zip |
use center_always for popped windows (if transient is not used), and force centering in Xconfig test
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfig/test.pm | 2 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index ab4af5eab..93ec31e6e 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -122,7 +122,7 @@ sub test { gtkset_background(200 * 257, 210 * 257, 210 * 257); my ($h, $w) = gtkroot()->get_size; - $ugtk2::force_position = [ $w / 3, $h / 2.4 ]; + $ugtk2::force_center = 1; $ugtk2::force_focus = 1; my $text = Gtk2::Label->new; my $time = 12; diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index e876ce936..8918c14c8 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -807,13 +807,16 @@ sub new { $o->_create_window($title); while (my $e = shift @tempory::objects) { $e->destroy } - $o->{pop_it} ||= $pop_it || $::WizardTable && do { + $o->{pop_it} ||= $pop_it || (!$::isWizard && !$::isEmbedded) || $::WizardTable && do { my @l = $::WizardTable->get_children; pop @l if !$::isInstall && $::isWizard; #- don't take into account the DrawingArea any { $_->visible } @l; }; if ($o->{pop_it}) { + $o->{rwindow}->set_position('center_always') if + $::isStandalone && ($force_center || $o->{force_center}) || + @interactive::objects && $::isStandalone && !$o->{transient}; #- no need to center when set_transient is used push @interactive::objects, $o if !$opts{no_interactive_objects}; $o->{rwindow}->set_modal(1) if ($grab || $o->{grab} || $o->{modal}) && !$::isInstall; $o->{rwindow}->set_transient_for($o->{transient}) if $o->{transient}; @@ -975,7 +978,7 @@ sub _create_window($$) { my ($X, $Y, $Wi, $He) = @{$force_center || $o->{force_center}}; $w->set_uposition(max(0, $X + ($Wi - $wi) / 2), max(0, $Y + ($He - $he) / 2)); - }) if ($force_center || $o->{force_center}) && !($force_position || $o->{force_position}); + }) if $::isInstall && ($force_center || $o->{force_center}) && !($force_position || $o->{force_position}); $o->{window} = $::noBorder ? $w : $f; $o->{rwindow} = $w; |