[Geany-devel] Sidebar and MsgWindow Notebook Patches

Colomban Wendling lists.ban at xxxxx
Tue Mar 22 14:18:59 UTC 2011


Le 22/03/2011 02:54, Matthew Brush a écrit :
> 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.

Looks good so far :)
But don't forget we need also to be able to reorder tabs added later
(e.g. by plugins), and this even if the tab order has changed (so we
can't just reorder all tabs) and even if there are some missing tabs
(e.g. plugins that haven't been loaded).

Cheers,
Colomban



More information about the Devel mailing list