Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Revvy on December 31, 2006, 12:22:45 am

Title: Autosave layout
Post by: Revvy on December 31, 2006, 12:22:45 am
I've been bitten multiple times by the fact that the layout is only saved when a project is closed, and then C::B crashes after a long editing session and I have to reopen all of the files I was using again.  It would be nice if saving the layout could be part of the Autosave process.  I was digging in the source, and at least for the first two cases it would only require a one or two line addition to autosave.cpp (p->SaveLayout().  Tada!)
Title: Re: Autosave layout
Post by: killerbot on December 31, 2006, 12:26:51 am
good idea, since you've done already the research ... how about creating a patch yourself and register it at berlios, that would be a super help to us ?

kind regards
Title: Re: Autosave layout
Post by: Revvy on December 31, 2006, 02:22:43 am
The patch is ready.  I'm not set up for compiling Code::Blocks so I can't test it, but it looks pretty good to my eyes.  Berlios is down right now it seems (this is pretty common, lately!), but I'll upload it as soon as possible.
Title: Re: Autosave layout
Post by: Revvy on December 31, 2006, 06:17:03 am
Hoo-ra, even better news!  I set up a C::B dev environment and actually tried out my patch (turns out it didn't even compile before!) and have now gone through about 3 iterations of it.  It now works flawlessly in all situations, so I'll attach it to Berlios as soon as the site starts working =\
Title: Re: Autosave layout
Post by: killerbot on December 31, 2006, 10:07:46 am
congratulations, nice work.
Title: Re: Autosave layout
Post by: killerbot on December 31, 2006, 11:58:44 am
applied -> see patch for more details (little change)