Updated menu changes.
* Disable Init menu for partitions that are read only, or have no media (ie. empty cdrom) * Disable Delete menu for partitions that are devices. * Disable Mount menu for partitions that are devices. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32307 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f9ba5c92e3
commit
4a6a6b6d1c
@ -503,7 +503,6 @@ MainWindow::_UpdateMenus(BDiskDevice* disk,
|
||||
fInitMenu->SetEnabled(prepared);
|
||||
fDeleteMI->SetEnabled(prepared);
|
||||
|
||||
|
||||
BDiskSystem diskSystem;
|
||||
fDDRoster.RewindDiskSystems();
|
||||
while (fDDRoster.GetNextDiskSystem(&diskSystem) == B_OK) {
|
||||
@ -535,9 +534,15 @@ MainWindow::_UpdateMenus(BDiskDevice* disk,
|
||||
|
||||
// Mount items
|
||||
if (partition) {
|
||||
fInitMenu->SetEnabled(!partition->IsMounted());
|
||||
fDeleteMI->SetEnabled(!partition->IsMounted());
|
||||
fMountMI->SetEnabled(!partition->IsMounted());
|
||||
fInitMenu->SetEnabled(!partition->IsMounted()
|
||||
&& !partition->IsReadOnly()
|
||||
&& partition->Device()->HasMedia());
|
||||
|
||||
fDeleteMI->SetEnabled(!partition->IsMounted()
|
||||
&& !partition->IsDevice());
|
||||
|
||||
fMountMI->SetEnabled(!partition->IsMounted()
|
||||
&& !partition->IsDevice());
|
||||
|
||||
bool unMountable = false;
|
||||
if (partition->IsMounted()) {
|
||||
|
Loading…
Reference in New Issue
Block a user