Comment 8 for bug 318517

Revision history for this message
Timothy Arceri (t-fridey) wrote :

The following is copied from the Upstream Bug:

Ignacio Casal Quinteiro (nacho) [gtksourceview developer] 2012-12-04 17:15:42 UTC

Here are some find outs from a quick research that I made today.
First of all we need to touch almost all the layers to have this working, so if
somebody is brave enough to make it here are the steps:

1) Get the size of a tab "\t" from the gtktextlayout.c. For this we can either
check if there is a way to get it from the pango layout or we could as well
move the tab-width property from GtkSourceView to GtkTextView.

2) From the gtktextlayout.c we need to detect the indentation of the paragraph,
counting the number of tabs and get the size in a pango scale.

3) For that layout we need to set the indentation level for the wrapped text.
For this we can already do it by setting a negative value to the pango layout
indent value (i.e set_indent(-20)). Although I think the right thing to do here
is to set a new set/get_indent_wrapped_text, which will do the same as the
indent value but just for the wrapped text.

4) We need to add a setting into gedit, either in the preferences dialog or at
this point it could be easily done with a plugin. (A setting in the dialog I
think it would be better though).

So if somebody wants to have some fun feel free to go fixing each of those
steps, and if you have any question we are like always in the irc channel
spotted in the previous comment.