fixed bug with enabling/disabling 'copy' in menus. added missing check

* src/Win_GParted.cc: fixed bug with enabling/disabling 'copy' in menus.
* src/ext2.cc,
  src/ext3.cc: added missing check while deciding to disable/enable copy feature.
This commit is contained in:
Bart Hakvoort 2004-12-17 16:26:49 +00:00
parent 2ba3f8904b
commit de767d79df
4 changed files with 13 additions and 11 deletions

View File

@ -1,3 +1,9 @@
2004-12-17 Bart Hakvoort <gparted@users.sf.net>
* src/Win_GParted.cc: fixed bug with enabling/disabling 'copy' in menus.
* src/ext2.cc,
src/ext3.cc: added missing check while deciding to disable/enable copy feature.
2004-12-17 Bart Hakvoort <gparted@users.sf.net>
* src/GParted_Core.cc: Only peform partable re-read check if at least one partition on a device is mounted.

View File

@ -624,16 +624,14 @@ void Win_GParted::Set_Valid_Operations()
allow_delete( true ) ;
allow_convert( true ) ;
//find out if resizing/moving and copying is possible
//find out if resizing/moving is possible
if ( (fs .grow || fs .shrink) && ! devices[ current_device ] .readonly )
{
allow_resize( true ) ;
//only allow copying of real partitions
if ( selected_partition .status == GParted::STAT_REAL && fs .copy )
allow_copy( true ) ;
}
//only allow copying of real partitions
if ( selected_partition .status == GParted::STAT_REAL && fs .copy )
allow_copy( true ) ;
return ;
}
}

View File

@ -44,7 +44,7 @@ FS ext2::get_filesystem_support( )
fs .shrink = true ;
}
if ( ! system( "which dd 1>/dev/null 2>/dev/null" ) )
if ( ! system( "which dd 1>/dev/null 2>/dev/null" ) && fs .grow )
fs .copy = true ;
return fs ;
@ -71,7 +71,6 @@ void ext2::Set_Used_Sectors( Partition & partition )
//blocksize
if ( output .find( "Block size" ) < output .length( ) )
blocksize = atoi( (output .substr( output .find( ":" ) +1, output .length( ) ) ) .c_str( ) ) ;
}
pclose( f ) ;

View File

@ -44,7 +44,7 @@ FS ext3::get_filesystem_support( )
fs .shrink = true ;
}
if ( ! system( "which dd 1>/dev/null 2>/dev/null" ) )
if ( ! system( "which dd 1>/dev/null 2>/dev/null" ) && fs .grow)
fs .copy = true ;
return fs ;
@ -71,7 +71,6 @@ void ext3::Set_Used_Sectors( Partition & partition )
//blocksize
if ( output .find( "Block size" ) < output .length( ) )
blocksize = atoi( (output .substr( output .find( ":" ) +1, output .length( ) ) ) .c_str( ) ) ;
}
pclose( f ) ;