[gparted] Remove GParted:: prefix from in front of UNIT constants
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Remove GParted:: prefix from in front of UNIT constants
- Date: Wed, 24 Mar 2010 20:38:06 +0000 (UTC)
commit eb7e09aac8512d53e980fd70e2acbe69042ff059
Author: Curtis Gedak <gedakc gmail com>
Date: Tue Mar 23 12:21:57 2010 -0600
Remove GParted:: prefix from in front of UNIT constants
src/Dialog_Partition_Copy.cc | 18 +++++++-------
src/Dialog_Partition_New.cc | 16 ++++++------
src/Dialog_Partition_Resize_Move.cc | 44 +++++++++++++++++-----------------
src/ext3.cc | 2 +-
src/ext4.cc | 2 +-
src/ntfs.cc | 2 +-
src/reiserfs.cc | 2 +-
7 files changed, 43 insertions(+), 43 deletions(-)
---
diff --git a/src/Dialog_Partition_Copy.cc b/src/Dialog_Partition_Copy.cc
index 17747e1..7220fa7 100644
--- a/src/Dialog_Partition_Copy.cc
+++ b/src/Dialog_Partition_Copy.cc
@@ -41,10 +41,10 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
//set some widely used values...
START = selected_partition .sector_start ;
total_length = selected_partition .get_length() ;
- TOTAL_MB = Utils::round( Utils::sector_to_unit( selected_partition .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ;
+ TOTAL_MB = Utils::round( Utils::sector_to_unit( selected_partition .get_length(), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ;
MB_PER_PIXEL = TOTAL_MB / 500.00 ;
- long COPIED_LENGTH_MB = Utils::round( Utils::sector_to_unit( copied_partition .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ;
+ long COPIED_LENGTH_MB = Utils::round( Utils::sector_to_unit( copied_partition .get_length(), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ;
// /* Copy Primary not at start of disk to within Extended partition */
// Adjust when a primary partition is copied and pasted
// into an unallocated space in an extended partition
@@ -96,7 +96,7 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
frame_resizer_base ->set_x_end( x_end > 500 ? 500 : x_end ) ;
frame_resizer_base ->set_used(
Utils::round( Utils::sector_to_unit(
- copied_partition .sectors_used, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) / (TOTAL_MB/500.00) ) ) ;
+ copied_partition .sectors_used, DEFAULT_SECTOR_SIZE, UNIT_MIB ) / (TOTAL_MB/500.00) ) ) ;
if ( fs .grow )
fs .MAX = ( ! fs .MAX || fs .MAX > (TOTAL_MB * MEBI_FACTOR) ) ? (TOTAL_MB * MEBI_FACTOR) : fs .MAX - (BUF * DEFAULT_SECTOR_SIZE) ;
@@ -111,17 +111,17 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
GRIP = true ;
//set values of spinbutton_before
- spinbutton_before .set_range( 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_before .set_range( 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_before .set_value( 0 ) ;
//set values of spinbutton_size
spinbutton_size .set_range(
- Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_size .set_value( COPIED_LENGTH_MB ) ;
//set values of spinbutton_after
- spinbutton_after .set_range( 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_after .set_range( 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_after .set_value( TOTAL_MB - COPIED_LENGTH_MB ) ;
GRIP = false ;
@@ -130,8 +130,8 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
//set contents of label_minmax
Set_MinMax_Text(
- Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
//set global selected_partition (see Dialog_Base_Partition::Get_New_Partition )
this ->selected_partition = copied_partition ;
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index d7c1d6c..5999c33 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -142,7 +142,7 @@ void Dialog_Partition_New::Set_Data( const Partition & partition,
//set some widely used values...
START = partition.sector_start ;
total_length = partition.sector_end - partition.sector_start ;
- TOTAL_MB = Utils::round( Utils::sector_to_unit( this ->selected_partition .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ;
+ TOTAL_MB = Utils::round( Utils::sector_to_unit( this ->selected_partition .get_length(), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ;
MB_PER_PIXEL = TOTAL_MB / 500.00 ;
//set first enabled file system
@@ -151,7 +151,7 @@ void Dialog_Partition_New::Set_Data( const Partition & partition,
//set spinbuttons initial values
spinbutton_after .set_value( 0 ) ;
- spinbutton_size .set_value( Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_size .set_value( Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_before .set_value( 0 ) ;
//euhrm, this wil only happen when there's a very small free space (usually the effect of a bad partitionmanager)
@@ -267,17 +267,17 @@ void Dialog_Partition_New::optionmenu_changed( bool type )
//set new spinbutton ranges
spinbutton_before .set_range(
- 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_size .set_range(
- Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_after .set_range(
- 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
//set contents of label_minmax
Set_MinMax_Text(
- Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
}
//set fitting resizer colors
diff --git a/src/Dialog_Partition_Resize_Move.cc b/src/Dialog_Partition_Resize_Move.cc
index b497997..c6623ea 100644
--- a/src/Dialog_Partition_Resize_Move.cc
+++ b/src/Dialog_Partition_Resize_Move.cc
@@ -104,7 +104,7 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector<Partiti
next = partitions[t +1] .get_length() ;
total_length = previous + selected_partition .get_length() + next;
- TOTAL_MB = Utils::round( Utils::sector_to_unit( total_length, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ;
+ TOTAL_MB = Utils::round( Utils::sector_to_unit( total_length, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ;
MB_PER_PIXEL = TOTAL_MB / 500.00 ;
@@ -148,33 +148,33 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector<Partiti
{
spinbutton_before .set_range(
0,
- TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_before .set_value(
- Utils::round( Utils::sector_to_unit( previous, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( previous, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
}
//set values of spinbutton_size
spinbutton_size .set_range(
- Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_size .set_value(
- Utils::round( Utils::sector_to_unit( selected_partition .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( selected_partition .get_length(), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
//set values of spinbutton_after
Sector after_min = ( ! fs .grow && ! fs .move ) ? next : 0 ;
spinbutton_after .set_range(
- Utils::round( Utils::sector_to_unit( after_min, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( after_min, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ TOTAL_MB - Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
spinbutton_after .set_value(
- Utils::round( Utils::sector_to_unit( next, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( next, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
frame_resizer_base ->set_size_limits( Utils::round( fs .MIN / (MB_PER_PIXEL * MEBI_FACTOR) ),
Utils::round( fs .MAX / (MB_PER_PIXEL * MEBI_FACTOR) ) ) ;
//set contents of label_minmax
Set_MinMax_Text(
- Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( (fs .MIN / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( (fs .MAX / DEFAULT_SECTOR_SIZE), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
}
void Dialog_Partition_Resize_Move::Resize_Move_Extended( const std::vector<Partition> & partitions )
@@ -227,34 +227,34 @@ void Dialog_Partition_Resize_Move::Resize_Move_Extended( const std::vector<Parti
//set values of spinbutton_before (we assume there is no fixed start.)
if ( first == 0 ) //no logicals
- spinbutton_before .set_range( 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( BUF/2, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_before .set_range( 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( BUF/2, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
else
- spinbutton_before .set_range( 0, Utils::round( Utils::sector_to_unit( first - START, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_before .set_range( 0, Utils::round( Utils::sector_to_unit( first - START, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
- spinbutton_before .set_value( Utils::round( Utils::sector_to_unit( previous, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_before .set_value( Utils::round( Utils::sector_to_unit( previous, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
//set values of spinbutton_size
if ( first == 0 ) //no logicals
- spinbutton_size .set_range( Utils::round( Utils::sector_to_unit( BUF/2, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ), TOTAL_MB ) ;
+ spinbutton_size .set_range( Utils::round( Utils::sector_to_unit( BUF/2, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ), TOTAL_MB ) ;
else
- spinbutton_size .set_range( Utils::round( Utils::sector_to_unit( used, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ), TOTAL_MB ) ;
+ spinbutton_size .set_range( Utils::round( Utils::sector_to_unit( used, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ), TOTAL_MB ) ;
spinbutton_size .set_value(
- Utils::round( Utils::sector_to_unit( selected_partition .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Utils::round( Utils::sector_to_unit( selected_partition .get_length(), DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
//set values of spinbutton_after
if ( first == 0 ) //no logicals
spinbutton_after .set_range(
- 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( BUF/2, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ 0, TOTAL_MB - Utils::round( Utils::sector_to_unit( BUF/2, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
else
spinbutton_after .set_range(
- 0, Utils::round( Utils::sector_to_unit( total_length + START - first - used, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ 0, Utils::round( Utils::sector_to_unit( total_length + START - first - used, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
- spinbutton_after .set_value( Utils::round( Utils::sector_to_unit( next, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ spinbutton_after .set_value( Utils::round( Utils::sector_to_unit( next, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
//set contents of label_minmax
- Set_MinMax_Text( Utils::round( Utils::sector_to_unit( first == 0 ? BUF/2 : used, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ),
- Utils::round( Utils::sector_to_unit( total_length, DEFAULT_SECTOR_SIZE, GParted::UNIT_MIB ) ) ) ;
+ Set_MinMax_Text( Utils::round( Utils::sector_to_unit( first == 0 ? BUF/2 : used, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ),
+ Utils::round( Utils::sector_to_unit( total_length, DEFAULT_SECTOR_SIZE, UNIT_MIB ) ) ) ;
}
} //GParted
diff --git a/src/ext3.cc b/src/ext3.cc
index 4847895..341d988 100644
--- a/src/ext3.cc
+++ b/src/ext3.cc
@@ -117,7 +117,7 @@ bool ext3::resize( const Partition & partition_new, OperationDetail & operationd
if ( ! fill_partition )
str_temp += " " + Utils::num_to_str( Utils::round( Utils::sector_to_unit(
- partition_new .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_KIB ) ) -1 ) + "K" ;
+ partition_new .get_length(), DEFAULT_SECTOR_SIZE, UNIT_KIB ) ) -1 ) + "K" ;
return ! execute_command( str_temp, operationdetail ) ;
}
diff --git a/src/ext4.cc b/src/ext4.cc
index 310b83b..063ad12 100644
--- a/src/ext4.cc
+++ b/src/ext4.cc
@@ -120,7 +120,7 @@ bool ext4::resize( const Partition & partition_new, OperationDetail & operationd
if ( ! fill_partition )
str_temp += " " + Utils::num_to_str( Utils::round( Utils::sector_to_unit(
- partition_new .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_KIB ) ) -1 ) + "K" ;
+ partition_new .get_length(), DEFAULT_SECTOR_SIZE, UNIT_KIB ) ) -1 ) + "K" ;
return ! execute_command( str_temp, operationdetail ) ;
}
diff --git a/src/ntfs.cc b/src/ntfs.cc
index 4919d5a..235a6f1 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -118,7 +118,7 @@ bool ntfs::resize( const Partition & partition_new, OperationDetail & operationd
{
str_temp += " -s " ;
str_temp += Utils::num_to_str( Utils::round( Utils::sector_to_unit(
- partition_new .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_BYTE ) ) -1 ) ;
+ partition_new .get_length(), DEFAULT_SECTOR_SIZE, UNIT_BYTE ) ) -1 ) ;
}
//simulation..
diff --git a/src/reiserfs.cc b/src/reiserfs.cc
index ec1a322..46022a8 100644
--- a/src/reiserfs.cc
+++ b/src/reiserfs.cc
@@ -125,7 +125,7 @@ bool reiserfs::resize( const Partition & partition_new, OperationDetail & operat
{
str_temp += " -s " ;
str_temp += Utils::num_to_str( Utils::round( Utils::sector_to_unit(
- partition_new .get_length(), DEFAULT_SECTOR_SIZE, GParted::UNIT_BYTE ) ) -1 ) ;
+ partition_new .get_length(), DEFAULT_SECTOR_SIZE, UNIT_BYTE ) ) -1 ) ;
}
exit_status = execute_command( str_temp, operationdetail ) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]