[Freeciv-Dev] (PR#7079) Remove unneeded options from clients
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7079 >
> [i-freeciv-lists@xxxxxxxxxxxxx - Mon Dec 15 17:28:29 2003]:
>
> On Fri, Dec 12, 2003 at 01:10:34PM -0800, Michael Kirzinger wrote:
> >
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7079 >
> >
> > > [jordi@xxxxxxxxxxxxxx - Wed Dec 10 17:17:00 2003]:
> > >
> > > The GTK client has a few options like these:
> > >
> > >
> > > GEN_BOOL_OPTION(meta_accelerators, N_("Use Alt/Meta for
> > > accelerators (GTK+ only)")),
> > > GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars
> > > (GTK+ only)")),
> > > GEN_BOOL_OPTION(dialogs_on_top, N_("Keep dialogs on top
> > > (GTK+ 2.0 only)")),
> > >
> > >
> > > This probably clutters sdl/xaw/whatever clients for no reason. I
> > > suggested just ifdef'ing around the stuff, but vasc said it's better
> > > to
> > > do it in some other way (I admit ifdefing all the stuff would have
> > > been
> > > ugly).
> > >
> > > Once the options are shown only in the respective clients, they'd look
> > > better, just showing "Keep dialogs on top", "Show Map Scrollbars",
> > > etc.
> >
> > One way this could be done is to add a int inside the client_option
> > struct which identifies what clients the option is for. Each client
> > could be assigned a bit in the int. If it is set, the option applies to
> > that client, if not, the client can ignore it.
> >
> > Pros of this method is that it is fairly easy to implement and makes
> > little changes to existing code.
> >
> > Cons would be that the size of the client_option structure would be
> > increased, and also that all options would be present in the compiled
> > code for all clients (which is how it is now).
> >
> > The attached patch implements this method (in all clients) of only
> > displaying options in the clients they apply to.
> >
> > This makes it possible to add more client-specific options (such as
> > resolution/fullscreen for SDL client) without cluttering up the options
> > menus in other clients.
>
> +#define OCF_NONE 0
> +#define OCF_GTK (1<<0)
> +#define OCF_GTK2 (1<<1)
> +#define OCF_MUI (1<<2)
> +#define OCF_SDL (1<<3)
> +#define OCF_WIN32 (1<<4)
> +#define OCF_XAW (1<<5)
> +#define OCF_ALL 0xff
>
> Either an enum (with "1<<n"s) or better a classical enum and usage of
> of bitvector (common/shared.h: BV_*).
>
> The question still stands for me: do we really want this?
>
> Raimar
>
I enjoy the look/interface of the sdl client, but one thing that has
bothered me is that not all options can be saved (since not all are part
of the options in freeciv/client options.h). It is very tiring to have
to set the options every time the game is started.
Currently, there are 4 client options (and 2 view options) in the sdl
client (cursor/focus animations, resolution, and fullscreen) that are
not part of the client options. Adding these would create unnecessary
clutter to the gtk/xaw clients. This is where I see the client option
knowing which client it applies to being useful, unless the clutter
isn't a problem.
Alternatively, these options could just be loaded by the client and not
in the common client code, but then that poses a question: Should all
client-specific options be loaded/saved by the client they apply to?
-Michael
|
|