From deaa2b3370d3d586dec6c1a2136bf66c2af555d1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 10 Jan 2005 16:30:00 +0000 Subject: rewrite --- perl-install/ugtk2.pm | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'perl-install/ugtk2.pm') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 9f0465c8f..c4df679ae 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -854,36 +854,37 @@ sub new { $o->{window} = $o->{rwindow}; } } else { - $o->{rwindow} = $o->{window} = gtknew('VBox', border_width => 10); - set_main_window_size($o); + if (!$::WizardWindow) { + $::WizardTable = gtknew('VBox'); - $::WizardTable ||= gtknew('VBox'); - - if (!$::Plug && $::isEmbedded) { - $::Plug = $::WizardWindow = gtknew('Plug', + if ($::isEmbedded) { + $::Plug = $::WizardWindow = gtknew('Plug', socket_id => $::XID, icon => wm_icon(), child => $::WizardTable, title => $title || '', ); - } elsif (!$::WizardWindow) { - $::WizardWindow = _create_window( - title => $title, - child => gtknew('Frame', shadow_type => 'out', child => $::WizardTable), - if_(!$::isInstall, icon => wm_icon()), - if_(!$::isInstall && !$::isStandalone, position_policy => 'center_always'), - ); - - if ($::isInstall) { - require install_gtk; #- for perl_checker - $::WizardWindow->signal_connect(key_press_event => \&install_gtk::special_shortcuts); + mygtk2::sync($::WizardWindow); } else { - eval { gtkpack__($::WizardTable, Gtk2::Banner->new(wm_icon(), $::Wizard_title)) }; - $@ and log::l("ERROR: missing wizard banner"); + $::WizardWindow = _create_window( + title => $title, + child => gtknew('Frame', shadow_type => 'out', child => $::WizardTable), + if_(!$::isInstall, icon => wm_icon()), + if_(!$::isInstall && !$::isStandalone, position_policy => 'center_always'), + ); + + if ($::isInstall) { + require install_gtk; #- for perl_checker + $::WizardWindow->signal_connect(key_press_event => \&install_gtk::special_shortcuts); + } else { + eval { gtkpack__($::WizardTable, Gtk2::Banner->new(wm_icon(), $::Wizard_title)) }; + $@ and log::l("ERROR: missing wizard banner"); + } + $::WizardWindow->show; } } - $::WizardWindow->show; - flush(); + $o->{rwindow} = $o->{window} = gtknew('VBox', border_width => 10); + set_main_window_size($o); gtkpack($::WizardTable, $o->{window}); } $o->{rwindow}->signal_connect(destroy => sub { $o->{destroyed} = 1 }); -- cgit v1.2.1