From e86e7b91b2bf05ad219704db6e00f04f5f05bc44 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sun, 29 Nov 2015 08:57:45 +0000 Subject: [PATCH] Prevent crypt-luks appearing in the Create New dialog and Format menu (#760080) This patchset is adding read-only LUKS support. Creation of LUKS is planned to be a tick box adding encryption in the Create New Partition dialog. Therefore remove the greyed out crypt-luks entry in the Create New Partition dialog and the Format menu. Bug 760080 - Implement read-only LUKS support --- src/Dialog_Partition_New.cc | 10 ++++++---- src/Win_GParted.cc | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc index 4c0fef0b..5b1f6a78 100644 --- a/src/Dialog_Partition_New.cc +++ b/src/Dialog_Partition_New.cc @@ -54,13 +54,15 @@ void Dialog_Partition_New::set_data( const Device & device, this ->new_count = new_count; new_partition = selected_partition.clone(); - // 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 - // of items in the file system menu built by Build_Filesystems_Menu(). + // Copy only supported file systems, excluding LUKS, from GParted_Core FILESYSTEMS + // vector. Add FS_CLEARED, FS_UNFORMATTED and FS_EXTENDED at the end. This + // decides the order of items in the file system menu built by + // Build_Filesystems_Menu(). this->FILESYSTEMS.clear(); for ( unsigned i = 0 ; i < FILESYSTEMS.size() ; i ++ ) { - if ( GParted_Core::supported_filesystem( FILESYSTEMS[i].filesystem ) ) + if ( GParted_Core::supported_filesystem( FILESYSTEMS[i].filesystem ) && + FILESYSTEMS[i].filesystem != FS_LUKS ) this->FILESYSTEMS.push_back( FILESYSTEMS[i] ); } diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 2e7e7b4a..eb4e56d7 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -432,7 +432,8 @@ Gtk::Menu * Win_GParted::create_format_menu() for ( unsigned int t = 0 ; t < fss .size() ; t++ ) { - if ( GParted_Core::supported_filesystem( fss[t].filesystem ) ) + if ( GParted_Core::supported_filesystem( fss[t].filesystem ) && + fss[t].filesystem != FS_LUKS ) create_format_menu_add_item( fss[t].filesystem, fss[t].create ); } //Add cleared at the end of the list