[Geany-devel] Changing from scintilla to gtksourceview or scintilla over gtksourceview
enrico.troeger at xxxxx
Mon Dec 28 13:16:48 UTC 2009
On Sat, 26 Dec 2009 14:33:01 +0300, Денис wrote:
>In last 3 weeks i've in development of new plugin-wrapper of geany
>plugin-api for python. Main idea - ability to write plugins in python
>with pygtk and mini-abstract level for geany structures.
>I've encountered with problem. I need to build bridge and for
>scintilla, but python have only 3 wrappers: pyscintilla(rip in <2004),
I think writing a Scintilla wrapper in Python isn't necessary or at
least it is a bit overkill. It should be enough to simply provide the
scintilla_send_message() function of the Geany plugin API. This
function is quite generic and can be used to call each Scintilla
function. The only thing you need to do is to provide the list of the
message names (SCI_*).
I agree that a full wrapper API would be nicer and would feel more
pythonic but still we don't even have this in C (in Geany we have
sciwrappers.c which wraps a small part of the API, mostly calls we
need often or where a small part of converting/logic is necessary).
>write good and usefull mini-engine. And i trying to google information
>about this question. I found many mails in lists, where talking about
>scintilla and gtksource view. Main thing - scintilla is going to be
>RIP'd, cuz development rate too small and community, who interests in
IMO this is not an argument at all. Scintilla is not dead, it is
actively not developed and recently it reached version 2.0 which
supports multiple selection and virtual space (though we don't use it
yet in Geany but this will happen soon).
>this library, very small. Best way - use gtksourceview, becouse it now
>(in 2.9) have got all necessary functionality and going to be best
>widget for source editor. As i think, now need to start moving onto
>gtksourceview as parallel work with 0.19. And at 0.20 fully go to
It's not that easy.
Impulsively, I see two main problems:
a) You mention "in 2.9" which is not yet stable or at least very new.
In Geany, we try to be backwards compatible where it is possible, e.g.
the minimum requirement for GTK is 2.8 while 2.18 is recent. Using a
very new GtkSourceView would exclude (and in the long turn
probably loose) lots of users who can't or don't want to update their
b) It's not that easy to simply exchange the editing component. Geany
and Scintilla are quite linked to each other (well, Geany to
Scintilla, not the other way round). Changing would mean we would need
to introduce a new wrapper which abstracts the actual API of the
editing component from Geany. And then, Scintilla has a different
concept for syntax highlighting than GtkSourceView which would make it
even harder, also regarding compatibility of config files.
>At the end, gtksourceview is "native" to gtk+, unlike to scintilla.
This is not true.
Scintilla is "native to GTK". It's just the API which works like
the Windows message stuff. Anyway, Scintilla provides a native GTK
It's not worth changing it especially if the features we need are only
available in a yet unstable, non-released version of GtkSourceView.
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the Devel