* Now listens to disk device notifications, and rescans its device list when
something comes in -- this could be greatly improved, though. * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29583 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007-2008 Haiku Inc. All rights reserved.
|
* Copyright 2007-2009 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "DiskView.h"
|
#include "DiskView.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
|
||||||
@@ -28,14 +29,14 @@ class PartitionView : public BView {
|
|||||||
public:
|
public:
|
||||||
PartitionView(const char* name, float weight, off_t offset,
|
PartitionView(const char* name, float weight, off_t offset,
|
||||||
int32 level, partition_id id)
|
int32 level, partition_id id)
|
||||||
: BView(name, B_WILL_DRAW | B_SUPPORTS_LAYOUT | B_FULL_UPDATE_ON_RESIZE)
|
: BView(name, B_WILL_DRAW | B_SUPPORTS_LAYOUT | B_FULL_UPDATE_ON_RESIZE),
|
||||||
, fID(id)
|
fID(id),
|
||||||
, fWeight(weight)
|
fWeight(weight),
|
||||||
, fOffset(offset)
|
fOffset(offset),
|
||||||
, fLevel(level)
|
fLevel(level),
|
||||||
, fSelected(false)
|
fSelected(false),
|
||||||
, fMouseOver(false)
|
fMouseOver(false),
|
||||||
, fGroupLayout(new BGroupLayout(B_HORIZONTAL, kLayoutInset))
|
fGroupLayout(new BGroupLayout(B_HORIZONTAL, kLayoutInset))
|
||||||
{
|
{
|
||||||
SetLayout(fGroupLayout);
|
SetLayout(fGroupLayout);
|
||||||
|
|
||||||
@@ -184,10 +185,11 @@ private:
|
|||||||
class DiskView::PartitionLayout : public BDiskDeviceVisitor {
|
class DiskView::PartitionLayout : public BDiskDeviceVisitor {
|
||||||
public:
|
public:
|
||||||
PartitionLayout(BView* view, SpaceIDMap& spaceIDMap)
|
PartitionLayout(BView* view, SpaceIDMap& spaceIDMap)
|
||||||
: fView(view)
|
:
|
||||||
, fViewMap()
|
fView(view),
|
||||||
, fSelectedPartition(-1)
|
fViewMap(),
|
||||||
, fSpaceIDMap(spaceIDMap)
|
fSelectedPartition(-1),
|
||||||
|
fSpaceIDMap(spaceIDMap)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,11 +321,11 @@ public:
|
|||||||
DiskView::DiskView(const BRect& frame, uint32 resizeMode,
|
DiskView::DiskView(const BRect& frame, uint32 resizeMode,
|
||||||
SpaceIDMap& spaceIDMap)
|
SpaceIDMap& spaceIDMap)
|
||||||
: Inherited(frame, "diskview", resizeMode,
|
: Inherited(frame, "diskview", resizeMode,
|
||||||
B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
|
B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE),
|
||||||
, fDiskCount(0)
|
fDiskCount(0),
|
||||||
, fDisk(NULL)
|
fDisk(NULL),
|
||||||
, fSpaceIDMap(spaceIDMap)
|
fSpaceIDMap(spaceIDMap),
|
||||||
, fPartitionLayout(new PartitionLayout(this, fSpaceIDMap))
|
fPartitionLayout(new PartitionLayout(this, fSpaceIDMap))
|
||||||
{
|
{
|
||||||
BGroupLayout* layout = new BGroupLayout(B_HORIZONTAL, kLayoutInset);
|
BGroupLayout* layout = new BGroupLayout(B_HORIZONTAL, kLayoutInset);
|
||||||
SetLayout(layout);
|
SetLayout(layout);
|
||||||
@@ -415,6 +417,7 @@ DiskView::SetDiskCount(int32 count)
|
|||||||
fDiskCount = count;
|
fDiskCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DiskView::SetDisk(BDiskDevice* disk, partition_id selectedPartition)
|
DiskView::SetDisk(BDiskDevice* disk, partition_id selectedPartition)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2007 Haiku Inc. All rights reserved.
|
* Copyright 2002-2009 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
* Ithamar R. Adema <[email protected]>
|
* Ithamar R. Adema <[email protected]>
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "DriveSetup.h"
|
#include "DriveSetup.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
|
||||||
@@ -18,22 +19,10 @@
|
|||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int, char**)
|
|
||||||
{
|
|
||||||
DriveSetup app;
|
|
||||||
app.Run();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
|
||||||
|
|
||||||
|
|
||||||
DriveSetup::DriveSetup()
|
DriveSetup::DriveSetup()
|
||||||
: BApplication("application/x-vnd.Haiku-DriveSetup")
|
: BApplication("application/x-vnd.Haiku-DriveSetup"),
|
||||||
, fWindow(NULL)
|
fWindow(NULL),
|
||||||
, fSettings(0UL)
|
fSettings(0UL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,3 +141,13 @@ DriveSetup::_GetSettingsFile(BFile& file, bool forWriting) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int, char**)
|
||||||
|
{
|
||||||
|
DriveSetup app;
|
||||||
|
app.Run();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Haiku Inc. All rights reserved.
|
* Copyright 2008-2009 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "InitParamsPanel.h"
|
#include "InitParamsPanel.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -27,7 +28,7 @@ class InitParamsPanel::EscapeFilter : public BMessageFilter {
|
|||||||
public:
|
public:
|
||||||
EscapeFilter(InitParamsPanel* target)
|
EscapeFilter(InitParamsPanel* target)
|
||||||
: BMessageFilter(B_ANY_DELIVERY, B_ANY_SOURCE),
|
: BMessageFilter(B_ANY_DELIVERY, B_ANY_SOURCE),
|
||||||
fPanel(target)
|
fPanel(target)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~EscapeFilter()
|
virtual ~EscapeFilter()
|
||||||
@@ -68,15 +69,14 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
InitParamsPanel::InitParamsPanel(BWindow* window)
|
InitParamsPanel::InitParamsPanel(BWindow* window)
|
||||||
: BWindow(BRect(300.0, 200.0, 600.0, 300.0), 0, B_MODAL_WINDOW_LOOK,
|
: BWindow(BRect(300.0, 200.0, 600.0, 300.0), 0, B_MODAL_WINDOW_LOOK,
|
||||||
B_MODAL_SUBSET_WINDOW_FEEL,
|
B_MODAL_SUBSET_WINDOW_FEEL,
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
|
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
, fEscapeFilter(new EscapeFilter(this))
|
fEscapeFilter(new EscapeFilter(this)),
|
||||||
, fExitSemaphore(create_sem(0, "InitParamsPanel exit"))
|
fExitSemaphore(create_sem(0, "InitParamsPanel exit")),
|
||||||
, fWindow(window)
|
fWindow(window),
|
||||||
, fReturnValue(GO_CANCELED)
|
fReturnValue(GO_CANCELED)
|
||||||
{
|
{
|
||||||
AddCommonFilter(fEscapeFilter);
|
AddCommonFilter(fEscapeFilter);
|
||||||
|
|
||||||
@@ -245,9 +245,3 @@ InitParamsPanel::Cancel()
|
|||||||
fReturnValue = GO_CANCELED;
|
fReturnValue = GO_CANCELED;
|
||||||
release_sem(fExitSemaphore);
|
release_sem(fExitSemaphore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 Haiku Inc. All rights reserved.
|
* Copyright 2002-2009 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
* Ithamar R. Adema <[email protected]>
|
* Ithamar R. Adema <[email protected]>
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "DiskView.h"
|
#include "DiskView.h"
|
||||||
#include "InitParamsPanel.h"
|
#include "InitParamsPanel.h"
|
||||||
@@ -37,9 +38,10 @@ class ListPopulatorVisitor : public BDiskDeviceVisitor {
|
|||||||
public:
|
public:
|
||||||
ListPopulatorVisitor(PartitionListView* list, int32& diskCount,
|
ListPopulatorVisitor(PartitionListView* list, int32& diskCount,
|
||||||
SpaceIDMap& spaceIDMap)
|
SpaceIDMap& spaceIDMap)
|
||||||
: fPartitionList(list)
|
:
|
||||||
, fDiskCount(diskCount)
|
fPartitionList(list),
|
||||||
, fSpaceIDMap(spaceIDMap)
|
fDiskCount(diskCount),
|
||||||
|
fSpaceIDMap(spaceIDMap)
|
||||||
{
|
{
|
||||||
fDiskCount = 0;
|
fDiskCount = 0;
|
||||||
fSpaceIDMap.Clear();
|
fSpaceIDMap.Clear();
|
||||||
@@ -145,10 +147,10 @@ enum {
|
|||||||
|
|
||||||
MainWindow::MainWindow(BRect frame)
|
MainWindow::MainWindow(BRect frame)
|
||||||
: BWindow(frame, "DriveSetup", B_DOCUMENT_WINDOW,
|
: BWindow(frame, "DriveSetup", B_DOCUMENT_WINDOW,
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE)
|
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE),
|
||||||
, fCurrentDisk(NULL)
|
fCurrentDisk(NULL),
|
||||||
, fCurrentPartitionID(-1)
|
fCurrentPartitionID(-1),
|
||||||
, fSpaceIDMap()
|
fSpaceIDMap()
|
||||||
{
|
{
|
||||||
BMenuBar* menuBar = new BMenuBar(Bounds(), "root menu");
|
BMenuBar* menuBar = new BMenuBar(Bounds(), "root menu");
|
||||||
|
|
||||||
@@ -161,7 +163,7 @@ MainWindow::MainWindow(BRect frame)
|
|||||||
|
|
||||||
fDeleteMI = new BMenuItem("Delete (not implemented)",
|
fDeleteMI = new BMenuItem("Delete (not implemented)",
|
||||||
new BMessage(MSG_DELETE));
|
new BMessage(MSG_DELETE));
|
||||||
fDeleteMI->SetEnabled(false);
|
fDeleteMI->SetEnabled(false);
|
||||||
|
|
||||||
fMountMI = new BMenuItem("Mount", new BMessage(MSG_MOUNT), 'M');
|
fMountMI = new BMenuItem("Mount", new BMessage(MSG_MOUNT), 'M');
|
||||||
fUnmountMI = new BMenuItem("Unmount", new BMessage(MSG_UNMOUNT), 'U');
|
fUnmountMI = new BMenuItem("Unmount", new BMessage(MSG_UNMOUNT), 'U');
|
||||||
@@ -170,38 +172,37 @@ fDeleteMI->SetEnabled(false);
|
|||||||
|
|
||||||
// Disk menu
|
// Disk menu
|
||||||
fDiskMenu = new BMenu("Disk");
|
fDiskMenu = new BMenu("Disk");
|
||||||
fDiskMenu->AddItem(fFormatMI);
|
fDiskMenu->AddItem(fFormatMI);
|
||||||
fDiskMenu->AddItem(fEjectMI);
|
fDiskMenu->AddItem(fEjectMI);
|
||||||
fDiskMenu->AddItem(fSurfaceTestMI);
|
fDiskMenu->AddItem(fSurfaceTestMI);
|
||||||
|
|
||||||
fDiskMenu->AddSeparatorItem();
|
fDiskMenu->AddSeparatorItem();
|
||||||
|
|
||||||
fDiskMenu->AddItem(fRescanMI);
|
fDiskMenu->AddItem(fRescanMI);
|
||||||
menuBar->AddItem(fDiskMenu);
|
menuBar->AddItem(fDiskMenu);
|
||||||
|
|
||||||
// Parition menu
|
// Parition menu
|
||||||
fPartitionMenu = new BMenu("Partition");
|
fPartitionMenu = new BMenu("Partition");
|
||||||
fCreateMenu = new BMenu("Create (not implemented)");
|
fCreateMenu = new BMenu("Create (not implemented)");
|
||||||
fPartitionMenu->AddItem(fCreateMenu);
|
fPartitionMenu->AddItem(fCreateMenu);
|
||||||
|
|
||||||
fInitMenu = new BMenu("Initialize");
|
fInitMenu = new BMenu("Initialize");
|
||||||
fPartitionMenu->AddItem(fInitMenu);
|
fPartitionMenu->AddItem(fInitMenu);
|
||||||
|
|
||||||
fPartitionMenu->AddItem(fDeleteMI);
|
fPartitionMenu->AddItem(fDeleteMI);
|
||||||
|
|
||||||
fPartitionMenu->AddSeparatorItem();
|
fPartitionMenu->AddSeparatorItem();
|
||||||
|
|
||||||
fPartitionMenu->AddItem(fMountMI);
|
fPartitionMenu->AddItem(fMountMI);
|
||||||
fPartitionMenu->AddItem(fUnmountMI);
|
fPartitionMenu->AddItem(fUnmountMI);
|
||||||
|
|
||||||
fPartitionMenu->AddSeparatorItem();
|
fPartitionMenu->AddSeparatorItem();
|
||||||
|
|
||||||
fPartitionMenu->AddItem(fMountAllMI);
|
fPartitionMenu->AddItem(fMountAllMI);
|
||||||
menuBar->AddItem(fPartitionMenu);
|
menuBar->AddItem(fPartitionMenu);
|
||||||
|
|
||||||
AddChild(menuBar);
|
AddChild(menuBar);
|
||||||
|
|
||||||
|
|
||||||
// add DiskView
|
// add DiskView
|
||||||
BRect r(Bounds());
|
BRect r(Bounds());
|
||||||
r.top = menuBar->Frame().bottom + 1;
|
r.top = menuBar->Frame().bottom + 1;
|
||||||
@@ -221,6 +222,8 @@ fDeleteMI->SetEnabled(false);
|
|||||||
fListView->SetSelectionMessage(new BMessage(MSG_PARTITION_ROW_SELECTED));
|
fListView->SetSelectionMessage(new BMessage(MSG_PARTITION_ROW_SELECTED));
|
||||||
fListView->SetTarget(this);
|
fListView->SetTarget(this);
|
||||||
|
|
||||||
|
BDiskDeviceRoster().StartWatching(this);
|
||||||
|
|
||||||
// populate the Initialiaze menu with the available file systems
|
// populate the Initialiaze menu with the available file systems
|
||||||
_ScanFileSystems();
|
_ScanFileSystems();
|
||||||
|
|
||||||
@@ -231,6 +234,7 @@ fDeleteMI->SetEnabled(false);
|
|||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
|
BDiskDeviceRoster().StopWatching(this);
|
||||||
delete fCurrentDisk;
|
delete fCurrentDisk;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,6 +285,9 @@ MainWindow::MessageReceived(BMessage* message)
|
|||||||
case MSG_SURFACE_TEST:
|
case MSG_SURFACE_TEST:
|
||||||
printf("MSG_SURFACE_TEST\n");
|
printf("MSG_SURFACE_TEST\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// TODO: this could probably be done better!
|
||||||
|
case B_DEVICE_UPDATE:
|
||||||
case MSG_RESCAN:
|
case MSG_RESCAN:
|
||||||
_ScanDrives();
|
_ScanDrives();
|
||||||
break;
|
break;
|
||||||
@@ -482,10 +489,10 @@ MainWindow::_EnabledDisableMenuItems(BDiskDevice* disk,
|
|||||||
fPartitionMenu->SetEnabled(false);
|
fPartitionMenu->SetEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
// fFormatMI->SetEnabled(true);
|
// fFormatMI->SetEnabled(true);
|
||||||
fFormatMI->SetEnabled(false);
|
fFormatMI->SetEnabled(false);
|
||||||
fEjectMI->SetEnabled(disk->IsRemovableMedia());
|
fEjectMI->SetEnabled(disk->IsRemovableMedia());
|
||||||
// fSurfaceTestMI->SetEnabled(true);
|
// fSurfaceTestMI->SetEnabled(true);
|
||||||
fSurfaceTestMI->SetEnabled(false);
|
fSurfaceTestMI->SetEnabled(false);
|
||||||
|
|
||||||
// Create menu and items
|
// Create menu and items
|
||||||
fPartitionMenu->SetEnabled(true);
|
fPartitionMenu->SetEnabled(true);
|
||||||
@@ -524,7 +531,7 @@ fSurfaceTestMI->SetEnabled(false);
|
|||||||
if (partition) {
|
if (partition) {
|
||||||
fInitMenu->SetEnabled(!partition->IsMounted());
|
fInitMenu->SetEnabled(!partition->IsMounted());
|
||||||
// fDeleteMI->SetEnabled(!partition->IsMounted());
|
// fDeleteMI->SetEnabled(!partition->IsMounted());
|
||||||
fDeleteMI->SetEnabled(false);
|
fDeleteMI->SetEnabled(false);
|
||||||
fMountMI->SetEnabled(!partition->IsMounted());
|
fMountMI->SetEnabled(!partition->IsMounted());
|
||||||
|
|
||||||
bool unMountable = false;
|
bool unMountable = false;
|
||||||
@@ -659,8 +666,9 @@ MainWindow::_MountAll()
|
|||||||
class ModificationPreparer {
|
class ModificationPreparer {
|
||||||
public:
|
public:
|
||||||
ModificationPreparer(BDiskDevice* disk)
|
ModificationPreparer(BDiskDevice* disk)
|
||||||
: fDisk(disk)
|
:
|
||||||
, fModificationStatus(fDisk->PrepareModifications())
|
fDisk(disk),
|
||||||
|
fModificationStatus(fDisk->PrepareModifications())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
~ModificationPreparer()
|
~ModificationPreparer()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006-2008 Haiku Inc. All rights reserved.
|
* Copyright 2006-2009 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
|
|
||||||
BBitmapStringField::BBitmapStringField(BBitmap* bitmap, const char* string)
|
BBitmapStringField::BBitmapStringField(BBitmap* bitmap, const char* string)
|
||||||
: Inherited(string)
|
: Inherited(string),
|
||||||
, fBitmap(bitmap)
|
fBitmap(bitmap)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,11 +178,11 @@ enum {
|
|||||||
|
|
||||||
|
|
||||||
PartitionListRow::PartitionListRow(BPartition* partition)
|
PartitionListRow::PartitionListRow(BPartition* partition)
|
||||||
: Inherited()
|
: Inherited(),
|
||||||
, fPartitionID(partition->ID())
|
fPartitionID(partition->ID()),
|
||||||
, fParentID(partition->Parent() ? partition->Parent()->ID() : -1)
|
fParentID(partition->Parent() ? partition->Parent()->ID() : -1),
|
||||||
, fOffset(partition->Offset())
|
fOffset(partition->Offset()),
|
||||||
, fSize(partition->Size())
|
fSize(partition->Size())
|
||||||
{
|
{
|
||||||
BPath path;
|
BPath path;
|
||||||
partition->GetPath(&path);
|
partition->GetPath(&path);
|
||||||
@@ -221,11 +221,11 @@ PartitionListRow::PartitionListRow(BPartition* partition)
|
|||||||
|
|
||||||
PartitionListRow::PartitionListRow(partition_id parentID, partition_id id,
|
PartitionListRow::PartitionListRow(partition_id parentID, partition_id id,
|
||||||
off_t offset, off_t size)
|
off_t offset, off_t size)
|
||||||
: Inherited()
|
: Inherited(),
|
||||||
, fPartitionID(id)
|
fPartitionID(id),
|
||||||
, fParentID(parentID)
|
fParentID(parentID),
|
||||||
, fOffset(offset)
|
fOffset(offset),
|
||||||
, fSize(size)
|
fSize(size)
|
||||||
{
|
{
|
||||||
// TODO: design icon for spaces on partitions
|
// TODO: design icon for spaces on partitions
|
||||||
SetField(new BBitmapStringField(NULL, "-"), kDeviceColumn);
|
SetField(new BBitmapStringField(NULL, "-"), kDeviceColumn);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2007 Haiku Inc. All rights reserved.
|
* Copyright 2002-2009 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
* Ithamar R. Adema <[email protected]>
|
* Ithamar R. Adema <[email protected]>
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Support.h"
|
#include "Support.h"
|
||||||
|
|
||||||
#include <Partition.h>
|
#include <Partition.h>
|
||||||
@@ -78,11 +79,12 @@ is_valid_partitionable_space(size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -SpaceIDMap
|
// #pragma mark - SpaceIDMap
|
||||||
|
|
||||||
|
|
||||||
SpaceIDMap::SpaceIDMap()
|
SpaceIDMap::SpaceIDMap()
|
||||||
: HashMap<HashString, partition_id>()
|
: HashMap<HashString, partition_id>(),
|
||||||
, fNextSpaceID(-2)
|
fNextSpaceID(-2)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,4 +109,3 @@ SpaceIDMap::SpaceIDFor(partition_id parentID, off_t spaceOffset)
|
|||||||
return newID;
|
return newID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user