[sugar] [PATCH] Journal able to use "open with" for activity bundles

Jameson "Chema" Quinn jquinn
Tue Jun 10 16:13:37 EDT 2008


On Tue, Jun 10, 2008 at 12:21 PM, Eben Eliason <eben.eliason at gmail.com>
wrote:

> On Tue, Jun 10, 2008 at 2:16 PM, Jameson Chema Quinn
> <jquinn at cs.oberlin.edu> wrote:
> > This change fixes a bug: journal is unable to do anything but "start" a
> > bundle, even if you have an activity (Develop) which can handle the
> activity
> > bundle mime type.
>
> Right, this merits the possible addition of a "Start as" (wording?) type
> menu.
>
> > The immediate question is: should "start" be available only by pressing
> the
> > button, or should it also be an option in the pulldown? I think that the
> > answer is an obvious yes.
>
> I'm stating that "Start" is /already/ an option in the pulldown, so
> what's the point of argument?


This is the details view pulldow. Look at the patch:

-
-        if not self._jobject.is_activity_bundle():
-            for activity in self._jobject.get_activities():
-                menu_item = MenuItem(activity.name)
-                menu_item.set_image(Icon(file=activity.icon,
icon_size=gtk.ICON_SIZE_MENU))
-                menu_item.connect('activate',
self._resume_menu_item_activate_cb,
-                                  activity.bundle_id)
-                palette.menu.append(menu_item)
-                menu_item.show()
+
+        if self._jobject.is_activity_bundle():
+            menu_item = MenuItem(_('Start'))
+            menu_item.connect('activate',
self._resume_menu_item_activate_cb,
+                              None)
+            palette.menu.append(menu_item)
+            menu_item.show()
+        activities = self._jobject.get_activities()
+        for activity in activities:
+            menu_item = MenuItem(activity.name)
+            menu_item.set_image(Icon(file=activity.icon,
icon_size=gtk.ICON_SIZE_MENU))
+            menu_item.connect('activate',
self._resume_menu_item_activate_cb,
+                              activity.bundle_id)
+            palette.menu.append(menu_item)
+            menu_item.show()

Instead of only constructing a pulldown for non-activity-bundles, it does
one for both. It first includes an option to "start" for activity bundles,
then continues with the normal logic which gives options of all activities
which handle the relevant MIME.

I submit that this should not be controversial, that the controversy here
comes from misunderstanding.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20080610/d6745d90/attachment.htm 



More information about the Sugar-devel mailing list