diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-02-26 13:08:54 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-02-26 13:08:54 +0000 |
commit | 28fe9b3576275cbb2c7a5d17fe2c1e14ee39a4fc (patch) | |
tree | 9d666a087bbc1f1f038631fc4a3104caeaa1f0ef /Rpmdrake/rpmnew.pm | |
parent | 79542c610d148bfe57fb47614f5a646fcec16c12 (diff) | |
download | rpmdrake-28fe9b3576275cbb2c7a5d17fe2c1e14ee39a4fc.tar rpmdrake-28fe9b3576275cbb2c7a5d17fe2c1e14ee39a4fc.tar.gz rpmdrake-28fe9b3576275cbb2c7a5d17fe2c1e14ee39a4fc.tar.bz2 rpmdrake-28fe9b3576275cbb2c7a5d17fe2c1e14ee39a4fc.tar.xz rpmdrake-28fe9b3576275cbb2c7a5d17fe2c1e14ee39a4fc.zip |
(inspect) split it out of dialog_rpmnew()
Diffstat (limited to 'Rpmdrake/rpmnew.pm')
-rwxr-xr-x | Rpmdrake/rpmnew.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm index 02c5695f..8c1c7847 100755 --- a/Rpmdrake/rpmnew.pm +++ b/Rpmdrake/rpmnew.pm @@ -65,15 +65,10 @@ my %ignores_rpmnew = map { $_ => 1 } qw( /etc/sysconfig/xinetd ); -sub dialog_rpmnew { - my ($msg, %p2r) = @_; - @{$p2r{$_}} = grep { !$ignores_rpmnew{$_} } @{$p2r{$_}} foreach keys %p2r; - my $sum_rpmnew = sum(map { int @{$p2r{$_}} } keys %p2r); - $sum_rpmnew == 0 and return 1; - my @inspect_wsize = ($typical_width*2.5, 500); - my $inspect = sub { +sub inspect { my ($file) = @_; my ($rpmnew, $rpmsave) = ("$file.rpmnew", "$file.rpmsave"); + my @inspect_wsize = ($typical_width*2.5, 500); my $rpmfile = 'rpmnew'; -r $rpmnew or $rpmfile = 'rpmsave'; -r $rpmnew && -r $rpmsave && (stat $rpmsave)[9] > (stat $rpmnew)[9] and $rpmfile = 'rpmsave'; @@ -143,8 +138,13 @@ sub dialog_rpmnew { $buffer->set_language($lang) if $lang; $d->{rwindow}->set_default_size(@inspect_wsize); $d->main; - }; +} +sub dialog_rpmnew { + my ($msg, %p2r) = @_; + @{$p2r{$_}} = grep { !$ignores_rpmnew{$_} } @{$p2r{$_}} foreach keys %p2r; + my $sum_rpmnew = sum(map { int @{$p2r{$_}} } keys %p2r); + $sum_rpmnew == 0 and return 1; interactive_packtable( N("Installation finished"), $::main_window, @@ -163,7 +163,7 @@ sub dialog_rpmnew { gtksignal_connect( $b = gtknew('Button', text => N("Inspect...")), clicked => sub { - $inspect->($f); + inspect($f); -r "$f.rpmnew" || -r "$f.rpmsave" or $b->set_sensitive(0); }, ) ]; |