From: Milan B. <mi...@km...> - 2005-04-11 14:09:07
|
Michael Hieke wrote: > I have made quite some progress on the OptionDialog* files during the > weekend, see http://flamerobin.sourceforge.net/mghie/osx_OptDlgPage1.png > and http://flamerobin.sourceforge.net/mghie/osx_OptDlgPage2.png for > screenshots of the dialog in action on my iBook. Nice :) I would like a visible 1-pixel border around wxTreeCtrl. At least for Gtk/MSW ports. > 1) A setting is defined with e.g. <setting type="checkbox"> so the > correct class is known when the setting is created. For the record, I also wanted to make separate classes initially, since it would properly separate specific stuff (like min and max for numbers). But, I didn't want to invest any more time in it. Anyway, I support the idea separate classes entirely. > <default>0</default> > <option> > <value>properties</value> > <text>Open Properties page</text> > </option> > <option> > <value>columns</value> > <text>Show column info</text> > </option> > > the value is set to "columns", but the old code ignores all values and > uses ints instead. That way the <default>0</default> works too, when in > fact it should be <default>properties</default>. > > I can easily do both, but it has to be consistent. So either we allow > special values for options and use those values as defaults, or the > default is an int value, which IMHO obsoletes the <value> tag for > options. Comments please? When I initially wrote the .xml file, my idea was to use Strings to stored settings like that, i.e. it would not be stored in config.ini as number, but as integer. It would also remove all those enums we (Nando and I) used to describe what numbers mean. For example, instead of "StorageGranularity", we would use simple string, and instead of "case" statement, we would use a lot of if (setting == string). Now, the real question is: what do we want? Enums or strings? In any case it has to be synchronized with option name/value in .xml file, so... I really can't decide. If Nando can't decide either, you could use int values, so we don't have to fix the existing code that relies on that. And now for something completely different(tm) ... Michael, one more thing. I wanted to implement some features, but since you got into restructuring this, I've put it aside. Perhaps you should be aware of and make provisions for it. 1. The feature is that not only wxCheckbox can enable/disable other controls, but also wxRadio. The reason is that sometimes you have 3 or 4 options, but only for some of them some other settings make sense. A good example for this is logging into multiple files: ---------------------------------------------- Multiple files [o] Log everything to a single file [ ] Use incremental file numbers [ ] We might add something else too Incremental file numbers start with [ 0] ---------------------------------------------- Now, this "Incremental file numbers start with" should only be enabled when "Use incremental file numbers" option is selected in radio box. 2. The other feature is that text for numeric options can consist of two parts. It would enable things like: Maximize grid only when [ 15] or more records are available. I had the idea to implement it but placing [] characters in string in .xml file, and later split the string there and make 2 wxStaticTexts, one before, and other after spin control. -- Milan Babuskov http://www.FlameRobin.org ...silent whisper in Firebird's ear |