« Return to Thread: "turn on" GtkSourceView feature

"turn on" GtkSourceView feature

by kksou :: Rate this Message:

Reply to Author | View in Thread

Hi,

In case you want to use GtkSourceView to display source codes with automatic numbering and syntax highlighting, take note that the SourceView classes is an extension of php-gtk2, and some setting needs to be done to "turn on" this feature.

Here's a quick summary:
- Edit php.ini
php-gtk.extensions = php_gtk_libglade2.dll, php_gtk_sourceview2.dll

- Download a copy of language-specs from
http://gtksourceview.sourceforge.net/downloads.html

- Location of the language-specs file:
C:\Documents and Settings\<username>\.gnome2\gtksourceview-1.0\language-specs

Details and a sample code to test the SourceView classes can be found here:
http://www.kksou.com/php-gtk2/articles/use-GtkSourceView-to-display-source-code---Part-1.php

The above took me one whole night to figure out! Hope will save some of you some time...

Regards,
/kksou

 « Return to Thread: "turn on" GtkSourceView feature