Re: applet preferences handling via gconf



Hi Joaquim,

On Tue, 2003-02-04 at 01:14, Joaquim Fellmann wrote:

> The problem is, the *gconf_get_* functions keep returning the default
> values specified in the schema file and not the values stored with the
> *gconf_set_* functions (which seem to report no errors).
> I checked with the gconf editor tool all entries present in
> /apps/panel/profile/default/applets and there are quite a few entries
> corresponding to my applet (but always with the default values and never
> with those specified while applet is running).
> 
> What am I doing wrong ?

	I've no idea what you're doing wrong - it sounds like you're doing
everything right.

> Why are there so many entries (5 or 6) in
> /apps/panel/profile/default/applets. For other applets running in my
> panel there's only one entry for the default values and one entry for
> the values set by the user. How do I get rid of all those entries

	Applet's use of gconf is a little different from normal applications.
Because you may have more than a single instance of a given applet on
the panel you need for those preferences for each instance to be stored
seperately from all the other instances.

	So for each instance of your applet on the panel you should see keys in

/apps/panel/profiles/default/applets/$(instance_id)/prefs/

	which have your schemas applied to them. What you're probably seen is
some stale directories for instances that no longer exist that were
never removed because of crashes when testing or whatever.

Good Luck,
Mark.




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