Set activate/deactivate partition menu item name earlier (#741430)
So that, even though the menu item is greyed out, it is correctly named Activate or Deactivate for an LVM2 Physical Volume on a whole disk device, rather than the default Mount or Unmount. Bug 741430 - GParted cannot recognise LVM signature on unpartitioned drive
This commit is contained in:
parent
dd049e8b4b
commit
474c5b10b3
|
@ -975,16 +975,7 @@ void Win_GParted::set_valid_operations()
|
||||||
//if there's something, there's some info ;)
|
//if there's something, there's some info ;)
|
||||||
allow_info( true ) ;
|
allow_info( true ) ;
|
||||||
|
|
||||||
// No manipulation operations are currently supported on file systems using the
|
// Set an appropriate name for the activate/deactivate menu item.
|
||||||
// whole disk device.
|
|
||||||
if ( devices[current_device].disktype == "none" )
|
|
||||||
return;
|
|
||||||
|
|
||||||
//flag managing..
|
|
||||||
if ( selected_partition .type != GParted::TYPE_UNALLOCATED && selected_partition .status == GParted::STAT_REAL )
|
|
||||||
allow_manage_flags( true ) ;
|
|
||||||
|
|
||||||
//Activate / deactivate
|
|
||||||
if ( gparted_core .get_filesystem_object ( selected_partition .filesystem ) )
|
if ( gparted_core .get_filesystem_object ( selected_partition .filesystem ) )
|
||||||
dynamic_cast<Gtk::Label*>( menu_partition .items()[ MENU_TOGGLE_BUSY ] .get_child() )
|
dynamic_cast<Gtk::Label*>( menu_partition .items()[ MENU_TOGGLE_BUSY ] .get_child() )
|
||||||
->set_label( gparted_core .get_filesystem_object ( selected_partition .filesystem )
|
->set_label( gparted_core .get_filesystem_object ( selected_partition .filesystem )
|
||||||
|
@ -1000,6 +991,11 @@ void Win_GParted::set_valid_operations()
|
||||||
: CTEXT_ACTIVATE_FILESYSTEM )
|
: CTEXT_ACTIVATE_FILESYSTEM )
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
|
// No manipulation operations are currently supported on file systems using the
|
||||||
|
// whole disk device.
|
||||||
|
if ( devices[current_device].disktype == "none" )
|
||||||
|
return;
|
||||||
|
|
||||||
//Only permit mount/unmount, swapon/swapoff, activate/deactivate if action is available
|
//Only permit mount/unmount, swapon/swapoff, activate/deactivate if action is available
|
||||||
if ( selected_partition .status == GParted::STAT_REAL
|
if ( selected_partition .status == GParted::STAT_REAL
|
||||||
&& selected_partition .type != GParted::TYPE_EXTENDED
|
&& selected_partition .type != GParted::TYPE_EXTENDED
|
||||||
|
@ -1027,6 +1023,10 @@ void Win_GParted::set_valid_operations()
|
||||||
)
|
)
|
||||||
allow_toggle_busy_state( true ) ;
|
allow_toggle_busy_state( true ) ;
|
||||||
|
|
||||||
|
// Manage flags
|
||||||
|
if ( selected_partition.type != TYPE_UNALLOCATED && selected_partition.status == STAT_REAL )
|
||||||
|
allow_manage_flags( true );
|
||||||
|
|
||||||
#ifdef ENABLE_ONLINE_RESIZE
|
#ifdef ENABLE_ONLINE_RESIZE
|
||||||
//Find out if online resizing is possible
|
//Find out if online resizing is possible
|
||||||
if ( selected_partition .busy )
|
if ( selected_partition .busy )
|
||||||
|
|
Loading…
Reference in New Issue