On 5/10/06, Yen-Ju Chen <[EMAIL PROTECTED]> wrote:
  I just explain more on the x session manager.
  When users logout, session manager will ask each application to save
  their own state, even the window position.
  Each application will return a command to session manager so that
  session manager can start this application again next time.
  For example, Ink.app might return a command
  'openapp Ink.app --load ~/file.txt -line 24'
  The next time, session simply execute this command.
  Therefore, applications take FULL responsibility to reload itself.

Partly agree -- I think GNUstep/Etoile apps should returns a NSData
(which thus can be anything) rather than a simple command line,
because that will be much more flexible.

We'll then simply save this NSData in the proper file in the hidden
directory, and start the applications passing this file as parameter,
etc.

Now, we could also support saving simply a "command line", and we'll
need it for legacy apps as you note:

  Session manager simply save and execute what applications want it to.
  Old applications, like xterm, will fail to return this command
  because it doesn't support session.
  In this case, session manager will ask window manager to do so.
  Window manager can save the window state.
  So the next time session manager load window manager,
  window manager will load the state of these old applications.

... but for our apps, I prefer the NSData way.

  Actually GNUstep already did some of these functions.
  The position of menu is automatically saved and loaded.
  Window and view can be saved if developers ask for.

Yes and no -- I mentionned it in my mail: yes GNUstep save those
informations, but it (obviously) don't save them per-project, only
per-application. Works well if you don't have projects, but won't work
if you have projects :-)

Still, the modification should be straightforward: instead of saving
the informations in the defaults, we'll save them in a file in the
hidden directory of the associated project.

  So it all depends on applications themself.
  Session manager simply provide a place and protocol to save and load
the commands.

Yes, I agree with that.

--
Nicolas Roard
"I love deadlines. I like the whooshing sound they make as they fly
by." -- Douglas Adams

_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à