App-PLab
view release on metacpan or search on metacpan
$ok = 0, last if $userAborted;
}
$curr = $w-> {fileNum};
if ( $ok) {
# big rename from .bak to .cen
$statwin-> text("Restoring .cen files...");
while ( $curr != $to + $incr) {
my $cenname = $w-> win_extname( $w-> win_formfilename( $curr));
if ( -f "$cenname.bak") {
Prima::MsgBox::message("Cannot rename backup file. Please note that it $cenname.bak file contains actual information.")
if !unlink($cenname) || !rename( "$cenname.bak", $cenname);
} else {
Prima::MsgBox::message("Cannot delete $cenname. Note that it contains non actual information.")
if !unlink($cenname);
}
$curr += $incr;
$g-> value( $g-> value + 1);
$g-> update_view;
}
} else {
text => $w-> generate_statistics_text(),
blockType => bt::Vertical,
);
$norepaint = 1;
}
$sd->StatText->text( $w-> generate_statistics_text()) unless $norepaint;
}
sub file_backup
{
my $w = $_[0];
my ( $cpm, $file) = ( $w-> {cypherMask}, $w-> win_extname( $w-> {file}));
$file =~ s/\d{$cpm}(\.pls)$/$1/;
return if Prima::MsgBox::message( "Copy $file to $file.bak?", mb::OKCancel) != mb::OK;
return if -f "$file.bak" and Prima::MsgBox::message( "$file.bak exists. Overwrite?", mb::OKCancel) != mb::OK;
require File::Copy;
return if File::Copy::copy( $file, "$file.bak");
Prima::MsgBox::message( "Error:$!", mb::OK|mb::Error);
}
}
# OPT_END
package Run;
my $wfil = App::PLab::ImageAppWindow::winmenu_file();
splice( @{$$wfil[1]}, -1, 0,
[ '-FileStats' => "~Statistics" => q(show_stats)],
[ '-FileBackup' => "~Backup results" => q(file_backup)],
[],
);
my $wedt = App::PLab::ImageAppWindow::winmenu_edit();
splice( @{$$wedt[2]}, 0, 0,
[ EditAutoCrispening => "~Auto crispening" => q(crispen_state_changed) ],
[ EditAutoStretching => "Auto stretching" => q(stretching_state_changed) ],
[ EditRemoveAll => "Remove all frame data" => q(remove_frame_data) ],
[],
( run in 0.688 second using v1.01-cache-2.11-cpan-49f99fa48dc )