On Wed, 19 May 2010 14:17:52 +0300% Dimitar Zhekov hamster@mbox.contact.bg wrote:
Hi, all,
This is an alternate implementation of Eugene's X11 session support. The main difference is that the state each running Geany is saved into a separate temporary Geany configuration file.
Each Geany is restored exactly it was before the session was closed, including open files, options (including applied but unsaved), per-document options (even if no project file is open) etc.
There are no races when saving geany.conf, it's not saved at all. If you want to save the options, so that the next Geany will use them, just go to the Geany you want the options from and save them, exactly as you would do before the session was closed.
Should there be "main" and "option-saving" instances, which ones, and how should they differ from the "secondary" instances? As Eugene pointed out, this is not related to the session management, at least with this SM implementation.
The patch applies against the latest svn-4933. Of course, it should not be included in 0.19, I only finished it today. Some parts of Eugene's SM were reverted, since they were not required.
Hi. Several questions and suggestions here :)
1. On my system your version do not automatically remove temporary SM-related session files. Is it supposed to do so? I saw that you specified DiscardCommand.
2. Is tm_get_real_path() really necessary in utils_option_entry_reverse_parse() for command-line options of G_OPTION_ARG_FILENAME type? I saw tm_get_real_path() is called from some other places in code, but have no idea why it's needed.
3. When specifying SmProgram value, you should properly handle the case when argv[0] does not contain path (i.e., when Geany is resolved using PATH). If argv[0] does not contain path, tm_get_real_path() returns NULL for it on my system, causing a segfault.
Best regards, Eugene.