* Don't continue with initializing a partition if the user cancelled the
parameter panel... Doh! * Force update the disk view when rescanning the disks (a newly initialized partition will now also show the correct name in the DiskView). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26465 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -420,18 +420,15 @@ DiskView::SetDisk(BDiskDevice* disk, partition_id selectedPartition)
|
|||||||
{
|
{
|
||||||
if (fDisk != disk) {
|
if (fDisk != disk) {
|
||||||
fDisk = disk;
|
fDisk = disk;
|
||||||
_UpdateLayout();
|
ForceUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
fPartitionLayout->SetSelectedPartition(selectedPartition);
|
fPartitionLayout->SetSelectedPartition(selectedPartition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DiskView::_UpdateLayout()
|
DiskView::ForceUpdate()
|
||||||
{
|
{
|
||||||
while (BView* view = ChildAt(0)) {
|
while (BView* view = ChildAt(0)) {
|
||||||
view->RemoveSelf();
|
view->RemoveSelf();
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ public:
|
|||||||
void SetDiskCount(int32 count);
|
void SetDiskCount(int32 count);
|
||||||
void SetDisk(BDiskDevice* disk,
|
void SetDisk(BDiskDevice* disk,
|
||||||
partition_id selectedPartition);
|
partition_id selectedPartition);
|
||||||
private:
|
|
||||||
void _UpdateLayout();
|
|
||||||
|
|
||||||
|
void ForceUpdate();
|
||||||
|
private:
|
||||||
int32 fDiskCount;
|
int32 fDiskCount;
|
||||||
BDiskDevice* fDisk;
|
BDiskDevice* fDisk;
|
||||||
SpaceIDMap& fSpaceIDMap;
|
SpaceIDMap& fSpaceIDMap;
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ MainWindow::_ScanDrives()
|
|||||||
fListView->AddToSelection(previousSelection);
|
fListView->AddToSelection(previousSelection);
|
||||||
_EnabledDisableMenuItems(fCurrentDisk, fCurrentPartitionID,
|
_EnabledDisableMenuItems(fCurrentDisk, fCurrentPartitionID,
|
||||||
previousSelection->ParentID());
|
previousSelection->ParentID());
|
||||||
|
fDiskView->ForceUpdate();
|
||||||
} else {
|
} else {
|
||||||
_EnabledDisableMenuItems(NULL, -1, -1);
|
_EnabledDisableMenuItems(NULL, -1, -1);
|
||||||
}
|
}
|
||||||
@@ -650,6 +651,7 @@ MainWindow::_MountAll()
|
|||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
class ModificationPreparer {
|
class ModificationPreparer {
|
||||||
public:
|
public:
|
||||||
ModificationPreparer(BDiskDevice* disk)
|
ModificationPreparer(BDiskDevice* disk)
|
||||||
@@ -679,6 +681,7 @@ private:
|
|||||||
status_t fModificationStatus;
|
status_t fModificationStatus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
||||||
const BString& diskSystemName)
|
const BString& diskSystemName)
|
||||||
@@ -760,7 +763,8 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
|||||||
BString name = "Haiku";
|
BString name = "Haiku";
|
||||||
BString parameters;
|
BString parameters;
|
||||||
InitParamsPanel* panel = new InitParamsPanel(this);
|
InitParamsPanel* panel = new InitParamsPanel(this);
|
||||||
panel->Go(name, parameters);
|
if (panel->Go(name, parameters) == GO_CANCELED)
|
||||||
|
return;
|
||||||
|
|
||||||
bool supportsName = diskSystem.SupportsContentName();
|
bool supportsName = diskSystem.SupportsContentName();
|
||||||
BString validatedName(name);
|
BString validatedName(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user