diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-31 14:36:27 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-31 14:36:27 +0000 |
commit | b521c7bf17b0440c01f1ad9d6c90f591a9c77d5f (patch) | |
tree | cea0fc04b9f4af15133a6977f9f070107090fc45 | |
parent | 032dd82bc486aafc4647edc3442f1e5f431525dd (diff) | |
download | drakx-b521c7bf17b0440c01f1ad9d6c90f591a9c77d5f.tar drakx-b521c7bf17b0440c01f1ad9d6c90f591a9c77d5f.tar.gz drakx-b521c7bf17b0440c01f1ad9d6c90f591a9c77d5f.tar.bz2 drakx-b521c7bf17b0440c01f1ad9d6c90f591a9c77d5f.tar.xz drakx-b521c7bf17b0440c01f1ad9d6c90f591a9c77d5f.zip |
handle pop_it more nicely: no need to precise pop_it when the wizard window already has a window,
that way, two dialog boxes won't merge in the same window (which is dumb!)
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 1 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 1 | ||||
-rw-r--r-- | perl-install/interactive/gtk.pm | 3 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 9 |
4 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 156f32404..53c06f3bd 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -94,7 +94,6 @@ sub main { }); $w->sync; $done_button->grab_focus; - local $ugtk2::pop_it = 1; $in->ask_okcancel(N("Read carefully!"), N("Please make a backup of your data first"), 1) or return if $::isStandalone; $in->ask_warn('', diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 1838af1cd..7098756b2 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -577,7 +577,6 @@ If you don't have it, press Cancel to avoid installation from this Cd-Rom.", $na } }; my $install_result; - local $ugtk2::pop_it = 1; catch_cdie { $install_result = $o->install_steps::installPackages($packages) } sub { if ($@ =~ /^error ordering package list: (.*)/) { diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 720211c30..99ff75ccd 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -671,8 +671,7 @@ sub ask_from__add_modify_removeW { sub wait_messageW($$$) { my ($o, $title, $messages) = @_; - local $ugtk2::pop_it = 1; - my $w = ugtk2->new($title, %$o, grab => 1, if__($::main_window, transient => $::main_window)); + my $w = ugtk2->new($title, %$o, grab => 1, pop_it => 1, if__($::main_window, transient => $::main_window)); gtkadd($w->{window}, my $hbox = Gtk2::HBox->new(0,0)); $hbox->pack_start(my $box = Gtk2::VBox->new(0,0), 1, 1, 10); $box->pack_start($_, 1, 1, 4) foreach my @l = map { Gtk2::Label->new(scalar warp_text($_)) } @$messages; diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 16a9db1a2..192b8d95a 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -438,7 +438,7 @@ sub create_packtable { sub create_okcancel { my ($w, $ok, $cancel, $spread, @other) = @_; - my $wizard_buttons = $::isWizard && !$pop_it; + my $wizard_buttons = $::isWizard && !$w->{pop_it}; $spread ||= $wizard_buttons ? "end" : "spread"; $cancel = $wizard_buttons ? N("<- Previous") : N("Cancel") if !defined $cancel && !defined $ok; $ok = $wizard_buttons ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : N("Ok") if !defined $ok; @@ -721,7 +721,10 @@ sub new { $o->{rwindow}->set_modal(1) if $grab || $o->{grab} || $o->{modal}; $o->{rwindow}->set_transient_for($o->{transient}) if $o->{transient}; - if ($::isWizard && !$pop_it) { + + $o->{pop_it} ||= $pop_it || $::WizardTable && listlength($::WizardTable->get_children); + + if ($::isWizard && !$o->{pop_it}) { $o->{isWizard} = 1; $o->{window} = Gtk2::VBox->new(0,0); $o->{window}->set_border_width($::Wizard_splash ? 0 : 10); @@ -788,7 +791,7 @@ sub new { $::WizardTable->attach($o->{window}, 0, 2, 1, 2, ['fill', 'expand'], ['fill', 'expand'], 0, 0); } - if ($::isEmbedded && !$pop_it && !eval { $::Plug && $::Plug->child }) { + if ($::isEmbedded && !$o->{pop_it} && !eval { $::Plug && $::Plug->child }) { $o->{isEmbedded} = 1; $o->{window} = new Gtk2::HBox(0,0); $o->{rwindow} = $o->{window}; |