Add new method partition_in_operation_queue_count
This commit is contained in:
parent
3194121496
commit
44698448aa
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue