[gparted/psusi/refactor: 19/19] Remove execute_command and execute_command_timed



commit d9a6c0e75b2b1b2fa5b01d1429531e0213640428
Author: Phillip Susi <psusi ubuntu com>
Date:   Tue Feb 21 21:53:53 2012 -0500

    Remove execute_command and execute_command_timed
    
    Drop the old sync execute variants now that they are no longer used.

 include/FileSystem.h |    4 ----
 src/FileSystem.cc    |   32 --------------------------------
 2 files changed, 0 insertions(+), 36 deletions(-)
---
diff --git a/include/FileSystem.h b/include/FileSystem.h
index 400a2ee..f960d26 100644
--- a/include/FileSystem.h
+++ b/include/FileSystem.h
@@ -92,13 +92,9 @@ public:
 	Glib::Mutex mutex;
 	bool success;
 protected:
-	int execute_command( const Glib::ustring & command, OperationDetail & operationdetail ) ;
 	void execute_command( const Glib::ustring & command, OperationDetail & operationdetail, sigc::slot<bool, double> progresscb );
 	void execute_command( const Glib::ustring & command, sigc::slot<bool, double> progresscb );
 	bool execute_command_progress( double progress );
-	int execute_command_timed( const Glib::ustring & command
-	                         , OperationDetail & operationdetail
-	                         , bool check_status = true ) ;
 	Glib::ustring mk_temp_dir( const Glib::ustring & infix, OperationDetail & operationdetail ) ;
 	void rm_temp_dir( const Glib::ustring dir_name, OperationDetail & operationdetail ) ;
 
diff --git a/src/FileSystem.cc b/src/FileSystem.cc
index 8f455e7..0e16c69 100644
--- a/src/FileSystem.cc
+++ b/src/FileSystem.cc
@@ -108,13 +108,6 @@ const Glib::ustring FileSystem::get_generic_text( CUSTOM_TEXT ttype, int index )
 	}
 }
 
-int FileSystem::execute_command( const Glib::ustring & command, OperationDetail & operationdetail ) 
-{
-	execute_command( command, operationdetail, unlock_mutex );
-	mutex.lock();  // wait for completion
-	return exit_status ;
-}
-
 void FileSystem::store_exit_status( GPid pid, int status )
 {
 	exit_status = status;
@@ -179,31 +172,6 @@ bool FileSystem::execute_command_progress( double progress )
 	return false;
 }
 
-//Time command, add results to operation detail and by default set success or failure
-int FileSystem::execute_command_timed( const Glib::ustring & command
-                                     , OperationDetail & operationdetail
-                                     , bool check_status )
-{
-	operationdetail .add_child( OperationDetail( command, STATUS_EXECUTE, FONT_BOLD_ITALIC ) ) ;
-
-	int exit_status = Utils::execute_command( "nice -n 19 " + command, output, error ) ;
-	if ( check_status )
-	{
-		if ( ! exit_status )
-			operationdetail .get_last_child() .set_status( STATUS_SUCCES ) ;
-		else
-			operationdetail .get_last_child() .set_status( STATUS_ERROR ) ;
-	}
-
-	if ( ! output .empty() )
-		operationdetail .get_last_child() .add_child( OperationDetail( output, STATUS_NONE, FONT_ITALIC ) ) ;
-
-	if ( ! error .empty() )
-		operationdetail .get_last_child() .add_child( OperationDetail( error, STATUS_NONE, FONT_ITALIC ) ) ;
-
-	return exit_status ;
-}
-
 //Create uniquely named temporary directory and add results to operation detail
 Glib::ustring FileSystem::mk_temp_dir( const Glib::ustring & infix, OperationDetail & operationdetail )
 {



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