From d1e011238cd2d2edaaf03376fd6c4a7acfdd2581 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 11 Sep 2003 21:17:54 +0000 Subject: don't display a watch when slow things because due to the large number of gtkflush(), the ask_ok_cancel appears before its Gtk->main is called, hence clicking too fast will call Gtk->main_quit before Gtk->main, but the dialog doesn't disappear; then on the next click on ok/cancel, the call to another Gtk->main_quit will lead to two Gtk->main being exited, hence destroying the ok/cancel dialog but alors the main window (choose of individual packages) --- perl-install/install_steps_gtk.pm | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index d38476972..cb2fd5f12 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -288,13 +288,6 @@ sub choosePackagesTree { my $availableCorrected = pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024); my $common; - my $slow = sub { - my ($func) = @_; - gtkset_mousecursor_wait($common->{widgets}{tree}->window); - ugtk2::flush(); - $func->(); - gtkset_mousecursor_normal($common->{widgets}{tree}->window); - }; $common = { get_status => sub { my $size = pkgs::selectedSize($packages); N("Total size: %d / %d MB", pkgs::correctSize($size / sqr(1024)), $available / sqr(1024)); @@ -338,7 +331,7 @@ sub choosePackagesTree { }, get_info => sub { my $p = pkgs::packageByName($packages, $_[0]) or return ''; - $slow->(sub { pkgs::extractHeaders($o->{prefix}, [$p], $packages->{mediums}) }); + pkgs::extractHeaders($o->{prefix}, [$p], $packages->{mediums}); my $imp = translate($pkgs::compssListDesc{$p->flag_base ? 5 : $p->rate}); @@ -355,13 +348,11 @@ sub choosePackagesTree { my @n = map { pkgs::packageByName($packages, $_) } @_; my %l; my $isSelection = !$n[0]->flag_selected; - $slow->(sub { - foreach (@n) { - #pkgs::togglePackageSelection($packages, $_, my $l = {}); - #@l{grep {$l->{$_}} keys %$l} = (); - pkgs::togglePackageSelection($packages, $_, \%l); - } - }); + foreach (@n) { + #pkgs::togglePackageSelection($packages, $_, my $l = {}); + #@l{grep {$l->{$_}} keys %$l} = (); + pkgs::togglePackageSelection($packages, $_, \%l); + } if (my @l = map { $packages->{depslist}[$_]->name } keys %l) { #- check for size before trying to select. my $size = pkgs::selectedSize($packages); -- cgit v1.2.1