diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-22 21:04:37 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-22 21:04:37 +0000 |
commit | cc4ed8ffec03196cd9ee56d4dbe1aba685d2409a (patch) | |
tree | cfdcf03f2c2f6c7ff52fd7de8414f6feecb59650 /rpmdrake.pm | |
parent | 99a6d9c6f8b8b43e47c4238ccc322bd355e0b238 (diff) | |
download | rpmdrake-cc4ed8ffec03196cd9ee56d4dbe1aba685d2409a.tar rpmdrake-cc4ed8ffec03196cd9ee56d4dbe1aba685d2409a.tar.gz rpmdrake-cc4ed8ffec03196cd9ee56d4dbe1aba685d2409a.tar.bz2 rpmdrake-cc4ed8ffec03196cd9ee56d4dbe1aba685d2409a.tar.xz rpmdrake-cc4ed8ffec03196cd9ee56d4dbe1aba685d2409a.zip |
(choose_mirror,mirrors) display a message in statusbar (if availlable)
rather than a wait dialog
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 ab23c11e..1d86e371 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -509,6 +509,18 @@ sub mirrors { $file =~ s!.*/!$cachedir/!; unlink $file; # prevent "partial file" errors before_leaving(sub { unlink $file }); + + my $id; + # display a message in statusbar (if availlable): + $::statusbar and $id = statusbar_msg( + $branded + ? N("Please wait, downloading mirror addresses.") + : N("Please wait, downloading mirror addresses from the Mandriva website."), + 0); + my $_clean_guard = before_leaving { + $id and statusbar_msg_remove($id); + }; + my $res = urpm::download::sync($urpm, undef, [ $url ], dir => $cachedir); $res or do { c::set_tagged_utf8($res); die $res }; return cat_($file); @@ -543,15 +555,8 @@ Is it ok to continue?"); delete $options{message}; my @transient_options = exists $options{transient} ? (transient => $options{transient}) : (); interactive_msg(N("Mirror choice"), $message, yesno => 1, %options) or return ''; - my $wait = wait_msg( - ($branded - ? N("Please wait, downloading mirror addresses.") - : N("Please wait, downloading mirror addresses from the Mandriva website.")), - @transient_options - ); my @mirrors = eval { mirrors($urpm, $options{want_base_distro}) }; my $error = $@; - remove_wait_msg($wait); if ($error) { interactive_msg(N("Error during download"), ($branded |