Add new method partition_in_operation_queue_count

This commit is contained in:
Curtis Gedak 2010-08-09 13:33:28 -06:00
parent 3194121496
commit 44698448aa
2 changed files with 15 additions and 1 deletions

View File

@ -168,6 +168,7 @@ private:
void activate_undo();
void remove_operation( int index = -1, bool remove_all = false ) ;
int partition_in_operation_queue_count( const Partition & partition ) ;
void activate_apply();
//private variables

View File

@ -2002,7 +2002,20 @@ void Win_GParted::activate_undo()
if ( ! operations .size() )
close_operationslist() ;
}
int Win_GParted::partition_in_operation_queue_count( const Partition & partition )
{
int operation_count = 0 ;
for ( unsigned int t = 0 ; t < operations .size() ; t++ )
{
if ( partition .get_path() == operations[ t ] ->partition_original .get_path() )
operation_count++ ;
}
return operation_count ;
}
void Win_GParted::remove_operation( int index, bool remove_all )
{
if ( remove_all )