[Sugar-devel] [API proposal] Source editor and widget

Lucian Branescu lucian.branescu at gmail.com
Wed Jul 15 10:23:43 EDT 2009


I'm proposing the addition of a general widget that could be used in
many places(Pippy, View Source, my Browse branch). In fact, it is
partly based on View Source code. I figured it would be a good idea to
not have all this code duplication.


For my project's needs (editing Userstyles and Userscripts), I could
use View Source, but besides being read-only, it also can only open
one document from the activity.
I would want Browse's view source to show the loaded html, one user
stylesheed and a folder of userscripts. Only things in the 'document'
view would be editable, not in the 'bundle' view.

2009/7/15 Simon Schampijer <simon at schampijer.de>:
> On 07/13/2009 06:09 PM, Lucian Branescu wrote:
>>
>> I'm proposing the addition of sugar.graphics.sourceedit.SourceView. It
>> would be similar to what can be found in jarabe.view.viewsource. Exact
>> names of classes and/or module are up for debate.
>>
>> I'm also thinking of adding a FileView class in there, but I'm not
>> sure about it.
>>
>>
>> I've already seen almost the exact same code in Pippy and
>> viewsource.py; now I'm writing almost the same code in my branch of
>> Browse and it could be a base for the proposed Clipboard text editor
>> (http://wiki.sugarlabs.org/go/Features/Edit-panel-on-Frame). Thus, I
>> believe it's a common enough need.
>
> Hi Lucian,
>
> I have seen your feature request. Did you consider using the view source dialog and adding the save functionality there? http://dev.sugarlabs.org/ticket/803#comment:3
>
> At least that was an obvious place to add such functionality for me.
>
> Regards,
>   Simon
>


More information about the Sugar-devel mailing list