From de767d79dfbefd2af0061c3fd8b16662ed40a149 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Fri, 17 Dec 2004 16:26:49 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ src/Win_GParted.cc | 12 +++++------- src/ext2.cc | 3 +-- src/ext3.cc | 3 +-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed90f536..aa959c52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-17 Bart Hakvoort + + * 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 * src/GParted_Core.cc: Only peform partable re-read check if at least one partition on a device is mounted. diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 931eef69..a512932a 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -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 ; } } diff --git a/src/ext2.cc b/src/ext2.cc index aece96a1..c97ed53a 100644 --- a/src/ext2.cc +++ b/src/ext2.cc @@ -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 ) ; diff --git a/src/ext3.cc b/src/ext3.cc index 67e61d3d..61fb0b97 100644 --- a/src/ext3.cc +++ b/src/ext3.cc @@ -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 ) ;