[sugar] 9.1 proposal: View source key everywhere

Walter Bender walter.bender
Thu Oct 23 09:13:41 EDT 2008


I think that any activity that goes to the trouble of building their
own view source mechanism can handle the added overhead of adding a
line to the activity.info file. Seems like that is the easiest path.
Doesn't it have any negative repercussions in the long term?

-walter

On Thu, Oct 23, 2008 at 8:53 AM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> Hi,
>
> I think that with a small effort, we could implement something much
> better than what we have today.
>
> We have glorious plans for the view source key, but as no resources
> have been devoted to them, perhaps we should scale back and make sure
> that we provide the best we can today. And let the future deal with
> the dreams.
>
> Have hacked a quick way of displaying the contents of the currently
> active activity bundle, along with displaying the source code if the
> activity ships its source inside the bundle.
>
> Screenshot of Implode's source: http://dev.laptop.org/~tomeu/viewsource.png
>
> The approach I have followed is installing a global keybinding that is
> handled in the shell. If you want to try it, it's a matter of dropping
> the file in the url below into
> ~/sugar-jhbuild/install/share/sugar/extensions/globalkey, if you have
> a recent enough sugar-jhbuild.
>
> http://dev.laptop.org/~tomeu/viewsource.py
>
> This approach has a good thing that is that works everywhere, but has
> a major problem: doesn't let activities override it and handle
> themselves the view source key event. This is very bad for activities
> like Etoys, the ones produced by Pippy or activities that would prefer
> to display the source code for the _content_ loaded in that moment
> (Browse).
>
> Alternative 1: Move it to sugar-toolkit, would be available to all
> python activities, and activities would be able to override it easily.
> Inconvenient: non-python activities wouldn't benefit from it.
>
> Alternative 2: Add a mechanism for the shell to know if an activity
> wishes to provide its own view source window. It could be done by
> adding one more D-Bus method or by adding one more property to
> activity.info. Inconvenient: adds complexity to activity development.
>
> Opinions?
>
> Thanks,
>
> Tomeu
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org



More information about the Sugar-devel mailing list