DriveSetup: select the actual partition type instead of defaulting to BeFS
Change-Id: Id73ad3398e802eb10b1928317bb9987ddee30eb6 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5658 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
6b3e198d41
commit
eac10866e2
@@ -125,6 +125,10 @@ ChangeParametersPanel::CreateChangeControls(BPartition* partition,
|
|||||||
|
|
||||||
fTypePopUpMenu = new BPopUpMenu("Partition Type");
|
fTypePopUpMenu = new BPopUpMenu("Partition Type");
|
||||||
|
|
||||||
|
const char* type = NULL;
|
||||||
|
if (partition != NULL)
|
||||||
|
type = partition->Type();
|
||||||
|
|
||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
BString supportedType;
|
BString supportedType;
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
@@ -135,8 +139,11 @@ ChangeParametersPanel::CreateChangeControls(BPartition* partition,
|
|||||||
BMenuItem* item = new BMenuItem(supportedType, message);
|
BMenuItem* item = new BMenuItem(supportedType, message);
|
||||||
fTypePopUpMenu->AddItem(item);
|
fTypePopUpMenu->AddItem(item);
|
||||||
|
|
||||||
if (strcmp(supportedType, kPartitionTypeBFS) == 0)
|
if (type != NULL) {
|
||||||
|
item->SetMarked(strcmp(supportedType, type) == 0);
|
||||||
|
} else if (strcmp(supportedType, kPartitionTypeBFS) == 0) {
|
||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user