Team,<br><br>Thank you. Appreciate your feedback.<br>I have revised the patch which restores its existing behavior for bundles and have incorporated Frederick's idea of having a common and an understandable English wording.<br>
<br><span dir="ltr" id=":u6"></span><a href="http://lists.sugarlabs.org/archive/sugar-devel/2010-October/027925.html">http://lists.sugarlabs.org/archive/sugar-devel/2010-October/027925.html</a><br><br>Looking forward to your feedback.<br>
<br>Regards,<br><br>Mukul Gupta<br><div class="gmail_quote">On Fri, Oct 15, 2010 at 8:03 PM, Aleksey Lim <span dir="ltr"><<a href="mailto:alsroot@member.fsf.org">alsroot@member.fsf.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Fri, Oct 15, 2010 at 04:19:43PM +0530, Mukul Gupta wrote:<br>
> The patch disables the Start and Start With menu items for files<br>
> which can't be opened by any installed activity and instead<br>
> replace it with a hover dropdown with a menu item 'No activity<br>
> installed to start entry'<br>
> ---<br>
> src/jarabe/journal/palettes.py | 38 +++++++++++++++++++++++---------------<br>
> 1 files changed, 23 insertions(+), 15 deletions(-)<br>
><br>
> v1->v2: Patch remade as per pep8 standards<br>
><br>
> diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py<br>
> index 7c3e5ff..2ab93fe 100644<br>
> --- a/src/jarabe/journal/palettes.py<br>
> +++ b/src/jarabe/journal/palettes.py<br>
> @@ -62,22 +62,30 @@ class ObjectPalette(Palette):<br>
> Palette.__init__(self, primary_text=title,<br>
> icon=activity_icon)<br>
><br>
> - if metadata.get('activity_id', ''):<br>
> - resume_label = _('Resume')<br>
> - resume_with_label = _('Resume with')<br>
> - else:<br>
> - resume_label = _('Start')<br>
> - resume_with_label = _('Start with')<br>
> - menu_item = MenuItem(resume_label, 'activity-start')<br>
> - menu_item.connect('activate', self.__start_activate_cb)<br>
> - self.menu.append(menu_item)<br>
> - menu_item.show()<br>
<br>
> + if misc.get_activities(metadata):<br>
</div></div>There is an issue. For bundles, it will change existed beahviour<br>
(click on bundles, .xo and .xol, sugar install/start it), you need to<br>
check for bundles as well (misc.is_*_bundle).<br>
<div><div></div><div class="h5"><br>
> + if metadata.get('activity_id', ''):<br>
> + resume_label = _('Resume')<br>
> + resume_with_label = _('Resume with')<br>
> + else:<br>
> + resume_label = _('Start')<br>
> + resume_with_label = _('Start with')<br>
> + menu_item = MenuItem(resume_label, 'activity-start')<br>
> + menu_item.connect('activate', self.__start_activate_cb)<br>
> + self.menu.append(menu_item)<br>
> + menu_item.show()<br>
><br>
> - menu_item = MenuItem(resume_with_label, 'activity-start')<br>
> - self.menu.append(menu_item)<br>
> - menu_item.show()<br>
> - start_with_menu = StartWithMenu(self._metadata)<br>
> - menu_item.set_submenu(start_with_menu)<br>
> + menu_item = MenuItem(resume_with_label, 'activity-start')<br>
> + self.menu.append(menu_item)<br>
> + menu_item.show()<br>
> + start_with_menu = StartWithMenu(self._metadata)<br>
> + menu_item.set_submenu(start_with_menu)<br>
> +<br>
> + else:<br>
> + resume_label = _('No activity installed to start entry')<br>
> + menu_item = MenuItem(resume_label)<br>
> + menu_item.set_sensitive(False)<br>
> + self.menu.append(menu_item)<br>
> + menu_item.show()<br>
><br>
> client = gconf.client_get_default()<br>
> color = XoColor(client.get_string('/desktop/sugar/user/color'))<br>
> --<br>
> 1.7.0.4<br>
><br>
<br>
</div></div>--<br>
<font color="#888888">Aleksey<br>
</font></blockquote></div><br>