GtkSourceView 2: how to define a style on the fly?
Albrecht Dreß <[email protected]>
| Newsgroups | gmane.comp.gnome.devtools |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have a dumb question related to defining new styles in GtkSourceView
2. The Language Definition reference says for the "style" tag:
<quote>
map-to (optional)
[...]When omitted the style is not considered derived from any style
and will be not highlighted until the user specifies a color scheme for
this style.</quote>
Well, how can I map the style in my application? As an example, I
define a lang file which contains the statement
<style id="my-style" _name="My special style">
which is used for a "content" in the lang file, and in the application
this lang file is assigned to the buffer using
gtk_source_buffer_set_language().
How can I access this style in the application to set the properties
e.g. from user prefs? It is not accessible through the
GtkSourceStyleScheme returned from the buffer. What did I miss here?
Any help is welcome!
Cheers, Albrecht.
--
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn
(Germany)
Phone (+49) 228 6199571 - mailto:[email protected]
GnuPG public key: http://www.mynetcologne.de/~nc-dreszal/pubkey.asc
_______________________________________________
gnome-devtools mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devtools
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQBHZWJjn/9unNAn/9ERAmtNAJ46B0EdMdi77e3abjDlxHB6WmrgRACfTRzw Ab+29p2Fpa4GFTBTmePJWiA= =FObS -----END PGP SIGNATURE-----