gtksourceview

Determining the mime type of a file

How can I determine the mime-type of a file (in OCaml)? I am trying to set the language for a GtkSourceView control, but to do that, I need to first determine the language. The only way I can see of doing this is using the mime-type - there is a function that will return the correct language as follows: GSourceView.source_languages_ma...

What has to be Glib::init()'ed in order to use Glib::wrap?

So I'm trying to make use of a GtkSourceView in C++ using GtkSourceViewmm, whose documentation and level of support give me the impression that it hasn't been very carefully looked at in a long time. But I'm always an optimist :) I'm trying to add a SourceView using some code similar to the following: Glib::RefPtr<gtksourceview::Sourc...

Add a new language to gtksourceview (Django's template language for gedit)

Edit: I found the problem : in another context, there was a % in a regexp, so the %} was not interpreted. Hello ! I got a problem to add a new language to gtksourceview (used by gedit). I want to add the Django's template language and something does not work : I am not able to make %} stop the syntactic coloring. Here is a snippet : ...

How to make basic code autocompletion?

Hello :) I'm making simple code editor in GTK and gtksourceview2.0. I would like to add to my editor a code completion window. There should be 10-15 keywords (always the same). Can anyone could give me url for some tutorials or describe usage of gtk_source_completion_XXX functions? ...