Hi ...
I have been looking into Geany, and its project handling as there were a few things i really was missed. One specific thing I missed was project session files, and that is what I have added.
I know it is a good idea to ask if someone are working on a feature first, but I just ended up doing it, sorry :-)
The project system now holds session files in the same way as the global session files, and when loading a new project all its files are loaded at ones and when closing a project all files are again removed.
Hope this is acceptable, and please let me know if I need to do this in another way. Looking forward to using Geany for more that one project at a time.
Regards
/BL
On Sat, 10 Nov 2007 22:53:24 +0100, Bo Lorentsen bl@lue.dk wrote:
Hi ...
I have been looking into Geany, and its project handling as there were a few things i really was missed. One specific thing I missed was project session files, and that is what I have added.
I know it is a good idea to ask if someone are working on a feature first, but I just ended up doing it, sorry :-)
No problem, it just spares me the work ;-). Thanks a lot.
But the patch is a bit hard to read because you used the "replace tabs by spaces" option and so the diff lists many many changes which aren't really changes. I won't apply it because it changes the indentation of many lines from tabs to spaces which I don't like. For the next patch please read the HACKING file before, there our coding style is described. It would be cool if you could send your patch again without "replace tabs by spaces" option. Or you list the places in the code where you changed something, I don't have the time to look at every line to search for a change. I'm sorry.
Regards, Enrico
Enrico Tröger wrote:
But the patch is a bit hard to read because you used the "replace tabs by spaces" option and so the diff lists many many changes which aren't really changes. I won't apply it because it changes the indentation of many lines from tabs to spaces which I don't like. For the next patch please read the HACKING file before, there our coding style is described.
I have done that but I have miss configured the editor ... sorry.
It would be cool if you could send your patch again without "replace tabs by spaces" option. Or you list the places in the code where you changed something, I don't have the time to look at every line to search for a change. I'm sorry.
I will try my best :-)
/BL
Enrico Tröger wrote:
It would be cool if you could send your patch again without "replace tabs by spaces" option. Or you list the places in the code where you changed something, I don't have the time to look at every line to search for a change. I'm sorry.
Ok, now I have been cleaning up the tab/spaces mess :-)
Hope it is more use full now :-)
/BL
On Sun, 11 Nov 2007 14:31:33 +0100, Bo Lorentsen bl@lue.dk wrote:
Enrico Tröger wrote:
It would be cool if you could send your patch again without "replace tabs by spaces" option. Or you list the places in the code where you changed something, I don't have the time to look at every line to search for a change. I'm sorry.
Ok, now I have been cleaning up the tab/spaces mess :-)
Hope it is more use full now :-)
Fine, thank you very much.
I added the patch only with single changes. I'll add some documentation about this soon but in short: Geany will save all currently open files into the project file as it would do for usual session files and it does save the current files additionally as usual session files. When restarting Geany, the project files are preferred over the usual session files and the project session is restored.
In BL's version, when closing a project all currently open files are closed as well. I'm not sure whether this is what users expect. Maybe it could be configurable or we just leave it out. What do you think?
Regards, Enrico
Enrico Tröger wrote:
I added the patch only with single changes. I'll add some documentation about this soon but in short: Geany will save all currently open files into the project file as it would do for usual session files and it does save the current files additionally as usual session files. When restarting Geany, the project files are preferred over the usual session files and the project session is restored.
So if I understand you correctly both the default config and the project would hold the same session files ?
In BL's version, when closing a project all currently open files are closed as well. I'm not sure whether this is what users expect.
Hmm, it would be nice if Geany after closing a project, opened the files found in the default config file, and not just blank. I was about to do this, but i like to see how you liked my first patch :-)
I closed all files to prevent these from being saved into the default config file, and to give at clear user feedback of what have happend :-)
Maybe it could be configurable or we just leave it out. What do you think?
So the options could be these :
* Blank all files after project closing * Loading files from default config file when closing project. * Leave files open (knowing that this would overwrite files in default config)
/BL
On Sun, 11 Nov 2007 21:21:05 +0100, Bo Lorentsen bl@lue.dk wrote:
Enrico Tröger wrote:
I added the patch only with single changes. I'll add some documentation about this soon but in short: Geany will save all currently open files into the project file as it would do for usual session files and it does save the current files additionally as usual session files. When restarting Geany, the project files are preferred over the usual session files and the project session is restored.
So if I understand you correctly both the default config and the project would hold the same session files ?
At the moment, yes.
Maybe it could be configurable or we just leave it out. What do you think?
So the options could be these :
- Blank all files after project closing
- Loading files from default config file when closing project.
Ok, this might be cool, opening a "default session" when closing a project and its session. If you want to implement it and send a patch, please do so. Otherwise, I'll do this at the end of this week.
Regards, Enrico
Enrico Tröger wrote:
Ok, this might be cool, opening a "default session" when closing a project and its session. If you want to implement it and send a patch, please do so. Otherwise, I'll do this at the end of this week.
I'll see what I can do about it, its not all the code I do completely understand, yet. If I don't make it, I will be looking forward to see how your update may work.
/BL
Enrico Tröger wrote:
- Blank all files after project closing
- Loading files from default config file when closing project.
Ok, this might be cool, opening a "default session" when closing a project and its session. If you want to implement it and send a patch, please do so. Otherwise, I'll do this at the end of this week.
Ok I have tried to do it the way described now. It seems nice to me now, and it seems to work out just nice, for the way I use an editor.
One thing are missing, and that is the symbol tree. When opening a new project the symbol links are totally out of sync, can you tell me why, or is this something that just gets fixed in a minut ?
/BL
On Mon, 12 Nov 2007 23:57:39 +0100, Bo Lorentsen bl@lue.dk wrote:
Enrico Tröger wrote:
- Blank all files after project closing
- Loading files from default config file when closing project.
Ok, this might be cool, opening a "default session" when closing a project and its session. If you want to implement it and send a patch, please do so. Otherwise, I'll do this at the end of this week.
Ok I have tried to do it the way described now. It seems nice to me now, and it seems to work out just nice, for the way I use an editor.
I finally committed the code, sorry for the delay.
Changes: * some minor coding style changes: if (...) instead of if( ... ) and similar things but it doesn't matter. The code itself is more important ;-). * when opening a project the current session files are saved before. Useful if the list of session files has changed between the start of Geany and now.
Thank you very much.
Regards, Enrico
Enrico Tröger wrote:
Changes:
- some minor coding style changes: if (...) instead of if( ... )
and similar things but it doesn't matter. The code itself is more important ;-).
Nice
- when opening a project the current session files are saved before.
Useful if the list of session files has changed between the start of Geany and now.
That is so nice.
Looking forward to using this tomorrow at work.
Thank you very much.
Happy to be able to help.
/BL
On Sun, 11 Nov 2007 20:14:53 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
In BL's version, when closing a project all currently open files are closed as well. I'm not sure whether this is what users expect. Maybe it could be configurable or we just leave it out. What do you think?
Regards, Enrico
This is a very cool addition, highly practical.
For what it's worth, I'd much prefer that the files close with the project, or have that option. What makes this so useful is that it offers a quick way to get rid of one bunch of files and load a different bunch quickly, something I need to do all the time. Of course "Close all" works too, but you have to remember to do it. Off hand, I can't think of a situation where I'd want to close the project but keep the files open.
Regards,
Steve