[Sugar-devel] View source redesign

Tomeu Vizoso tomeu at sugarlabs.org
Fri Dec 5 07:32:36 EST 2008


On Wed, Dec 3, 2008 at 7:54 PM, Jameson Quinn <jameson.quinn at gmail.com> wrote:
> I am in the process of writing a patch to make the view source key extension
> able to open source in an appropriate activity. The basic scheme is:
>
> user presses view source
> extension asks activity (over dbus) if it wants to handle this one by itself
> if not, it asks activity if there is a local document it wants to give as a
> source option. activity replies with mime type, path, title, and human
> readable flag (whether to try to show it in the window)
> extension brings up a window, which has buttons at top for activity and
> document
> those buttons show the thing in the window (if possible). If path is a file,
> the file; if it is a dir, a list view/ file viewer combo.
> Dropdowns from these buttons allow you to open the {activity, document} in
> external editor which handles the mime type
> If path is a dir and external editor is launched, extension asks current
> activity to bundle it up for the external activity, and gets back a jobject
> id.
>
> My one question is whether there will ever be a case where an activity will
> want to give the option to see two or more different kinds of "source"
> besides the activity source. I think not; I think one "document" at a time
> is plenty.
>
> As an example: if you're in basicbrowse activity, you press view source, you
> have option of seeing python source of basicbrowse, or html of current page.
> If you're in superbrowse, you get options of seeing superbrowse source or (a
> bundle with html, css, svg, gif, jpg, subframe html, etc.). I think making
> each of those things available separately as independent entities just leads
> to a more complicated API for activity programmers with nearly no real gain.
> Do others agree?

I agree with all that, though would like to see comments about the
user experience, specially from Eben.

Thanks,

Tomeu


More information about the Sugar-devel mailing list