Rename Partition::add_path() to set_path() (#767842)
To reflect that there is now only a single path in the Partition object now. Also get rid of the now unneeded optional clear_paths parameter which was only relevant when there was a vector of paths. Bug 767842 - File system usage missing when tools report alternate block device names
This commit is contained in:
parent
54652b0d4e
commit
40f39bdbe2
|
@ -101,7 +101,7 @@ public:
|
|||
//update partition number (used when a logical partition is deleted)
|
||||
void Update_Number( int new_number );
|
||||
|
||||
void add_path( const Glib::ustring & path, bool clear_paths = false ) ;
|
||||
void set_path( const Glib::ustring & path );
|
||||
Byte_Value get_byte_length() const ;
|
||||
Sector get_sector_length() const ;
|
||||
Glib::ustring get_path() const ;
|
||||
|
|
|
@ -761,8 +761,7 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
|
|||
// case the path is "Copy of ..." from the partition having been
|
||||
// newly created by a paste into unallocated space earlier in the
|
||||
// sequence of operations now being applied.
|
||||
operation->get_partition_new().add_path( operation->get_partition_original().get_path(),
|
||||
true );
|
||||
operation->get_partition_new().set_path( operation->get_partition_original().get_path() );
|
||||
|
||||
success = resize_move( operation->get_partition_original(),
|
||||
operation->get_partition_new(),
|
||||
|
@ -778,8 +777,7 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
|
|||
// calibration in case the path is "Copy of ..." from the
|
||||
// partition having been newly created by a paste into unallocated
|
||||
// space earlier in the sequence of operations now being applied.
|
||||
operation->get_partition_original().add_path( operation->get_partition_new().get_path(),
|
||||
true );
|
||||
operation->get_partition_original().set_path( operation->get_partition_new().get_path() );
|
||||
|
||||
success = remove_filesystem( operation->get_partition_original(),
|
||||
operation->operation_detail )
|
||||
|
@ -2191,8 +2189,7 @@ bool GParted_Core::create_partition( Partition & new_partition, OperationDetail
|
|||
|
||||
if ( ped_disk_add_partition( lp_disk, lp_partition, constraint ) && commit( lp_disk ) )
|
||||
{
|
||||
Glib::ustring partition_path = get_partition_path( lp_partition ) ;
|
||||
new_partition .add_path( partition_path, true ) ;
|
||||
new_partition.set_path( get_partition_path( lp_partition ) );
|
||||
|
||||
new_partition .partition_number = lp_partition ->num ;
|
||||
new_partition .sector_start = lp_partition ->geom .start ;
|
||||
|
@ -3484,7 +3481,7 @@ bool GParted_Core::calibrate_partition( Partition & partition, OperationDetail &
|
|||
// additional operations such mkfs for the format
|
||||
// operation or fsck and others for the
|
||||
// resize/move operation.
|
||||
partition.add_path( get_partition_path( lp_partition ) );
|
||||
partition.set_path( get_partition_path( lp_partition ) );
|
||||
}
|
||||
|
||||
// Reload the partition boundaries from libparted
|
||||
|
|
|
@ -198,7 +198,7 @@ void Partition::Update_Number( int new_number )
|
|||
partition_number = new_number;
|
||||
}
|
||||
|
||||
void Partition::add_path( const Glib::ustring & path, bool clear_paths )
|
||||
void Partition::set_path( const Glib::ustring & path )
|
||||
{
|
||||
this->path = path;
|
||||
}
|
||||
|
|
|
@ -1861,10 +1861,9 @@ void Win_GParted::activate_paste()
|
|||
// path of "Copy of /dev/SRC" for display purposes until
|
||||
// the partition is created and the real path queried.
|
||||
OperationCopy * copy_op = static_cast<OperationCopy*>( operation );
|
||||
copy_op->get_partition_new().add_path(
|
||||
copy_op->get_partition_new().set_path(
|
||||
String::ucompose( _("Copy of %1"),
|
||||
copy_op->get_partition_copied().get_path() ),
|
||||
true );
|
||||
copy_op->get_partition_copied().get_path() ) );
|
||||
|
||||
Add_Operation( operation ) ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue