[gparted] Rename enum to OPERATION_LABEL_FILESYSTEM (#741424)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Rename enum to OPERATION_LABEL_FILESYSTEM (#741424)
- Date: Sun, 1 Feb 2015 18:19:51 +0000 (UTC)
commit d480800600be714a0e706b51a147d329d8280e52
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Tue Dec 16 21:06:20 2014 +0000
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
include/Operation.h | 16 ++++++++--------
src/GParted_Core.cc | 2 +-
src/OperationLabelPartition.cc | 2 +-
src/Win_GParted.cc | 8 ++++----
4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/include/Operation.h b/include/Operation.h
index 7aeeef9..247a0a4 100644
--- a/include/Operation.h
+++ b/include/Operation.h
@@ -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
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 413a887..173777f 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -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:
diff --git a/src/OperationLabelPartition.cc b/src/OperationLabelPartition.cc
index 4403ea8..2a8aea4 100644
--- a/src/OperationLabelPartition.cc
+++ b/src/OperationLabelPartition.cc
@@ -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 ;
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 4534f13..c4b55c5 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]