[gparted] Rename parameter to selected_partition in Dialog_Partition_New methods (#757671)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Rename parameter to selected_partition in Dialog_Partition_New methods (#757671)
- Date: Wed, 11 Nov 2015 17:17:46 +0000 (UTC)
commit 451c2eac43e741a4d7ff6ce79638a41336c2c611
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Mon Nov 2 16:31:10 2015 +0000
Rename parameter to selected_partition in Dialog_Partition_New methods (#757671)
This is just to make the parameter name in the Dialog_Partition_New
constructor and set_data() method match the name of the equivalent
parameter in the Dialog_Partition_Copy and Dialog_Partition_Resize_Move
classes. (All three classes inherit from Dialog_Base_Partition and have
similar interfaces).
Bug 757671 - Rework Dialog_Partition_New::Get_New_Partition() a bit
include/Dialog_Partition_New.h | 2 +-
src/Dialog_Partition_New.cc | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/include/Dialog_Partition_New.h b/include/Dialog_Partition_New.h
index 6f85065..ce06dad 100644
--- a/include/Dialog_Partition_New.h
+++ b/include/Dialog_Partition_New.h
@@ -30,7 +30,7 @@ class Dialog_Partition_New : public Dialog_Base_Partition
{
public:
Dialog_Partition_New(const Device & device,
- const Partition & partition,
+ const Partition & selected_partition,
bool any_extended,
unsigned short new_count,
const std::vector<FS> & FILESYSTEMS );
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index f67f83e..b3ee247 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -22,7 +22,7 @@ namespace GParted
{
Dialog_Partition_New::Dialog_Partition_New( const Device & device,
- const Partition & partition,
+ const Partition & selected_partition,
bool any_extended,
unsigned short new_count,
const std::vector<FS> & FILESYSTEMS )
@@ -35,17 +35,17 @@ Dialog_Partition_New::Dialog_Partition_New( const Device & device,
//set used (in pixels)...
frame_resizer_base ->set_used( 0 ) ;
- set_data(device, partition, any_extended, new_count, FILESYSTEMS );
+ set_data(device, selected_partition, any_extended, new_count, FILESYSTEMS );
}
void Dialog_Partition_New::set_data( const Device & device,
- const Partition & partition,
+ const Partition & selected_partition,
bool any_extended,
unsigned short new_count,
const std::vector<FS> & FILESYSTEMS )
{
this ->new_count = new_count;
- new_partition = partition;
+ new_partition = selected_partition;
// Copy only supported file systems from GParted_Core FILESYSTEMS vector. Add
// FS_CLEARED, FS_UNFORMATTED and FS_EXTENDED at the end. This decides the order
@@ -97,7 +97,7 @@ void Dialog_Partition_New::set_data( const Device & device,
menu_type .items()[ 2 ] .set_sensitive( false );
menu_type .set_active( 0 );
}
- else if ( partition .inside_extended )
+ else if ( selected_partition.inside_extended )
{
menu_type .items()[ 0 ] .set_sensitive( false );
menu_type .items()[ 2 ] .set_sensitive( false );
@@ -150,10 +150,11 @@ void Dialog_Partition_New::set_data( const Device & device,
table_create.attach( filesystem_label_entry, 1, 2, 3, 4, Gtk::FILL );
//set some widely used values...
- MIN_SPACE_BEFORE_MB = Dialog_Base_Partition::MB_Needed_for_Boot_Record( new_partition );
- START = partition.sector_start ;
- total_length = partition.sector_end - partition.sector_start ;
- TOTAL_MB = Utils::round( Utils::sector_to_unit( new_partition.get_sector_length(),
new_partition.sector_size, UNIT_MIB ) );
+ MIN_SPACE_BEFORE_MB = Dialog_Base_Partition::MB_Needed_for_Boot_Record( selected_partition );
+ START = selected_partition.sector_start;
+ total_length = selected_partition.sector_end - selected_partition.sector_start;
+ TOTAL_MB = Utils::round( Utils::sector_to_unit( selected_partition.get_sector_length(),
+ selected_partition.sector_size, UNIT_MIB ) );
MB_PER_PIXEL = TOTAL_MB / 500.00 ;
//set first enabled file system
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]