[Geany-Devel] A direction for Geany
Thomas Martitz
thomas.martitz at xxxxx
Mon Nov 11 10:42:28 UTC 2013
Am 11.11.2013 10:31, schrieb Matthew Brush:
>
> 5. Drop Scintilla and use GtkSourceView. I'll just enumerate the
> reasons that come to mind, in no particular order:
>
> * Scintilla is a big fat not-really-GTK+ C++ library
> * We have to keep a fork up-to-date in our source tree
> * It provides one of worst APIs known to man, and causes us to have
> all kinds of wrappers to make the API normal and to have our code
> still littered with unsafe SSM() calls that make the code really weird.
> * Limited functionality to support plugins participating in the
> buffer/view; for example there's only a really small number of
> indicators, markers, pixmaps, etc. It's not really built with
> arbitrary extension (ex. by plugins) in mind.
> * It makes simple things like MVC hard to do with the way its user API
> is so view-centric.
> * While it supports background loading, it doesn't support
> background/async lexing, and so completely blocks the UI for huge
> documents.
> * Writing lexers is beyond complicated. Having to write C++ code to
> add/customize syntax highlighting is insane from a user POV.
> * Has no builtin support for colour schemes making us have to have a
> whole, kind of confusing, configuration file system to provide it
> ourselves.
> * Reduce Geany's binary size since the editor component would be
> linked dynamically, and not statically like Scintilla is. I don't know
> if this actually matters but I think Scintilla with all the lexers and
> stuff I think it can end up as several MB in the binary.
> * As with above, and the one about updating the fork; using a
> dynamically linked version allows the system admin to upgrade their
> libraries and they'll automatically be used by Geany.
> * Drop dependency on a C++ compiler. This isn't a big deal really. And
> of course replace with a new dependency on gtksourceview library.
> * GtkSourceView provides convenient features like SourceCompletion and
> SourceMarks and such that would make doing stuff from plugins quite
> straightforward.
> * GtkSourceView completely integrates into our GUI toolkit, using
> native (not custom drawn like Scintilla) widgets inside and interacts
> properly with stuff like scrolling, focus, DnD, key-bindings, etc.
With ScintillaGTK it also interacts properly, doesn't it? It impements
GtkWidget and can act as such.
> * If we ever do use GObject stuff more and/or make the plugin API
> automatically bindable with GObject-Introspection, GtkSourceView
> already provides the .gir stuff needed.
> * I think GtkSourceView is installed by default usually with at least
> GNOME and XFCE (via Gedit and Mousepad using it and being the
> "default" text editors).
>
>
All of these points read like whine. Some of them also apply to
GtkSourceView (GSV) and you haven't shown how GSV improves things. I can
read that you don't like Scintilla but how is GSV better and what do we
gain? Perhaps you could summarize the nice things about GSV? Note that I
have done nothing with it and therefore no idea how it works or what
APIs it provides. But I also do not know why you would chose it over
Scintilla or even convert an existing Scintilla-based project to it.
Best regards.
More information about the Devel
mailing list