[Gtkradiant] Prefences in plugins ?

Timothee Besset gtkradiant@zerowing.idsoftware.com
Sun, 6 Jan 2002 15:08:01 +0100


Right now you can read the project settings from a plugin, and use the
epairs. What has been written for global.pref relies on the 'property
bags' idea and XML. But it's not in a generic enough state to be usable
through modules/plugins.

g_PrefsDlg.m_bPak is still in the prefs, but it's not used in the current
code. I am removing it. As far as accessing the prefs struct directly, a
hack like I did for the map module (i.e. retrieving the pointer directly)
should work well enough for now. Ideally the modules should be able to
feed their own pref tabs to the preferences dialog.

TTimo

On Sun, 6 Jan 2002 04:58:29 -0000
"Hydra" <hydra@hydras-world.com> wrote:

> Ok, now that we've got multiple game support, how are we going to handle
> plugin preferences ?
> 
> Currently I can't see a way to access g_PrefsDlg from a plugin.
> 
> I need to access the setting g_PrefsDgl.m_bPak (Use PAK/PK3 files) from my
> VFSWAD plugin (and so does VFSPK3 btw..), currently they're both hardcoded
> to TRUE, which makes the preference setting oboslete at the moment.
> 
> What's the best way of storing a plugin's own preferences ?
> 
> There are several options:
> 
> 1) create your own data file in the same directory that the plugin itself
> lives in.
> 2) add the settings to global.pref (XML)
> 3) add the settings to <game>.pref in games\ (XML)
> 
> I'd prefer number 3, but to do that we (i?) need to come up with a format
> for this file
> and an API for loading/saving/accessing it.
> 
> Also, are we going to change radiant.ini to XML ?  seems like a good time to
> do it to me.
> 
> feedback please...
> 
> Hydra
> 
> 
> _______________________________________________
> Gtkradiant mailing list
> Gtkradiant@zerowing.idsoftware.com
> http://zerowing.idsoftware.com/mailman/listinfo/gtkradiant
>