Re: RFC GnomeGoal #3

On Fri, 2006-08-11 at 11:22 +0100, Bastien Nocera wrote:
> Heya,
> I've written up on GNOME Goal #3:
> Currently, a lot of applications will be using GConf to save state, like
> window sizes, whether or not a window is maximised on startup, etc.
> This is against GConf policy, as GConf might be read-only, or locked
> down, but this sort of information should still be saved run-to-run.
> I'm awaiting comments on this, before making it official. Vincent
> mentioned that it would be a good idea to get code to save state in a
> library, although there isn't that much code to be shared IMO.

We have a very easy library for doing this: libgnome.  The
gnome_config family of functions are easy to work with for
something this simple.

It's what Yelp uses to store the width and height of its
window.  See here:

Search for "window_configure_cb".  Search again.  And now
a third time.  Ah, there it is.  And the code for getting
that information is in the window_init function.  It's way
less code than using GKeyFile.

And since we're on the subject, I consider it a fundamental
flaw in all of these approaches that we're storing window
positions and sizes without regard for what machine we're
running on.  (Yes, Yelp has this flaw too.)  If I'm running
multiple machines off the same NFS home directory, and one
of them has a smaller resolution, bad things will happen.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]