[gparted] Remove unused OperationDetail members (#760709)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Remove unused OperationDetail members (#760709)
- Date: Sat, 13 Feb 2016 17:12:31 +0000 (UTC)
commit 27e30a570ff50509d710ee8dccdad848f01c0e4d
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Jan 17 13:37:46 2016 +0000
Remove unused OperationDetail members (#760709)
Remove unused members: fraction and progress_text from the
OperationDetail class now that the ProgressBar class has superseded
their use. This also allows removal of timer_global member from the
copy_blocks class. Timer_global was only used to track the elapsed time
copying blocks and allow the remaining time to be estimated and written
into progress_text. The ProgressBar class also does this itself
internally.
Bug 760709 - Add progress bars to XFS and EXT2/3/4 file system specific
copy methods
include/Copy_Blocks.h | 1 -
include/OperationDetail.h | 3 ---
src/Copy_Blocks.cc | 14 --------------
src/OperationDetail.cc | 5 ++---
4 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/include/Copy_Blocks.h b/include/Copy_Blocks.h
index 1037f33..cfecd7b 100644
--- a/include/Copy_Blocks.h
+++ b/include/Copy_Blocks.h
@@ -38,7 +38,6 @@ class copy_blocks {
PedDevice *lp_device_dst;
Sector offset_src;
Sector offset_dst;
- Glib::Timer timer_total;
bool success;
Glib::ustring error_message;
void copy_thread();
diff --git a/include/OperationDetail.h b/include/OperationDetail.h
index 4504ea6..9ba7813 100644
--- a/include/OperationDetail.h
+++ b/include/OperationDetail.h
@@ -72,9 +72,6 @@ public:
void run_progressbar( double progress, double target, ProgressBar_Text text_mode =
PROGRESSBAR_TEXT_NONE );
void stop_progressbar();
- double fraction ;
- Glib::ustring progress_text ;
-
sigc::signal< void, const OperationDetail & > signal_update ;
sigc::signal< void, bool > signal_cancel;
char cancelflag;
diff --git a/src/Copy_Blocks.cc b/src/Copy_Blocks.cc
index 73cfd4b..308f5d7 100644
--- a/src/Copy_Blocks.cc
+++ b/src/Copy_Blocks.cc
@@ -64,17 +64,6 @@ bool copy_blocks::set_progress_info()
Byte_Value done = llabs(this->done);
operationdetail.run_progressbar( (double)done, (double)length, PROGRESSBAR_TEXT_COPY_BYTES );
OperationDetail &operationdetail = this->operationdetail.get_last_child().get_last_child();
- operationdetail.fraction = done / static_cast<double>( length );
-
- std::time_t time_remaining = Utils::round( (length - done) / ( done / timer_total.elapsed() ) );
-
- operationdetail.progress_text =
- String::ucompose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB copied (00:01:59
remaining) */
- _("%1 of %2 copied (%3 remaining)"),
- Utils::format_size( done, 1 ),
- Utils::format_size( length,1 ),
- Utils::format_time( time_remaining ) );
-
operationdetail.set_description(
String::ucompose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB copied */
_("%1 of %2 copied"),
@@ -182,9 +171,6 @@ bool copy_blocks::copy()
Gtk::Main::run();
if (done == length || !success)
{
- //reset fraction to -1 to make room for a new one (or a pulsebar)
- operationdetail.get_last_child().get_last_child().fraction = -1;
-
//final description
operationdetail.get_last_child().get_last_child().set_description(
String::ucompose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB copied
*/
diff --git a/src/OperationDetail.cc b/src/OperationDetail.cc
index 33ac7e3..b73a1fd 100644
--- a/src/OperationDetail.cc
+++ b/src/OperationDetail.cc
@@ -25,13 +25,12 @@ namespace GParted
// The single progress bar for the current operation
static ProgressBar single_progressbar;
-OperationDetail::OperationDetail() : fraction( -1 ), cancelflag( 0 ), status( STATUS_NONE ), time_start( -1
),
- time_elapsed( -1 )
+OperationDetail::OperationDetail() : cancelflag( 0 ), status( STATUS_NONE ), time_start( -1 ), time_elapsed(
-1 )
{
}
OperationDetail::OperationDetail( const Glib::ustring & description, OperationDetailStatus status, Font font
) :
- fraction( -1 ), cancelflag( 0 ), status( STATUS_NONE ), time_start( -1 ), time_elapsed( -1 )
+ cancelflag( 0 ), status( STATUS_NONE ), time_start( -1 ), time_elapsed( -1 )
{
set_description( description, font );
set_status( status );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]