[gparted] Disable resizing when the total area is less than two mebibytes



commit 40bb656de5f759b76630bacf174b145f08a691ef
Author: Curtis Gedak <gedakc gmail com>
Date:   Thu May 20 15:30:04 2010 -0600

    Disable resizing when the total area is less than two mebibytes

 src/Dialog_Partition_New.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index f542f25..d107092 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -155,8 +155,8 @@ void Dialog_Partition_New::Set_Data( const Partition & partition,
 	spinbutton_size .set_value( ceil( fs .MAX / double(MEBIBYTE) ) ) ; 
 	spinbutton_before .set_value( MIN_SPACE_BEFORE_MB ) ;
 	
-	//euhrm, this wil only happen when there's a very small free space (usually the effect of a bad partitionmanager)
-	if ( TOTAL_MB * (MEBIBYTE / this ->selected_partition .sector_size) < this ->cylinder_size )
+	//Disable resizing when the total area is less than two mebibytes
+	if ( TOTAL_MB < 2 )
 		frame_resizer_base ->set_sensitive( false ) ;
 
 	//connect signal handler for Dialog_Base_Partiton optionmenu_alignment



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