Re: saving window size?



On Tue, 2009-01-20 at 10:29 -0500, Dr. Michael J. Chudobiak wrote:
don't *ever* use GConf to store the window size. it's *not* a user
preference, and the GConf can very well be not writable.

use a file inside a directory like the user cache directory as
established by the XDG base dir specification.

Hmm. Could you expand on this (or point me to the docs that explain this 
more fully)? What is gconf good for, then, exactly?

preferences. the size of the window is not an application preference.
the sorting order of a list view is a preference; the preferred path for
searching for images is a preference; even the default presence status
for IM is a preference.

the window size is something that can be deleted without losing any
meaningful data.

also: GConf can be set to be completely read-only (think kiosks or thin
clients), which means you *have* to provide fallback code paths to
handle the case gracefully.

in short: use GConf for user preferences, not for storing random chunks
of data.

More than one app stores window sizes in gconf... gThumb certainly does.

and they are all doing the wrong thing. I'm guilty by association, by
the way, because gnome-dictionary uses gconf -- and I should really fix
it.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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