According to the documentation, I can change the internal ‘GtkTextTag’ of the ‘GtkSourceBuffer’ style, using the ‘gtk_source_style_apply’ method
gtk_source_style_apply
This function modifies theGtkTextTag
properties that are related to theGtkSourceStyle
properties. OtherGtkTextTag
properties are left untouched.
For example, I am trying to change the style of ‘line-numbers’, but no change occurs.
if ((scheme = gtk_source_buffer_get_style_scheme(buffer))) {
if ((style = gtk_source_style_scheme_get_style(scheme, "line-numbers"))) {
g_object_set(n_selection,
"paragraph-background", NULL,
"background", NULL,
"foreground", NULL,
"paragraph-background-set", FALSE,
"background-set", FALSE,
"foreground-set", FALSE,
NULL);
gtk_source_style_apply(style, n_selection);
g_print("line-numbers style Apply!\n");
}
}
I also tried with the style of ‘search-match’ and ‘text’. But nothing happens, everything is seen in the standard way.
I would appreciate more information. Cheers