Re: Prefs

Le Wed, Mar 12, 2003, à 09:45:45AM -0600, Lars Clausen a écrit:

We can have the prefs dialog defined in one of two ways:

Externally defined -- the dialog is designed with Glade and somehow (I'm
not sure how that'd be the easiest) connected with the prefs structure.
Pro:  More exact design possible.  Con:  Harder to maintain.

Internally defined -- the dialog is created from the information about the
prefs fields, but with more design elements available (frames etc).  

If we can use the props structures, the second option would be the best.

default attributes are handled as normal objects, and the defaults backing
store is a diagram (IIRC). 

Maybe defining a special "Preferences" object type, with dummy
draw/click/stuff methods, and properties for each of the preferences would
do the trick. The user wants to see the preferences? No problem, we fire up
that object's properties (and then copy the values into the static area, if 
we continue to find this more convenient to access). Persistence would be
handled by saving a diagram.

Bonus, it should be possible to save diagram-specific preferences by saving
an instance of that object onto a hidden layer (the only detail to solve is
that we wouldn't be accessing the static area anymore, but the diagram's
preferences object or the fallback global preferences object. Hummm, how to
choose between per-diagram or global prefs, this is interesting (both on
code & GUI aspects).

'fcourse, we'll need a way to upgrade existing diarc files.

        -- Cyrille


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