[gparted] Simplify XFS copy specific code progress bar usage (#760709)



commit 075154b4e896576d0098256e481619efac9e95a9
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Feb 7 13:27:03 2016 +0000

    Simplify XFS copy specific code progress bar usage (#760709)
    
    Remove starting and stopping the progress bar in xfs::copy().  The
    progress bar will be automatically started in xfs::copy_progress()
    callback when run_progressbar() is called; and automatically stopped in
    FileSystem::execute_command() when it calls stop_progress() at the end.
    
    Note that this will now not initialise the progress bar from zero
    immediately that the XFS copy is started, but instead 0.5 seconds into
    the copy when xfs::copy_progress() timed callback is called for the
    first time.
    
    Bug 760709 - Add progress bars to XFS and EXT2/3/4 file system specific
                 copy methods

 src/xfs.cc |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/src/xfs.cc b/src/xfs.cc
index d9fa020..1cc36a6 100644
--- a/src/xfs.cc
+++ b/src/xfs.cc
@@ -254,14 +254,11 @@ bool xfs::copy( const Partition & src_part,
 
                if ( success )
                {
-                       if ( src_used > 0LL )
-                               operationdetail.run_progressbar( 0.0, (double)src_used, 
PROGRESSBAR_TEXT_COPY_BYTES );
                        success &= ! execute_command( "sh -c 'xfsdump -J - " + src_mount_point +
                                                      " | xfsrestore -J - " + dest_mount_point + "'",
                                                      operationdetail,
                                                      EXEC_CHECK_STATUS|EXEC_CANCEL_SAFE|EXEC_PROGRESS_TIMED,
                                                      static_cast<TimedSlot>( sigc::mem_fun( *this, 
&xfs::copy_progress ) ) );
-                       operationdetail.stop_progressbar();
 
                        success &= ! execute_command( "umount -v " + dest_part.get_path(), operationdetail,
                                                      EXEC_CHECK_STATUS );


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]