renamed resize_partition to resize_move_partition to better reflect its

* include/GParted_Core.h,
  src/GParted_Core.cc: renamed resize_partition to
  resize_move_partition to better reflect its functionality.
This commit is contained in:
Bart Hakvoort 2006-06-18 19:38:29 +00:00
parent 8fecbac1d0
commit b223e829ab
3 changed files with 33 additions and 27 deletions

View File

@ -1,3 +1,9 @@
2006-06-18 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/GParted_Core.h,
src/GParted_Core.cc: renamed resize_partition to
resize_move_partition to better reflect its functionality.
2006-06-18 Bart Hakvoort <hakvoort@cvs.gnome.org> 2006-06-18 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/GParted_Core.h, * include/GParted_Core.h,

View File

@ -98,11 +98,11 @@ private:
const Partition & partition_old, const Partition & partition_old,
Partition & partition_new, Partition & partition_new,
std::vector<OperationDetails> & operation_detail ) ; std::vector<OperationDetails> & operation_detail ) ;
bool resize_partition( const Partition & partition_old, bool resize_move_partition( const Partition & partition_old,
Partition & partition_new, Partition & partition_new,
bool fixed_start, bool fixed_start,
std::vector<OperationDetails> & operation_details, std::vector<OperationDetails> & operation_details,
Sector min_size = 0 ) ; Sector min_size = 0 ) ;
bool resize_filesystem( const Partition & partition_old, bool resize_filesystem( const Partition & partition_old,
const Partition & partition_new, const Partition & partition_new,
std::vector<OperationDetails> & operation_details, std::vector<OperationDetails> & operation_details,

View File

@ -1041,11 +1041,11 @@ bool GParted_Core::move( const Device & device,
if ( move_filesystem( partition_old, temp, operation_details ) ) if ( move_filesystem( partition_old, temp, operation_details ) )
{ {
//now move the partition //now move the partition
if ( resize_partition( partition_old, if ( resize_move_partition( partition_old,
temp, temp,
false, false,
operation_details, operation_details,
temp .get_length() ) ) temp .get_length() ) )
{ {
//now the partition and the filesystem are moved, we can grow it.. //now the partition and the filesystem are moved, we can grow it..
partition_new .sector_start = temp .sector_start ; partition_new .sector_start = temp .sector_start ;
@ -1065,22 +1065,22 @@ bool GParted_Core::move( const Device & device,
//now we can move it //now we can move it
partition_new .sector_end = partition_new .sector_start + temp .get_length() -1 ; partition_new .sector_end = partition_new .sector_start + temp .get_length() -1 ;
return move_filesystem( temp, partition_new, operation_details ) && return move_filesystem( temp, partition_new, operation_details ) &&
resize_partition( temp, resize_move_partition( temp,
partition_new, partition_new,
false, false,
operation_details, operation_details,
partition_new .get_length() ) ; partition_new .get_length() ) ;
} }
return false ; return false ;
} }
else else
return move_filesystem( partition_old, partition_new, operation_details ) && return move_filesystem( partition_old, partition_new, operation_details ) &&
resize_partition( partition_old, resize_move_partition( partition_old,
partition_new, partition_new,
false, false,
operation_details, operation_details,
partition_new .get_length() ) ; partition_new .get_length() ) ;
} }
bool GParted_Core::move_filesystem( const Partition & partition_old, bool GParted_Core::move_filesystem( const Partition & partition_old,
@ -1275,7 +1275,7 @@ bool GParted_Core::resize( const Device & device,
{ {
//extended partition //extended partition
if ( partition_old .type == GParted::TYPE_EXTENDED ) if ( partition_old .type == GParted::TYPE_EXTENDED )
return resize_partition( partition_old, partition_new, false, operation_details ) ; return resize_move_partition( partition_old, partition_new, false, operation_details ) ;
bool succes = false ; bool succes = false ;
@ -1305,7 +1305,7 @@ bool GParted_Core::resize( const Device & device,
succes = resize_filesystem( partition_old, partition_new, operation_details, device .cylsize ) ; succes = resize_filesystem( partition_old, partition_new, operation_details, device .cylsize ) ;
if ( succes ) if ( succes )
succes = resize_partition( succes = resize_move_partition(
partition_old, partition_old,
partition_new, partition_new,
! get_fs( partition_new .filesystem ) .move, ! get_fs( partition_new .filesystem ) .move,
@ -1328,11 +1328,11 @@ bool GParted_Core::resize( const Device & device,
return false ; return false ;
} }
bool GParted_Core::resize_partition( const Partition & partition_old, bool GParted_Core::resize_move_partition( const Partition & partition_old,
Partition & partition_new, Partition & partition_new,
bool fixed_start, bool fixed_start,
std::vector<OperationDetails> & operation_details, std::vector<OperationDetails> & operation_details,
Sector min_size ) Sector min_size )
{ {
operation_details .push_back( OperationDetails( _("resize/move partition") ) ) ; operation_details .push_back( OperationDetails( _("resize/move partition") ) ) ;
/*FIXME: try to find fitting descriptions for all situations /*FIXME: try to find fitting descriptions for all situations