[Sugar-devel] [API proposal] Source editor and widget
tomeu at sugarlabs.org
Wed Jul 15 10:58:28 EDT 2009
On Mon, Jul 13, 2009 at 19:09, Lucian Branescu<lucian.branescu at gmail.com> wrote:
> I've attached a file with a SourceView class.
I'm still a bit unsure about the convenience of adding this code to
sugar-toolkit. It's quite trivial code and the API we add to
sugar-toolkit should be more or less stable (though we aren't yet
promising a stable API).
The code you are attaching basically preconfigures gtk.SourceView2 and
adds a little bit of code to set the language. Maybe this would be
more appropriate as a snippet in the Sugar Almanac?
> I'll try to write up a FilesView class as well, since 3 of the 4
> aforementioned use cases do something like this.
> 2009/7/13 Tomeu Vizoso <tomeu at sugarlabs.org>:
>> On Mon, Jul 13, 2009 at 18:09, Lucian Branescu<lucian.branescu at gmail.com> 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.
>> May be better if you first code your new stuff and then we discuss
>> about merging it in the sugar-toolkit? viewsource.py doesn't add too
>> much around gtksourceview2.View itself, so you may end up with more
>> differences than similarities with viewsource.py.
>>> 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.
>>> Sugar-devel mailing list
>>> Sugar-devel at lists.sugarlabs.org
More information about the Sugar-devel