Configuration files location for GNOME applet
Josselin Mouette wrote:
> Le samedi 22 novembre 2008 Ă* 00:27 +0100, Andrew M. a Ă©crit :
>> I recently developed a small GNOME applet and I wanted to share it among a
>> few friends. It uses a couple of files to save settings and I was
>> wondering what's the best location to store them.
>> Is ~/.myapplet/ acceptable or should I use another folder?
> If itâ€™s an applet using libpanel-applet, you should really use GConf to
> store the values so that the configuration can be instantiated once for
> each instance of the applet.
> If itâ€™s merely an application using the notification area, you can use
> ~/.myapplet/ or ~/.gnome2/myapplet/, or course - but if youâ€™re looking
> for a way to store user settings, GConf is the recommended way as well.
If you are not using GConf, I'd recommend to use the XDG basedir spec ,
rather then ~/.myapplet/
Glib already has support for this, see the g_get_user_config_dir() function (I'd
recommend to install devhelp and libglib2.0-doc for easier access of the glib
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?