[PATCH] gtk-gui.c: Move the download dialog related code to a new file

Lubomir I. Ivanov neolit123 at gmail.com
Thu Jan 10 12:26:25 PST 2013


On 10 January 2013 22:06, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> Linus Torvalds <torvalds at linux-foundation.org> writes:
> > I'd rather get rid of our system config code entirely, and put it all
> > into the per-xml file settings. And as a side effect, that would get
> > rid of most of the remember_dc and set_dc_nickname stuff.
>
> Yes it would. It would also get rid of a big chunk of the useability
> improvements that we have made (e.g., default XML file) and would mean
> that opening a different XML file means all the user's settings are
> gone. That is not an acceptable trade-off to me.
>
> Now we can, of course, talk about a different solution. Instead of
> storing everything in the system config store only two file names there:
> the default divelog XML file and the default settings XML file. And move
> all other settings into the settings XML file, which you can share via
> git (or not, if you prefer to have random default settings when starting
> with an empty XML file). The amount of code required to do that would
> actually be fairly small and it would create the same user experience
> for Joe User (assuming we do this right) and would allow you to get your
> very special "but Linus is different" feature. And heck, if I am wrong
> and it is actually 20% of our users that behave like you then this is an
> even bigger plus.
>

tbh, i was for the configuration file approach from the beginning.
this gets rid of the windows registry use, and is pretty portable i.e.
we have one format for all configuration files.
it will also obviously reduce the code amount in the system specific
definitions linux.c, macos.c, windows.c.

+1

> What do you think, would that address your issue?
>
> Of course, the next question then becomes "what are the precedence rules
> between the settings in the divelog file and the settings in the
> settings file?" (my guess is the divelog file wins) and "when are things
> stored in the settings file?" (they clearly are always stored in the
> divelog file).
>

some thought has to go into this, but perhaps once settings are stored
with a divelog file (which will in fact be trivial xml -> xml), on
file open, the user can be asked if he/she desires a temporal (but
probably partial, i.e. not all settings are needed) settings switch.
this way he/she can experience the divelog of another user. but if
"no" is given, the opened divelog can use the current settings. also a
setting in the settings file itself (and settings dialog) can hold a
flag in the lines of "always_use_my_settings", which will essentially
omit the dialog in question.

just some ideas.

lubomir
--


More information about the subsurface mailing list