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

Tomeu Vizoso tomeu
Mon Apr 21 12:18:26 EDT 2008


Hi,

+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.

+    def _data_store_deleted_cb(self, uid):
+        self._show_main_view()

Hmm, so we are going to switch to the main view every time that an
object in the DS is deleted? If an activity decided to delete an
object, the journal would switch to the main view and that would
confuse the user. May be better to handle this at the UI level,
without going to the model. The UI elements that trigger the deletion
may inform the UI element capable of switching views that a deletion
happened.

After writing the last paragraph, perhaps easiest and best would be to
keep listening the DS like you are doing, but only switch to the main
view if the jobject deleted is the one we are displaying the detail
of.

+        """
+        menu_item = MenuItem(_('Start with'), 'activity-start')
+        menu_item.props.sensitive = False
+        #menu_item.connect('activate', self.__start_with_activate_cb)
+        self.menu.append(menu_item)
+        menu_item.show()
+        """

As this code doesn't bring much new and is unused, may be better to
not commit it for now. A TODO comment may make more sense.

Nice patch, and not too long nor too short. Please keep them like this.

Thanks,

Tomeu



More information about the Sugar-devel mailing list