diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-02-21 16:25:09 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-02-21 16:25:09 +0000 |
commit | 670f21ba5c821d35ebc5ee40c37c0835a6ffd4b7 (patch) | |
tree | e47c04e48c724d0b82172abfdbf5bcf5b720c935 /rpmdrake.pm | |
parent | 9a25e863d65d0a8b11d9f3002a9ae5b114e1d3a2 (diff) | |
download | rpmdrake-670f21ba5c821d35ebc5ee40c37c0835a6ffd4b7.tar rpmdrake-670f21ba5c821d35ebc5ee40c37c0835a6ffd4b7.tar.gz rpmdrake-670f21ba5c821d35ebc5ee40c37c0835a6ffd4b7.tar.bz2 rpmdrake-670f21ba5c821d35ebc5ee40c37c0835a6ffd4b7.tar.xz rpmdrake-670f21ba5c821d35ebc5ee40c37c0835a6ffd4b7.zip |
anticipate soon in the future new ability of urpm to show progress of local files
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index f23b4b68..317e7d66 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -339,22 +339,27 @@ by Mandrake Linux Official Updates.")), return ''; sub show_urpm_progress { my ($label, $pb, $mode, $file, $percent, $total, $eta, $speed) = @_; - my $filename if 0; - if ($mode eq 'start') { - ($filename = $file) =~ s|([^:]*://[^/:\@]*:)[^/:\@]*(\@.*)|$1xxxx$2|; #- if needed... + my $progress_filename if 0; + if ($mode eq 'localcopy') { $pb->set_fraction(0); - $label->set_label(N("Starting download of `%s'", $filename)); + $label->set_label(N("Copying local file `%s'...", $file)); + } elsif ($mode eq 'start') { + ($progress_filename = $file) =~ s|([^:]*://[^/:\@]*:)[^/:\@]*(\@.*)|$1xxxx$2|; #- if needed... + $pb->set_fraction(0); + $label->set_label(N("Starting download of `%s'...", $progress_filename)); + } elsif ($mode eq 'up2date') { + $pb->set_fraction(0); + $label->set_label(N("Local file `%s' already up to date", $progress_filename)); } elsif ($mode eq 'progress') { if (defined $total && defined $eta) { $pb->set_fraction($percent/100); - $label->set_label(N("Download of `%s', time to go:%s, speed:%s", $filename, $eta, $speed)); + $label->set_label(N("Download of `%s', time to go:%s, speed:%s", $progress_filename, $eta, $speed)); } else { $pb->set_fraction($percent/100); - $label->set_label(N("Download of `%s', speed:%s", $filename, $percent, $speed)); + $label->set_label(N("Download of `%s', speed:%s", $progress_filename, $percent, $speed)); } } elsif ($mode eq 'end') { $label->set_label(N("Please wait, updating media...")); - undef $filename; } Gtk2->update_ui; } |