diff options
author | Daniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu> | 2010-05-25 16:39:48 -0700 |
---|---|---|
committer | Daniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu> | 2010-05-25 16:39:48 -0700 |
commit | 9762474eef4d5eebb7ad81c8bf1ecb4a9528b0c9 (patch) | |
tree | daab985f867d862cbeceb595ebe678c4b8f7094a | |
parent | c390627ceec5e83b7548ecd17bcbaef2951ed224 (diff) | |
download | aptitude-9762474eef4d5eebb7ad81c8bf1ecb4a9528b0c9.tar.gz |
Change the progress_info object so that pulsing progress bars can carry a status message.
-rw-r--r-- | src/generic/util/progress_info.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/generic/util/progress_info.h b/src/generic/util/progress_info.h index 40852045..da340458 100644 --- a/src/generic/util/progress_info.h +++ b/src/generic/util/progress_info.h @@ -35,7 +35,7 @@ namespace aptitude { /** \brief There is no progress information. */ progress_type_none, - /** \brief There is only a progress pulse. */ + /** \brief There is only a progress pulse and an optional status string. */ progress_type_pulse, /** \brief Full progress information is available. */ progress_type_bar @@ -66,9 +66,9 @@ namespace aptitude return progress_info(progress_type_none); } - static progress_info pulse() + static progress_info pulse(const std::string &status) { - return progress_info(progress_type_pulse); + return progress_info(progress_type_pulse, status); } static progress_info bar(double fraction, @@ -76,6 +76,11 @@ namespace aptitude { return progress_info(fraction, status); } + + + progress_type get_type() const { return type; } + double get_progress_fraction() const { return progress_fraction; } + const std::string &get_progress_status() const { return progress_status; } }; // @} |