summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel_Burrows@alumni.brown.edu <Daniel_Burrows@alumni.brown.edu>2010-05-31 14:47:29 -0700
committerDaniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu>2010-06-08 20:27:59 -0700
commit9c898d15971fee239a1eaef1af6162c5dba56294 (patch)
tree60e8f1c72a97f924f28bc419a643d7667cfa9ed5 /src
parentf5be3e5d04d429b664973afe77c93bc79e3f8787 (diff)
downloadaptitude-9c898d15971fee239a1eaef1af6162c5dba56294.tar.gz
Drop the "force" parameter to progress_display::set_progress; it doesn't seem to be necessary and it clutters things up.
Diffstat (limited to 'src')
-rw-r--r--src/cmdline/cmdline_progress_display.cc8
-rw-r--r--src/cmdline/cmdline_progress_display.h5
-rw-r--r--src/cmdline/cmdline_search.cc7
-rw-r--r--src/cmdline/cmdline_search_progress.cc19
-rw-r--r--src/cmdline/cmdline_versions.cc7
5 files changed, 15 insertions, 31 deletions
diff --git a/src/cmdline/cmdline_progress_display.cc b/src/cmdline/cmdline_progress_display.cc
index 7bd5e463..52fad0f3 100644
--- a/src/cmdline/cmdline_progress_display.cc
+++ b/src/cmdline/cmdline_progress_display.cc
@@ -66,8 +66,7 @@ namespace aptitude
public:
progress_display_impl(const shared_ptr<transient_message> &_message);
- void set_progress(const progress_info &progress,
- bool force_update);
+ void set_progress(const progress_info &progress);
};
progress_display_impl::progress_display_impl(const shared_ptr<transient_message> &_message)
@@ -87,10 +86,9 @@ namespace aptitude
return false;
}
- void progress_display_impl::set_progress(const progress_info &progress,
- bool force_update)
+ void progress_display_impl::set_progress(const progress_info &progress)
{
- if(force_update || should_update(progress))
+ if(should_update(progress))
{
switch(progress.get_type())
{
diff --git a/src/cmdline/cmdline_progress_display.h b/src/cmdline/cmdline_progress_display.h
index 36cd7e35..370b08b2 100644
--- a/src/cmdline/cmdline_progress_display.h
+++ b/src/cmdline/cmdline_progress_display.h
@@ -53,11 +53,8 @@ namespace aptitude
/** \brief Set the currently displayed progress.
*
* \param progress The new progress information to display.
- * \param force_update If \b true, the output will be updated even if
- * it doesn't appear to be necessary.
*/
- virtual void set_progress(const aptitude::util::progress_info &progress,
- bool force_update) = 0;
+ virtual void set_progress(const aptitude::util::progress_info &progress) = 0;
};
/** \brief Create a blank progress display. */
diff --git a/src/cmdline/cmdline_search.cc b/src/cmdline/cmdline_search.cc
index 6cc922dc..f1aa653a 100644
--- a/src/cmdline/cmdline_search.cc
+++ b/src/cmdline/cmdline_search.cc
@@ -120,12 +120,11 @@ namespace
*apt_cache_file,
*apt_package_records,
debug,
- sigc::bind(sigc::mem_fun(*search_progress,
- &progress_display::set_progress),
- false));
+ sigc::mem_fun(*search_progress,
+ &progress_display::set_progress));
}
- search_progress_display->set_progress(progress_info::none(), true);
+ search_progress_display->set_progress(progress_info::none());
_error->DumpErrors();
diff --git a/src/cmdline/cmdline_search_progress.cc b/src/cmdline/cmdline_search_progress.cc
index c7622c2a..6765262f 100644
--- a/src/cmdline/cmdline_search_progress.cc
+++ b/src/cmdline/cmdline_search_progress.cc
@@ -63,18 +63,11 @@ namespace aptitude
{
}
- void set_progress(const progress_info &info, bool force);
+ void set_progress(const progress_info &info);
};
- void search_progress::set_progress(const progress_info &info,
- bool force)
+ void search_progress::set_progress(const progress_info &info)
{
- if(force)
- {
- display->set_progress(info, force);
- return;
- }
-
// This is why the throttling happens at this layer rather than
// below: we can avoid some expensive string formatting with an
// up-front check.
@@ -86,15 +79,14 @@ namespace aptitude
switch(info.get_type())
{
case progress_type_none:
- display->set_progress(info, false);
+ display->set_progress(info);
break;
case progress_type_pulse:
display->set_progress(progress_info::pulse( (format("%s: %s")
% pattern
% info.get_progress_status())
- .str()),
- false);
+ .str()));
break;
case progress_type_bar:
@@ -102,8 +94,7 @@ namespace aptitude
(format("%s: %s")
% pattern
% info.get_progress_status())
- .str()),
- false);
+ .str()));
break;
}
diff --git a/src/cmdline/cmdline_versions.cc b/src/cmdline/cmdline_versions.cc
index b839909e..b047210a 100644
--- a/src/cmdline/cmdline_versions.cc
+++ b/src/cmdline/cmdline_versions.cc
@@ -278,9 +278,8 @@ namespace
*apt_cache_file,
*apt_package_records,
debug,
- sigc::bind(sigc::mem_fun(search_progress.get(),
- &progress_display::set_progress),
- false));
+ sigc::mem_fun(search_progress.get(),
+ &progress_display::set_progress));
// Warn the user if an exact name pattern didn't produce a
// result.
@@ -293,7 +292,7 @@ namespace
}
}
- search_progress_display->set_progress(progress_info::none(), true);
+ search_progress_display->set_progress(progress_info::none());
if(output.empty())
return_value = 2;