added FIXME fixed Update_Number()

* include/Partition.h: added FIXME
* src/Partition.cc: fixed Update_Number()
This commit is contained in:
Bart Hakvoort 2006-01-26 20:26:25 +00:00
parent 1f854ffef3
commit a56902a6d3
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-01-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Partition.h: added FIXME
* src/Partition.cc: fixed Update_Number()
2006-01-26 Bart Hakvoort <hakvoort@cvs.gnome.org> 2006-01-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Dialog_Progress.h, * include/Dialog_Progress.h,

View File

@ -69,6 +69,7 @@ public:
//update partition number (used when a logical partition is deleted) //update partition number (used when a logical partition is deleted)
void Update_Number( int new_number ); 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_Length_MB() const ;
long Get_Used_MB() const ; long Get_Used_MB() const ;
long Get_Unused_MB() const ; long Get_Unused_MB() const ;

View File

@ -87,8 +87,11 @@ void Partition::Set_Unallocated( const Glib::ustring & device_path, Sector secto
void Partition::Update_Number( int new_number ) 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_number = new_number;
this ->partition = device_path + Utils::num_to_str( partition_number ) ;
} }
long Partition::Get_Length_MB() const long Partition::Get_Length_MB() const