~ubuntu-branches/ubuntu/vivid/aptitude/vivid

« back to all changes in this revision

Viewing changes to src/cmdline/cmdline_search_progress.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-06-22 12:32:56 UTC
  • mfrom: (1.8.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110622123256-8aox9w9ch3x72dci
Tags: 0.6.4-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/05aptitude: never autoremove kernels
  - drop aptitude-doc to Suggests
  - 03_branding.dpatch: ubuntu branding
  - 04_changelog.dpatch: take changelogs from changelogs.ubuntu.com
  - 09_ubuntu_fortify_source.dpatch: Suppress a number of warnings (turned
    into errors by -Werror) triggered by Ubuntu's default of
    -D_FORTIFY_SOURCE=2.
  - 11_ubuntu_uses_sudo.dpatch: fix status line of 'Become root' menu entry
    to not refer to su.
  - 12_point_manpage_to_doc_package.dpatch: point Finnish manpage to the
    correct place for further info
  - 14_html2text_preferred.dpatch: switch back to html2text in favor of
    elinks, since html2text is in main and elinks isn't.
* dropped 01_intltool_update.dpatch
* updated 15_ftbfs_new_apt

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "cmdline_search_progress.h"
23
23
 
24
24
#include "cmdline_progress_display.h"
25
 
#include "cmdline_progress_throttle.h"
26
25
 
27
26
#include <generic/util/progress_info.h>
 
27
#include <generic/util/throttle.h>
 
28
#include <generic/views/progress.h>
28
29
 
29
30
 
30
31
#include <boost/format.hpp>
41
42
using boost::shared_ptr;
42
43
using cwidget::util::ref_ptr;
43
44
 
 
45
namespace util = aptitude::util;
 
46
 
44
47
namespace aptitude
45
48
{
46
49
  namespace cmdline
47
50
  {
48
51
    namespace
49
52
    {
50
 
      class search_progress : public progress_display
 
53
      class search_progress : public views::progress
51
54
      {
52
 
        shared_ptr<progress_display> display;
53
 
        shared_ptr<progress_throttle> throttle;
 
55
        shared_ptr<views::progress> display;
 
56
        shared_ptr<util::throttle> throttle;
54
57
        std::string pattern;
55
58
 
56
59
      public:
57
 
        search_progress(const shared_ptr<progress_display> &_display,
58
 
                        const shared_ptr<progress_throttle> &_throttle,
 
60
        search_progress(const shared_ptr<views::progress> &_display,
 
61
                        const shared_ptr<util::throttle> &_throttle,
59
62
                        const std::string &_pattern)
60
63
          : display(_display),
61
64
            throttle(_throttle),
108
111
      }
109
112
    }
110
113
 
111
 
    shared_ptr<progress_display>
 
114
    shared_ptr<views::progress>
112
115
    create_search_progress(const std::string &pattern,
113
 
                           const shared_ptr<progress_display> &display,
114
 
                           const shared_ptr<progress_throttle> &throttle)
 
116
                           const shared_ptr<views::progress> &display,
 
117
                           const shared_ptr<util::throttle> &throttle)
115
118
    {
116
119
      return make_shared<search_progress>(display,
117
120
                                          throttle,