I've just checked in a fix for bug 5386 that changes the meaning of
mine/notMine
Before, all items and collections were 'mine' by default - their very
existence made them appear in the 'all' collection and you have to
explicitly label them as 'not-Mine' to keep them out.
That logic has now been reversed: items and collections are not in
"mine" until you explicitly do one of the following:
1) add the item's collection to 'mine.sources' by calling
schema.ns('osaf.pim', view).addSource(collection)
2) add the item explicitly to the allCollection's inclusions via
schema.ns('osaf.pim', view).allCollection.add(collection)
This make a number of things clearer, including the fact that mine-ness
now overrides not-Mine-ness - so if you have an item in a not-Mine
collection and you add it to a Mine collection, the item will still show
up in "My Items"/"all" On top of this, there is no explicit not-Mine
collection. This means:
3) if you want to test if a collection is mine, check 'collection in
mine.sources'
4) if you want to test if an item is mine, check 'item in allCollection'
(3 and 4 related respectively to the 1 and 2)
One nice implication of all of this is that 'mine' is now closely
related to Mimi's idea of a 'Sphere' but there are some specifics about
the implementation that may vary from the real Sphere idea.
In reality, the design notion of the 'sphere' is the combination of 1)
and 2), and not the 'mine' collection itself.
This also means that an item is never explicitly excluded from the
'mine' collection, instead it is simply never added. This means that:
a) an item can appear in 'mine' by nature of its membership in another
collection but..
b) an item can be explicitly excluded from being in allCollection by
being added to the allCollection's exclusions list.
I know, its a bit confusing, but I think this gives us more flexibility
to represent the kind of mine-ness that the design requires.
Alec
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev