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> 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. * src/GParted_Core.cc: Only peform partable re-read check if at least one partition on a device is mounted.

View File

@ -624,15 +624,13 @@ void Win_GParted::Set_Valid_Operations()
allow_delete( true ) ; allow_delete( true ) ;
allow_convert( 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 ) if ( (fs .grow || fs .shrink) && ! devices[ current_device ] .readonly )
{
allow_resize( true ) ; allow_resize( true ) ;
//only allow copying of real partitions //only allow copying of real partitions
if ( selected_partition .status == GParted::STAT_REAL && fs .copy ) if ( selected_partition .status == GParted::STAT_REAL && fs .copy )
allow_copy( true ) ; allow_copy( true ) ;
}
return ; return ;
} }

View File

@ -44,7 +44,7 @@ FS ext2::get_filesystem_support( )
fs .shrink = true ; 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 ; fs .copy = true ;
return fs ; return fs ;
@ -71,7 +71,6 @@ void ext2::Set_Used_Sectors( Partition & partition )
//blocksize //blocksize
if ( output .find( "Block size" ) < output .length( ) ) if ( output .find( "Block size" ) < output .length( ) )
blocksize = atoi( (output .substr( output .find( ":" ) +1, output .length( ) ) ) .c_str( ) ) ; blocksize = atoi( (output .substr( output .find( ":" ) +1, output .length( ) ) ) .c_str( ) ) ;
} }
pclose( f ) ; pclose( f ) ;

View File

@ -44,7 +44,7 @@ FS ext3::get_filesystem_support( )
fs .shrink = true ; 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 ; fs .copy = true ;
return fs ; return fs ;
@ -71,7 +71,6 @@ void ext3::Set_Used_Sectors( Partition & partition )
//blocksize //blocksize
if ( output .find( "Block size" ) < output .length( ) ) if ( output .find( "Block size" ) < output .length( ) )
blocksize = atoi( (output .substr( output .find( ":" ) +1, output .length( ) ) ) .c_str( ) ) ; blocksize = atoi( (output .substr( output .find( ":" ) +1, output .length( ) ) ) .c_str( ) ) ;
} }
pclose( f ) ; pclose( f ) ;