diff options
author | Daniel Burrows <dburrows@debian.org> | 2010-07-10 16:42:04 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2010-07-10 17:01:03 -0700 |
commit | f76856df0153de378c3a3d89fdd48775db914f38 (patch) | |
tree | 14a4d61ea1e76134675365d25fa3eb3a139b58a4 /src/cmdline/cmdline_util.cc | |
parent | cd40eed2c3ea6f37b08da57890f53b719f56799d (diff) | |
download | aptitude-f76856df0153de378c3a3d89fdd48775db914f38.tar.gz |
Use the new acquire_download_progress object to display command-line downloads and delete acqprogress.
Diffstat (limited to 'src/cmdline/cmdline_util.cc')
-rw-r--r-- | src/cmdline/cmdline_util.cc | 12 |
1 files changed, 11 insertions, 1 deletions
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<terminal_input> &term_input, const shared_ptr<terminal_locale> &term_locale, const shared_ptr<terminal_metrics> &term_metrics, const shared_ptr<terminal_output> &term_output) @@ -442,7 +446,13 @@ download_manager::result cmdline_do_download(download_manager *m, initial_stats = compute_apt_stats(); } - std::auto_ptr<download_signal_log> log(gen_cmdline_download_progress(term_metrics)); + std::pair<download_signal_log *, boost::shared_ptr<acquire_download_progress> > + progress_display = create_cmdline_download_progress(term_input, + term_locale, + term_metrics, + term_output); + + std::auto_ptr<download_signal_log> log(progress_display.first); // Dump errors here because prepare() might check for pending errors // and think something failed. |