mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 11:40:03 +00:00
Display "other" in the File System Support dialog (!13)
To display the supported actions for all basic supported file systems to the users. Prepare the list of file system actions in Win_GParted because calling get_fs() for the "other" actions requires the gparted_core object and load_filesystems() currently doesn't have access to it. One alternative would have been to make get_fs() and FILESYSTEMS static members of GParted_Core class. Another alternative would have been to pass the gparted_core object to load_filesystems(). The chosen way seemed simplest. Closes !13 - Support copying and moving of unsupported partition content
This commit is contained in:
parent
9a66139eff
commit
4d6d464664
|
@ -156,10 +156,7 @@ void DialogFeatures::load_filesystems( const std::vector<FS> & FILESYSTEMS )
|
|||
|
||||
//fill the features chart with valid file systems
|
||||
for ( unsigned short t = 0; t < FILESYSTEMS .size() ; t++ )
|
||||
{
|
||||
if ( GParted_Core::supported_filesystem( FILESYSTEMS[t].filesystem ) )
|
||||
show_filesystem( FILESYSTEMS[t] );
|
||||
}
|
||||
show_filesystem( FILESYSTEMS[t] );
|
||||
}
|
||||
|
||||
void DialogFeatures::show_filesystem( const FS & fs )
|
||||
|
|
|
@ -1558,8 +1558,20 @@ void Win_GParted::menu_gparted_features()
|
|||
{
|
||||
DialogFeatures dialog ;
|
||||
dialog .set_transient_for( *this ) ;
|
||||
|
||||
dialog .load_filesystems( gparted_core .get_filesystems() ) ;
|
||||
|
||||
// Create the list of fully supported file system action, adding "other" at the
|
||||
// end for all the basic supported file systems, ready for showing in the dialog.
|
||||
const std::vector<FS> fs_actions = gparted_core.get_filesystems();
|
||||
std::vector<FS> show_fs_actions;
|
||||
show_fs_actions.reserve( fs_actions.size() );
|
||||
for ( unsigned i = 0 ; i < fs_actions.size() ; i ++ )
|
||||
{
|
||||
if ( GParted_Core::supported_filesystem( fs_actions[i].filesystem ) )
|
||||
show_fs_actions.push_back( fs_actions[i] );
|
||||
}
|
||||
show_fs_actions.push_back( gparted_core.get_fs( FS_OTHER ) );
|
||||
|
||||
dialog.load_filesystems( show_fs_actions );
|
||||
while ( dialog .run() == Gtk::RESPONSE_OK )
|
||||
{
|
||||
// Button [Rescan For Supported Actions] pressed in the dialog. Rescan
|
||||
|
@ -1567,7 +1579,7 @@ void Win_GParted::menu_gparted_features()
|
|||
// view accordingly in the dialog.
|
||||
GParted_Core::find_supported_core();
|
||||
gparted_core .find_supported_filesystems() ;
|
||||
dialog .load_filesystems( gparted_core .get_filesystems() ) ;
|
||||
dialog.load_filesystems( show_fs_actions );
|
||||
|
||||
//recreate format menu...
|
||||
menu_partition .items()[ MENU_FORMAT ] .remove_submenu() ;
|
||||
|
|
Loading…
Reference in a new issue