diff --git a/ChangeLog b/ChangeLog index 22ff7a07..3052f027 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-26 Bart Hakvoort + + * include/Partition.h: added FIXME + * src/Partition.cc: fixed Update_Number() + 2006-01-26 Bart Hakvoort * include/Dialog_Progress.h, diff --git a/include/Partition.h b/include/Partition.h index 1ae90063..93d319a1 100644 --- a/include/Partition.h +++ b/include/Partition.h @@ -69,6 +69,7 @@ public: //update partition number (used when a logical partition is deleted) void Update_Number( int new_number ); + //FIXME the 3 *MB function are obsolete and should be replaced by Utils::sector_to_unit() long Get_Length_MB() const ; long Get_Used_MB() const ; long Get_Unused_MB() const ; diff --git a/src/Partition.cc b/src/Partition.cc index e8834759..4b965acb 100644 --- a/src/Partition.cc +++ b/src/Partition.cc @@ -87,8 +87,11 @@ void Partition::Set_Unallocated( const Glib::ustring & device_path, Sector secto void Partition::Update_Number( int new_number ) { + this ->partition = + partition .substr( 0, partition .find( Utils::num_to_str( partition_number ) ) ) + + Utils::num_to_str( new_number ) ; + this ->partition_number = new_number; - this ->partition = device_path + Utils::num_to_str( partition_number ) ; } long Partition::Get_Length_MB() const