From: Bastien N. <ha...@ha...> - 2002-10-30 01:00:47
|
On Tue, 2002-10-29 at 02:08, Guenter Bartsch wrote: > hi bastien, >=20 > > > > And I'm having troubles saving all the entries of the configuration= . It > > > > only saves those few config entries I modify. > > >=20 > > > humm - make sure you register all config items - config items that > > > are not registered are dropped (so the config file gets cleaned of ol= d > > > no-longer used entries). > >=20 > > Hmm, how would I go around doing that ? I'm not sure I understand the > > config system in Xine... >=20 > it's xine, not Xine Tomato, tomato... > the config system is very simple: the config file gets loaded (though=20 > you could also use your own mechanism here and store the config values=20 > using gconf) and all entries found in the file are added to xine's=20 > internal config repository. all config entries are marked as=20 > unregistered (unclaimed) at that point. then modules can start calling=20 > xine_config_register_* functions to register their config values,=20 > providing data types, descriptions and default values (among other=20 > things). xine_config will then check if an unregistered item with that=20 > key exists and if that is the case, convert into an registered entry and=20 > return the value that was loaded from the configfile. if the key is not=20 > found, a new entry will be added to the config repository and the=20 > default value will be copied and also returned. >=20 > when you call xine_config_save (...) xine_config will iterate through=20 > the list of config items and save those that have been registered in the=20 > meantime and discard everything else. Well, I was trying to figure out why it wouldn't work for totem, but I found out. Libgnomeui was saving the placement for some widgets in the same place I was saving and loading my configuration. It's working now though, so Totem is very well on track for a release along with the new X^Wxine. But where is the logo gone ? ;) Cheers --=20 /Bastien Nocera http://hadess.net Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away. Antoine de Saint-Exupery |