From 18cce3980f34dc33f9c798204a344a8c1e4de6ba Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 14 Feb 2014 18:35:35 +0100 Subject: honor option to disable pulses for the testcases Git-Dch: Ignore --- apt-private/acqprogress.cc | 7 +++++-- apt-private/acqprogress.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'apt-private') diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc index af2d0f461..d25ffef75 100644 --- a/apt-private/acqprogress.cc +++ b/apt-private/acqprogress.cc @@ -30,10 +30,13 @@ using namespace std; // AcqTextStatus::AcqTextStatus - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet) : - ScreenWidth(ScreenWidth), ID(0), Quiet(Quiet) +AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet) : + pkgAcquireStatus(), ScreenWidth(ScreenWidth), ID(0), Quiet(Quiet) { BlankLine[0] = 0; + // testcases use it to disable pulses without disabling other user messages + if (Quiet == 0 && _config->FindB("quiet::NoUpdate", false) == true) + this->Quiet = 1; } /*}}}*/ // AcqTextStatus::Start - Downloading has started /*{{{*/ diff --git a/apt-private/acqprogress.h b/apt-private/acqprogress.h index e47bfb72d..e12dafe50 100644 --- a/apt-private/acqprogress.h +++ b/apt-private/acqprogress.h @@ -32,7 +32,7 @@ class AcqTextStatus : public pkgAcquireStatus bool Pulse(pkgAcquire *Owner); - AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet); + AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet); }; #endif -- cgit v1.2.3-70-g09d2