diff --git a/include/Copy_Blocks.h b/include/Copy_Blocks.h index 1037f337..cfecd7b0 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 4504ea62..9ba78136 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 73cfd4bb..308f5d71 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( 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 33ac7e36..b73a1fdb 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 );