On 03/21/11 10:38, Colomban Wendling wrote:
Le 20/03/2011 22:35, Matthew Brush a écrit :
I need some guidance on how to make the order and location of the tabs to be persistent so it it's saved/loaded with the session. Any hints would be appreciated.
This is the big problem I guess, and it probably need to be addressed before applying the patches, because it's likely to need some tuning.
I think the problem is that we need to be able to identify a tab in order to save its state. Maybe simply needing the child to have a name (set with gtk_widget_set_name()) would work, though it'd need plugins to be adapted to benefit of the change.
More difficult will be the tab restoration I guess. Not only you have to be able to restore tab ordering in a notebook, and this even if some tabs are missing (e.g. a simple insertion at the appropriate position isn't enough); but it'll need to set add the tab to the right notebook. Quite a peace of code I guess ^^
Just to see if it was do-able I prototyped this setup in Python:
https://gist.github.com/880598
I wrote this really quickly but it should show the idea and it seems to work well.
Cheers, Matthew Brush