[Geany-devel] altername session management implementation
Eugene Arshinov
earshinov at xxxxx
Thu Jul 1 07:51:18 UTC 2010
On Wed, 30 Jun 2010 21:48:15 +0300%
Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> On Wed, 30 Jun 2010 12:09:43 +0400
> Eugene Arshinov <earshinov at gmail.com> wrote:
>
> > On Wed, 19 May 2010 14:17:52 +0300%
> > Dimitar Zhekov <hamster at mbox.contact.bg> wrote:
> >
> > > 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.
>
> They are removed when a program ceases to be part of the session (i.e.
> when you close an instance), not on session restart or something.
>
But even if I open Geany and immediately close it, its temporary file
is still there. I just checked out that the file still exists even
after I logout and login again (i.e., after GNOME session manager is
restarted).
> > 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.
>
> That was not only unneeded, but buggy - the config directory and the
> socket file arguments could be non-existent. I removed it 10 days ago.
>
> > 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.
>
> That was also fixed, and the description of tm_get_real_path() has
> been changed - it said that "a reasonable guess is returned even if
> the file does not exist". :-)
>
Okay.
>
> (On that note, I don't think it's necessary for you to try guessing
> the absolute name of args[0], every program I've seen just stores
> argv[0] directly.)
>
I checked that relative paths do not work, even if SmCurrentDirectory
is properly set. Ordinary users rarely run programs using relative
paths, but still.
> There are some other fixes, I can send a patch against 5064 if you
> want.
>
Yes, that would be good. I have an idea of combining your SM
implementation with my sm branch (you know the branch now contains
plenty of things apart of SM, e.g. changes in command-line handling,
Geany session management, recent settings-saving patches, my "proof of
concept" method of merging recent lists etc.). That would require some
work, but I think it's worth it. If I finally do it, I'll send here
resulting patch(es).
Best regards,
Eugene.
More information about the Devel
mailing list