[gparted] Remove last trace of cylinder size adjustments in the resize dialog (#749867)



commit b9262922a76f985c0502adfa49dc974b5ae52097
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Mon May 25 18:18:17 2015 +0100

    Remove last trace of cylinder size adjustments in the resize dialog (#749867)
    
    This commit from 2010-05-20 removed use of cylinder size increase in the
    minimum, and cylinder size decrease in the maximum file system sizes
    from the resize/move dialog.
        e62a23b5b5f5dffff0bf83b0584bf33d0cc8e81e
        Add partition alignment option to align to MiB (#617409)
    
    This cylinder size limit adjustments were being performed using the
    Dialog_Base_Partition::BUF member variable.  Now in the
    Dialog_Partition_Resize_Move class it is never accessed, and only
    unnecessarily set.  Move BUF from the common base class into the
    Dialog_Partition_Copy class where it is still used.
    
    Bug 749867 - Some limits are adjusted by arcane cylinder size amount
                 when copying and resizing in a single operation

 include/Dialog_Base_Partition.h        |    3 +--
 include/Dialog_Partition_Copy.h        |    1 +
 include/Dialog_Partition_Resize_Move.h |    2 +-
 src/Dialog_Partition_Resize_Move.cc    |    4 +---
 src/Win_GParted.cc                     |    7 +++----
 5 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/include/Dialog_Base_Partition.h b/include/Dialog_Base_Partition.h
index 8713a96..dca4d1a 100644
--- a/include/Dialog_Base_Partition.h
+++ b/include/Dialog_Base_Partition.h
@@ -90,8 +90,7 @@ protected:
        bool fixed_start, GRIP ;
        double before_value ;
        FS fs ;
-       short BUF ; //used in resize and copy ( safety reasons )
-       
+
 private:
        void Check_Change( ) ;
        
diff --git a/include/Dialog_Partition_Copy.h b/include/Dialog_Partition_Copy.h
index 4de635a..0245b11 100644
--- a/include/Dialog_Partition_Copy.h
+++ b/include/Dialog_Partition_Copy.h
@@ -32,6 +32,7 @@ public:
        Partition Get_New_Partition( Byte_Value sector_size ) ;
 
 private:
+       short BUF;  // Used in copy (safety reasons)
 };
 
 }//GParted
diff --git a/include/Dialog_Partition_Resize_Move.h b/include/Dialog_Partition_Resize_Move.h
index ab27685..c3ec246 100644
--- a/include/Dialog_Partition_Resize_Move.h
+++ b/include/Dialog_Partition_Resize_Move.h
@@ -25,7 +25,7 @@ namespace GParted
 class Dialog_Partition_Resize_Move : public Dialog_Base_Partition
 {
 public:
-       Dialog_Partition_Resize_Move( const FS & fs, Sector cylinder_size ) ;
+       Dialog_Partition_Resize_Move( const FS & fs );
        void Set_Data( const Partition & selected_partition, const std::vector <Partition> & partitions ) ;
 
 private:
diff --git a/src/Dialog_Partition_Resize_Move.cc b/src/Dialog_Partition_Resize_Move.cc
index 95bf4da..6f41a28 100644
--- a/src/Dialog_Partition_Resize_Move.cc
+++ b/src/Dialog_Partition_Resize_Move.cc
@@ -21,11 +21,9 @@
 namespace GParted
 {
 
-Dialog_Partition_Resize_Move::Dialog_Partition_Resize_Move( const FS & fs, Sector cylinder_size )
+Dialog_Partition_Resize_Move::Dialog_Partition_Resize_Move( const FS & fs )
 {
        this ->fs = fs ;
-       
-       BUF = cylinder_size * 2 ;
 }
 
 void Dialog_Partition_Resize_Move::Set_Data( const Partition & selected_partition,
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 35ab90d..1143df1 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1612,10 +1612,9 @@ void Win_GParted::activate_resize()
                for (unsigned int t = 0 ; t < operations .size() ; t++ )
                        if ( operations[ t ] ->device == devices[ current_device ] )
                                operations[ t ] ->apply_to_visual( partitions ) ;
-       
-       Dialog_Partition_Resize_Move dialog( gparted_core .get_fs( selected_partition .filesystem ), 
-                                            devices[ current_device ] .cylsize ) ;
-                       
+
+       Dialog_Partition_Resize_Move dialog( gparted_core.get_fs( selected_partition.filesystem ) );
+
        if ( selected_partition .type == GParted::TYPE_LOGICAL )
        {
                unsigned int ext = 0 ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]