Rename enum to OPERATION_LABEL_FILESYSTEM (#741424)

This and the following few commits rename variables, methods, classes,
etc from *label_partition* to *label_filesystem* so that the code also
reflects that it is the label of the file system that is being modified
and to separate it from the name partition operation about to be added.

enum OPERATION_LABEL_PARTITION -> OPERATION_LABEL_FILESYSTEM

Bug 741424 - Add support for GPT partition names
This commit is contained in:
Mike Fleetwood 2014-12-16 21:06:20 +00:00 committed by Curtis Gedak
parent 332a2e7a79
commit d480800600
4 changed files with 14 additions and 14 deletions

View File

@ -25,14 +25,14 @@ namespace GParted
{
//FIXME: stop using GParted:: in front of our own enums.. it's not necessary and clutters the code
enum OperationType {
OPERATION_DELETE = 0,
OPERATION_CHECK = 1,
OPERATION_CREATE = 2,
OPERATION_RESIZE_MOVE = 3,
OPERATION_FORMAT = 4,
OPERATION_COPY = 5,
OPERATION_LABEL_PARTITION = 6,
OPERATION_CHANGE_UUID = 7
OPERATION_DELETE = 0,
OPERATION_CHECK = 1,
OPERATION_CREATE = 2,
OPERATION_RESIZE_MOVE = 3,
OPERATION_FORMAT = 4,
OPERATION_COPY = 5,
OPERATION_LABEL_FILESYSTEM = 6,
OPERATION_CHANGE_UUID = 7
};
class Operation

View File

@ -727,7 +727,7 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
static_cast<OperationCopy*>( operation ) ->partition_copied .get_byte_length(),
operation ->operation_detail ) ;
break ;
case OPERATION_LABEL_PARTITION:
case OPERATION_LABEL_FILESYSTEM:
succes = label_partition( operation ->partition_new, operation ->operation_detail ) ;
break ;
case OPERATION_CHANGE_UUID:

View File

@ -23,7 +23,7 @@ OperationLabelPartition::OperationLabelPartition( const Device & device,
const Partition & partition_orig,
const Partition & partition_new )
{
type = OPERATION_LABEL_PARTITION ;
type = OPERATION_LABEL_FILESYSTEM;
this ->device = device ;
this ->partition_original = partition_orig ;

View File

@ -698,7 +698,7 @@ void Win_GParted::Add_Operation( Operation * operation, int index )
operation ->type == OPERATION_FORMAT ||
operation ->type == OPERATION_CHECK ||
operation ->type == OPERATION_CHANGE_UUID ||
operation ->type == OPERATION_LABEL_PARTITION ||
operation ->type == OPERATION_LABEL_FILESYSTEM ||
gparted_core .snap_to_alignment( operation ->device, operation ->partition_new, error )
)
{
@ -742,8 +742,8 @@ bool Win_GParted::Merge_Operations( unsigned int first, unsigned int second )
return true;
}
// Two label change operations on the same partition
else if ( operations[ first ]->type == OPERATION_LABEL_PARTITION &&
operations[ second ]->type == OPERATION_LABEL_PARTITION &&
else if ( operations[ first ]->type == OPERATION_LABEL_FILESYSTEM &&
operations[ second ]->type == OPERATION_LABEL_FILESYSTEM &&
operations[ first ]->partition_new == operations[ second ]->partition_original
)
{
@ -2493,7 +2493,7 @@ void Win_GParted::activate_label_partition()
// Verify if the two operations can be merged
for ( unsigned int t = 0 ; t < operations .size() - 1 ; t++ )
{
if ( operations[ t ] ->type == OPERATION_LABEL_PARTITION )
if ( operations[t]->type == OPERATION_LABEL_FILESYSTEM )
{
if( Merge_Operations( t, operations .size() -1 ) )
break;