[gparted] Rename a few GParted_Core apply related methods (#775932)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Rename a few GParted_Core apply related methods (#775932)
- Date: Wed, 14 Dec 2016 21:12:57 +0000 (UTC)
commit 0420159c1df34fa532dc12677276e606dcf999a2
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Nov 19 11:49:44 2016 +0000
Rename a few GParted_Core apply related methods (#775932)
Make the methods called below apply_operation_to_disk() follow a
standard naming convention:
* Contains "_partition"
Uses libparted to query or change the partition in the disk label
(partition table).
E.g.:
calibrate_partition()
create_partition()
delete_partition()
name_partition()
resize_move_partition()
set_partition_type()
* Contains "_filesystem"
Manipulates the file system within the partition, mostly using the
FileSystem and derived class methods.
E.g.:
create_filesystem()
remove_filesystem()
label_filesystem()
copy_filesystem()
erase_filesystem_signatures()
check_repair_filesystem()
resize_filesystem()
maximize_filesystem()
* Other
Compound method calling multiple partition and file system related
apply methods.
E.g.:
create()
format()
copy()
resize_move()
resize()
move()
Rename:
Delete() -> delete_partition()
change_uuid() -> change_filesystem_uuid()
Bug 775932 - Refactor mostly applying of operations
include/GParted_Core.h | 4 ++--
src/GParted_Core.cc | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/include/GParted_Core.h b/include/GParted_Core.h
index e72c86f..4767848 100644
--- a/include/GParted_Core.h
+++ b/include/GParted_Core.h
@@ -106,7 +106,7 @@ private:
bool format( const Partition & partition, OperationDetail & operationdetail ) ;
- bool Delete( const Partition & partition, OperationDetail & operationdetail ) ;
+ bool delete_partition( const Partition & partition, OperationDetail & operationdetail );
bool remove_filesystem( const Partition & partition, OperationDetail & operationdetail ) ;
@@ -114,7 +114,7 @@ private:
bool name_partition( const Partition & partition, OperationDetail & operationdetail );
- bool change_uuid( const Partition & partition, OperationDetail & operation_detail ) ;
+ bool change_filesystem_uuid( const Partition & partition, OperationDetail & operation_detail );
bool resize_move( const Partition & partition_old,
Partition & partition_new,
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 4de028a..34dc027 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -693,7 +693,8 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
operation->operation_detail )
&& remove_filesystem( operation->get_partition_original(),
operation->operation_detail )
- && Delete( operation->get_partition_original(), operation->operation_detail
);
+ && delete_partition( operation->get_partition_original(),
+ operation->operation_detail );
break;
case OPERATION_CHECK:
@@ -777,7 +778,8 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
case OPERATION_CHANGE_UUID:
success = calibrate_partition( operation->get_partition_new(),
operation->operation_detail )
- && change_uuid( operation->get_partition_new(), operation->operation_detail
);
+ && change_filesystem_uuid( operation->get_partition_new(),
+ operation->operation_detail );
break;
}
@@ -2054,7 +2056,7 @@ bool GParted_Core::format( const Partition & partition, OperationDetail & operat
&& create_filesystem( partition, operationdetail ) ;
}
-bool GParted_Core::Delete( const Partition & partition, OperationDetail & operationdetail )
+bool GParted_Core::delete_partition( const Partition & partition, OperationDetail & operationdetail )
{
operationdetail .add_child( OperationDetail( _("delete partition") ) ) ;
@@ -2184,7 +2186,7 @@ bool GParted_Core::name_partition( const Partition & partition, OperationDetail
return success;
}
-bool GParted_Core::change_uuid( const Partition & partition, OperationDetail & operationdetail )
+bool GParted_Core::change_filesystem_uuid( const Partition & partition, OperationDetail & operationdetail )
{
if ( partition .uuid == UUID_RANDOM_NTFS_HALF ) {
operationdetail .add_child( OperationDetail( String::ucompose(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]