Tuesday, September 30, 2008

Syntax coloring

Recently I was contacted by Gerhard Kalab with a wish to support syntax coloring in Notecase. We discussed the idea and the possible implementation, but since I didn't have much time, he implemented this himself.

You can find the sources here. This is a patched notecase v1.9.5 using GtkSourceView instead of the standard GtkTextView as a text displaying widget.

The bad news is that the GtkSourceView crashes when trying to apply the syntax coloring to a note that contains the pictures.

Hopefully, the future versions of this library will have this bug fixed, and the notecase will have both syntax coloring and a margin with line numbers implemented (supported by a new widget library).

Thanks Gerhard for your work!

3 comments:

Giuseppe (Italy) said...

Hi and first of all thanks for the great notecase.
I can't understand if what u write here is correlated with the problem that me and my friends have: when we use coloured text, the colors turn back to black (=no color) the next time that we open notecase.
Hope this will be fixed because coloured text is very helpful.

Adriatic said...

Hi Giuseppe,
I'm glad you like notecase.

The actual post is not related to your issue (it speaks of possible fetaure of automatic "syntax coloring").

I am interested if you can describe the problem in detail, step by step.

I've just tried colored text and it worked fine for me. After saving the file and loading the document back from file, the colors where still there.

Giuseppe (Italy) said...

I will do some testing and write on your mail about this later.
I just advance that we are running notecase 1.9.5 on Windows XP.
Greetings to all notecase lovers :)