From f76856df0153de378c3a3d89fdd48775db914f38 Mon Sep 17 00:00:00 2001 From: Daniel Burrows Date: Sat, 10 Jul 2010 16:42:04 -0700 Subject: Use the new acquire_download_progress object to display command-line downloads and delete acqprogress. --- src/cmdline/cmdline_util.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/cmdline/cmdline_util.cc') diff --git a/src/cmdline/cmdline_util.cc b/src/cmdline/cmdline_util.cc index 1bc8317a..078aab6d 100644 --- a/src/cmdline/cmdline_util.cc +++ b/src/cmdline/cmdline_util.cc @@ -59,10 +59,13 @@ namespace cw = cwidget; +using aptitude::cmdline::create_cmdline_download_progress; using aptitude::cmdline::make_text_progress; +using aptitude::cmdline::terminal_input; using aptitude::cmdline::terminal_locale; using aptitude::cmdline::terminal_metrics; using aptitude::cmdline::terminal_output; +using aptitude::controllers::acquire_download_progress; using boost::shared_ptr; namespace @@ -423,6 +426,7 @@ namespace download_manager::result cmdline_do_download(download_manager *m, int verbose, + const shared_ptr &term_input, const shared_ptr &term_locale, const shared_ptr &term_metrics, const shared_ptr &term_output) @@ -442,7 +446,13 @@ download_manager::result cmdline_do_download(download_manager *m, initial_stats = compute_apt_stats(); } - std::auto_ptr log(gen_cmdline_download_progress(term_metrics)); + std::pair > + progress_display = create_cmdline_download_progress(term_input, + term_locale, + term_metrics, + term_output); + + std::auto_ptr log(progress_display.first); // Dump errors here because prepare() might check for pending errors // and think something failed. -- cgit v1.2.3