We need flags to track what properties of the partition change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22609 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
77f02aaead
commit
013e7894b7
@ -66,6 +66,9 @@ public:
|
||||
int32 CountChildren() const;
|
||||
int32 IndexOfChild(BMutablePartition* child) const;
|
||||
|
||||
void SetChangeFlags(uint32 flags);
|
||||
uint32 ChangeFlags() const;
|
||||
|
||||
// for the partitioning system managing the parent
|
||||
void* ChildCookie() const;
|
||||
void SetChildCookie(void* cookie);
|
||||
@ -89,6 +92,7 @@ private:
|
||||
user_partition_data* fData;
|
||||
BMutablePartition* fParent;
|
||||
BList fChildren;
|
||||
uint32 fChangeFlags;
|
||||
void* fChildCookie;
|
||||
};
|
||||
|
||||
|
@ -321,7 +321,10 @@ BMutablePartition::DeleteChild(int32 index)
|
||||
if (!child)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
delete child->fDelegate->Partition();
|
||||
// This will delete not only all delegates in the child's hierarchy, but
|
||||
// also the respective partitions themselves, if they are no longer
|
||||
// referenced.
|
||||
child->fDelegate->Partition()->_DeleteDelegates();
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
@ -369,6 +372,22 @@ BMutablePartition::IndexOfChild(BMutablePartition* child) const
|
||||
}
|
||||
|
||||
|
||||
// SetChangeFlags
|
||||
void
|
||||
BMutablePartition::SetChangeFlags(uint32 flags)
|
||||
{
|
||||
fChangeFlags = flags;
|
||||
}
|
||||
|
||||
|
||||
// ChangeFlags
|
||||
uint32
|
||||
BMutablePartition::ChangeFlags() const
|
||||
{
|
||||
return fChangeFlags;
|
||||
}
|
||||
|
||||
|
||||
// ChildCookie
|
||||
void*
|
||||
BMutablePartition::ChildCookie() const
|
||||
@ -390,6 +409,7 @@ BMutablePartition::BMutablePartition(BPartition::Delegate* delegate)
|
||||
: fDelegate(delegate),
|
||||
fData(NULL),
|
||||
fParent(NULL),
|
||||
fChangeFlags(0),
|
||||
fChildCookie(NULL)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user