Extend functions generating encrypted file system string (#774818)
Already have: Utils::get_filesystem_string(FS_EXT2) -> "ext2" virtual Partition::get_filesystem_string() -> "ext2" virtual PartitionLUKS::get_filesystem_string() -> "[Encrypted] ext2" Add these: Utils::get_encrypted_string() -> "[Encrypted]" Utils::get_filesystem_string(false, FS_EXT2) -> "ext2" Utils::get_filesystem_string(true, FS_EXT2) -> "[Encrypted] ext2" This is ready for use of Utils::get_filesystem_string(true, FS_EXT2) when composing the preview of a format of an encrypted file system by Win_GParted::activate_format(). Bug 774818 - Implement LUKS read-write actions NOT requiring a passphrase
This commit is contained in:
parent
112ddef9df
commit
88136c96d7
|
@ -181,6 +181,8 @@ public:
|
|||
static int get_max_partition_name_length( Glib::ustring & tabletype );
|
||||
static int get_filesystem_label_maxlength( FILESYSTEM filesystem ) ;
|
||||
static Glib::ustring get_filesystem_string( FILESYSTEM filesystem ) ;
|
||||
static const Glib::ustring get_encrypted_string();
|
||||
static const Glib::ustring get_filesystem_string( bool encrypted, FILESYSTEM fstype );
|
||||
static const Glib::ustring get_filesystem_kernel_name( FILESYSTEM fstype );
|
||||
static Glib::ustring get_filesystem_software( FILESYSTEM filesystem ) ;
|
||||
static bool kernel_supports_fs( const Glib::ustring & fs ) ;
|
||||
|
|
|
@ -209,11 +209,9 @@ Partition & PartitionLUKS::get_filesystem_partition()
|
|||
|
||||
const Glib::ustring PartitionLUKS::get_filesystem_string() const
|
||||
{
|
||||
/* TO TRANSLATORS: means that this is an encrypted file system */
|
||||
Glib::ustring fs_str = "[" + Glib::ustring( _("Encrypted") ) + "]";
|
||||
if ( busy )
|
||||
fs_str += " " + Utils::get_filesystem_string( encrypted.filesystem );
|
||||
return fs_str;
|
||||
return Utils::get_filesystem_string( true, encrypted.filesystem );
|
||||
return Utils::get_encrypted_string();
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
11
src/Utils.cc
11
src/Utils.cc
|
@ -305,6 +305,17 @@ Glib::ustring Utils::get_filesystem_string( FILESYSTEM filesystem )
|
|||
}
|
||||
}
|
||||
|
||||
const Glib::ustring Utils::get_encrypted_string()
|
||||
{
|
||||
/* TO TRANSLATORS: means that this is an encrypted file system */
|
||||
return "[" + Glib::ustring( _("Encrypted") ) + "]";
|
||||
}
|
||||
|
||||
const Glib::ustring Utils::get_filesystem_string( bool encrypted, FILESYSTEM fstype )
|
||||
{
|
||||
return get_encrypted_string() + " " + get_filesystem_string( fstype );
|
||||
}
|
||||
|
||||
// Return Linux kernel name only for mountable file systems.
|
||||
// (Identical to a subset of the libparted names except that it's hfsplus instead of hfs+).
|
||||
const Glib::ustring Utils::get_filesystem_kernel_name( FILESYSTEM fstype )
|
||||
|
|
Loading…
Reference in New Issue