only allow 'swapon' on real partitions
* src/Win_GParted.cc: only allow 'swapon' on real partitions
This commit is contained in:
parent
ff3dd1accc
commit
ea9228ecad
|
@ -1,3 +1,7 @@
|
|||
2006-03-09 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* src/Win_GParted.cc: only allow 'swapon' on real partitions
|
||||
|
||||
2006-03-09 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* include/Win_GParted.h,
|
||||
|
|
|
@ -666,10 +666,9 @@ bool Win_GParted::Quit_Check_Operations()
|
|||
|
||||
void Win_GParted::set_valid_operations()
|
||||
{
|
||||
//FIXME: we shouldn't allow NEW partitions to be activated (swap/mount)
|
||||
allow_new( false ); allow_delete( false ); allow_resize( false ); allow_copy( false );
|
||||
allow_paste( false ); allow_format( false ); allow_info( false ) ;
|
||||
allow_toggle_swap_mount_state( false ) ;
|
||||
allow_paste( false ); allow_format( false ); allow_toggle_swap_mount_state( false ) ;
|
||||
allow_info( false ) ;
|
||||
|
||||
dynamic_cast<Gtk::Label*>(menu_partition .items()[ 10 ] .get_child() ) ->set_label( _("unmount") ) ;
|
||||
|
||||
|
@ -683,6 +682,7 @@ void Win_GParted::set_valid_operations()
|
|||
//deal with swap...
|
||||
if ( selected_partition .filesystem == GParted::FS_LINUX_SWAP )
|
||||
{
|
||||
if ( selected_partition .status == GParted::STAT_REAL )
|
||||
allow_toggle_swap_mount_state( true ) ;
|
||||
|
||||
if ( selected_partition .busy )
|
||||
|
|
Loading…
Reference in New Issue