[sugar] [Patch] Add palettes to people and objects in Journal

Tomeu Vizoso tomeu
Mon Apr 21 13:24:07 EDT 2008


On Mon, Apr 21, 2008 at 7:20 PM, Eben Eliason <eben.eliason at gmail.com> wrote:
> >  +from palettes import JobjectPalette, BuddyPalette
>  >
>  >  What about EntryPalette instead of JobjectPalette? An entry in the
>  >  journal is the UI representation of a datastore object/
>  >
>  >          self._jobject = None
>  >  +        self._jobject_palette = None
>  >
>  >  Same here, _jobject is the data, CollapsedEntry is one of the UI views
>  >  of this data. I would call it _palette instead of _jobject_palette.
>
>  Well, that's not actually accurate.  See, the Collapsed entry is a
>  "container" for the entry, which contains various details about it.
>  The palette is specifically attached to the "object" itself, and not
>  the entry.  Consider, for instance, an entry (in the future) with
>  several objects in it.  Consider also, in the current design, that a
>  single entry may also have several people icons (and palettes)
>  attached to it. We need to make it clear that the palette belongs to
>  the icon/object and not the entry as a whole.
>
>  I chose JobjectPalette and BuddyPalette since a) it seems like the
>  most direct mapping and b) these are also the classes of object that
>  they take as arguments to the constructor.

I see. I would prefer ObjectPalette then. a) is the right reason but
b) shouldn't affect the name of the class.

Thanks,

Tomeu



More information about the Sugar-devel mailing list