diff --git a/include/FileSystem.h b/include/FileSystem.h index bce53d3b..71510553 100644 --- a/include/FileSystem.h +++ b/include/FileSystem.h @@ -103,10 +103,8 @@ protected: Sector T, N, S ; //File system [T]otal num of blocks, [N]um of free (or used) blocks, block [S]ize int exit_status ; unsigned int index ; - sigc::signal signal_progress; private: - void update_command_progress( OperationDetail *operationdetail ); void store_exit_status( GPid pid, int status ); bool running; int pipecount; diff --git a/src/FileSystem.cc b/src/FileSystem.cc index 10870b5b..e83bbd74 100644 --- a/src/FileSystem.cc +++ b/src/FileSystem.cc @@ -126,21 +126,12 @@ int FileSystem::execute_command( const Glib::ustring & command, OperationDetail errorcapture.signal_update.connect( sigc::bind( sigc::ptr_fun( update_command_output ), children[children.size() - 1], &error ) ); - sigc::connection c; if ( flags & EXEC_PROGRESS_STDOUT && ! stream_progress_slot.empty() ) - { // Call progress tracking callback when stdout updates - outputcapture.signal_update.connect( sigc::bind( sigc::mem_fun( *this, &FileSystem::update_command_progress ), - &operationdetail ) ); - c = signal_progress.connect( stream_progress_slot ); - } + outputcapture.signal_update.connect( sigc::bind( stream_progress_slot, &operationdetail ) ); else if ( flags & EXEC_PROGRESS_STDERR && ! stream_progress_slot.empty() ) - { // Call progress tracking callback when stderr updates - errorcapture.signal_update.connect( sigc::bind( sigc::mem_fun( *this, &FileSystem::update_command_progress ), - &operationdetail ) ); - c = signal_progress.connect( stream_progress_slot ); - } + errorcapture.signal_update.connect( sigc::bind( stream_progress_slot, &operationdetail ) ); outputcapture.connect_signal(); errorcapture.connect_signal(); @@ -160,17 +151,10 @@ int FileSystem::execute_command( const Glib::ustring & command, OperationDetail } close( out ); close( err ); - if ( c.connected() ) - c.disconnect(); operationdetail.stop_progressbar(); return exit_status; } -void FileSystem::update_command_progress( OperationDetail *operationdetail ) -{ - signal_progress.emit( operationdetail ); -} - void FileSystem::set_status( OperationDetail & operationdetail, bool success ) { operationdetail.get_last_child().set_status( success ? STATUS_SUCCES : STATUS_ERROR );