[gparted] Change default file system to ext4 (#711114)



commit 73f2c689f7bc6fe75181f5cce88d521e25636813
Author: Phillip Susi <psusi ubuntu com>
Date:   Tue Oct 29 22:23:51 2013 -0400

    Change default file system to ext4 (#711114)
    
    In the Create New Partition dialog use ext4 as the default choice for
    new file systems.  It has been the preferred file system of
    distributions for many years.  Use ext3 and ext2 as second and third
    choice defaults.  This handles RHEL/CentOS 5.x which doesn't support
    ext4.
    
    Bug #711114 - Change default fs to ext4

 src/Dialog_Partition_New.cc |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index acf732b..dcd8391 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -345,9 +345,12 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
                menu_filesystem .items() .back() .set_sensitive(
                        ! only_unformatted && FILESYSTEMS[ t ] .create &&
                        this ->selected_partition .get_byte_length() >= FILESYSTEMS[ t ] .MIN ) ;
-               //use ext2 as default filesystem
-               if ( Utils::get_filesystem_string( FILESYSTEMS[ t ] .filesystem ) == "ext2" &&
-                       menu_filesystem .items() .back() .sensitive() )
+               //use ext4/3/2 as first/second/third choice default file system
+               //(Depends on ordering in FILESYSTEMS for preference)
+               if ( ( FILESYSTEMS[ t ] .filesystem == FS_EXT2 ||
+                      FILESYSTEMS[ t ] .filesystem == FS_EXT3 ||
+                      FILESYSTEMS[ t ] .filesystem == FS_EXT4    ) &&
+                    menu_filesystem .items() .back() .sensitive()     )
                {
                        first_creatable_fs=menu_filesystem .items() .size() - 1;
                        set_first=true;
@@ -359,7 +362,7 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
        
        if(!set_first)
        {
-               //find and set first enabled file system
+               //find and set first enabled file system as last choice default
                for ( unsigned int t = 0 ; t < menu_filesystem .items() .size() ; t++ )
                        if ( menu_filesystem .items()[ t ] .sensitive() )
                        {


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