diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-10 17:30:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-10 17:30:30 +0000 |
commit | 9982ba2abd0ebdd8072ea8a67ed9c75ca6235ee4 (patch) | |
tree | 52b43ac64f720b4bc10244e6db8768d37d51e0a8 | |
parent | 084081f2d1051e6fd37bea4028c100535b48ac35 (diff) | |
download | drakx-9982ba2abd0ebdd8072ea8a67ed9c75ca6235ee4.tar drakx-9982ba2abd0ebdd8072ea8a67ed9c75ca6235ee4.tar.gz drakx-9982ba2abd0ebdd8072ea8a67ed9c75ca6235ee4.tar.bz2 drakx-9982ba2abd0ebdd8072ea8a67ed9c75ca6235ee4.tar.xz drakx-9982ba2abd0ebdd8072ea8a67ed9c75ca6235ee4.zip |
move some now common things in _create_window()
-rw-r--r-- | perl-install/ugtk2.pm | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index a182a7539..fd800fb25 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -839,9 +839,7 @@ sub new { if ($o->{pop_it}) { $o->{rwindow} = _create_window( title => $title, - position_policy => !$::isInstall && !$::isStandalone ? 'center_always' : 'center-on-parent', modal => $grab || $o->{grab} || $o->{modal}, - if_(!$::isInstall, icon_no_error => wm_icon()), if_($o->{transient} && $o->{transient} =~ /Gtk2::Window/, transient_for => $o->{transient}), ); @@ -855,7 +853,13 @@ sub new { } } else { if (!$::WizardWindow) { - $::WizardTable = gtknew('VBox'); + my $banner; + if (!$::isEmbedded && !$::isInstall) { + $banner = Gtk2::Banner->new(wm_icon(), $::Wizard_title) or log::l("ERROR: missing wizard banner"); + } + $::WizardTable = gtknew('VBox', + if_($banner, children_tight => $banner), + ); if ($::isEmbedded) { $::Plug = $::WizardWindow = gtknew('Plug', @@ -869,14 +873,7 @@ sub new { $::WizardWindow = _create_window( title => $title, child => gtknew('Frame', shadow_type => 'out', child => $::WizardTable), - if_(!$::isInstall, icon_no_error => wm_icon()), - if_(!$::isInstall && !$::isStandalone, position_policy => 'center_always'), - ); - - if (!$::isInstall) { - eval { gtkpack__($::WizardTable, Gtk2::Banner->new(wm_icon(), $::Wizard_title)) }; - $@ and log::l("ERROR: missing wizard banner"); - } + ); $::WizardWindow->show; } } @@ -944,6 +941,8 @@ sub _create_window { my $w = gtknew('Window', if_(!$::isInstall && !$::isWizard, border_width => 5), widget_name => 'Title', + position_policy => !$::isInstall && !$::isStandalone ? 'center_always' : 'center-on-parent', + if_(!$::isInstall, icon_no_error => wm_icon()), %options); if ($force_focus) { |