let create_empty_partition() return a boolean instead of an integer.

* include/GParted_Core.h,
  src/GParted_Core.cc: let create_empty_partition() return a boolean
  instead of an integer.
This commit is contained in:
Bart Hakvoort 2006-03-31 13:10:32 +00:00
parent f5ea37e310
commit a044f0f88b
3 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2006-03-31 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/GParted_Core.h,
src/GParted_Core.cc: let create_empty_partition() return a boolean
instead of an integer.
2006-03-31 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/DialogManageFlags.h,

View File

@ -90,9 +90,9 @@ private:
std::vector<Glib::ustring> get_alternate_paths( const Glib::ustring & path ) ;
void LP_Set_Used_Sectors( Partition & partition );
void set_flags( Partition & partition ) ;
int create_empty_partition( Partition & new_partition,
std::vector<OperationDetails> & operation_details,
Sector min_size = 0 ) ;
bool create_empty_partition( Partition & new_partition,
std::vector<OperationDetails> & operation_details,
Sector min_size = 0 ) ;
bool resize_container_partition( const Partition & partition_old,
const Partition & partition_new,
bool fixed_start,

View File

@ -888,10 +888,10 @@ void GParted_Core::LP_Set_Used_Sectors( Partition & partition )
}
}
int GParted_Core::create_empty_partition( Partition & new_partition,
std::vector<OperationDetails> & operation_details,
Sector min_size )
{//FIXME:make this one return a boolean...
bool GParted_Core::create_empty_partition( Partition & new_partition,
std::vector<OperationDetails> & operation_details,
Sector min_size )
{
operation_details .push_back( OperationDetails( _("create empty partition") ) ) ;
new_partition .partition_number = 0 ;
@ -988,7 +988,7 @@ int GParted_Core::create_empty_partition( Partition & new_partition,
{
operation_details .back() .status = OperationDetails::SUCCES ;
return new_partition .partition_number ;
return new_partition .partition_number > 0 ;
}
else
{
@ -998,7 +998,7 @@ int GParted_Core::create_empty_partition( Partition & new_partition,
operation_details .back() .status = OperationDetails::ERROR ;
return 0 ;
return false ;
}
}