simargl wrote:Text viewer/editor with tabs - experiment.
Problem with this: filename variable is read from the current tab label, that means tab label must contain whole file path, and if it's too long it looks ugly. Except of that it works. Depends on Gtk3, uses Gtk.TextView so there is no support for syntax highlight. There must be better way to get filename from the currently active tab.
Use a dynamic array or a linked list for that.
The array/list holds filename with the whole path.
Correlate the array/list index with the tab index.
Something like that becomes tricky when tabs are closed and don't exist anymore.
If the array/list can hold a struct you could have a struct with two strings:
one for the tab and one for the window.
Tab only shows the file name (no path).
The title of the window could show the active filename with the whole path.