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
This commit is contained in:
Mike Fleetwood 2015-11-29 08:57:45 +00:00 committed by Curtis Gedak
parent 070d734e57
commit e86e7b91b2
2 changed files with 8 additions and 5 deletions

View File

@ -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] );
}

View File

@ -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