[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 >
> [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.
-Michael
clientspecificoptions.diff
Description: Binary data
|
|