Storing config data [was: Re: Printing settings, again]
- From: Federico Mena Quintero <federico ximian com>
- To: Yevgen Muntyan <muntyan tamu edu>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Storing config data [was: Re: Printing settings, again]
- Date: Tue, 04 Apr 2006 22:02:32 -0500
On Tue, 2006-04-04 at 17:59 -0500, Yevgen Muntyan wrote:
> >Introducing read-write printing settings in gtk+ is a bit problematic,
> >as there is currently no support for such settings in gtk+.
> >
> >
> Federico must know how to do it ;)
Damn, you blew my cover.
In the "federico-filename-entry" branch, I have a GtkFileChooserSettings
class that saves the user's settings for the file chooser:
- the state of the "show a filename entry" toggle
- the state of the show-hidden-files toggle
I intend to save some extra stuff as well, such as the hpaned size and
the dialog size [insert millions of caveats of how sizing is totally
broken right now].
I save the settings in ~/.config/gtk-2.0/gtkfilechooser, per the XDG
basedir spec: I call g_get_user_config_dir() and append the
"gtk-2.0/gtkfilechooser" part.
That file is a blob parsed with GMarkup.
I don't want to propagate this practice very much, since it is yet
another config system, and it is only necessary because we haven't
sucked it up and put GConf under GTK+ as a dependency. Whoever flames
about this deserves to get their eyebrows burnt.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]