bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Changing language for GUI


From: Jim Segrave
Subject: Re: [Bug-gnubg] Changing language for GUI
Date: Mon, 25 Aug 2003 17:57:51 +0200
User-agent: Mutt/1.4i

On Mon 25 Aug 2003 (14:44 +0000), Joern Thyssen wrote:
> On Mon, Aug 25, 2003 at 03:02:44PM +0200, Jim Segrave wrote
> > 
> > Note that the weird processing of some arguments before setting up gtk
> > and some after means this does not work for text mode.
> > 
> > It's not clear to me why we process some command line arguments, then
> > set up the GUI (if required), then process the rest of the command
> > line. I suspect this is historical and that all the arguments could be
> > processed before GTK and the GUI start up, in which case my fix would
> > also work for text mode.
> 
> No, we have to look for '-t' (and others) to verify if we should start X
> at all. We should not run InitGTK if -t, -c, -p, or -s has been
> specified. If we process all command line arguments first, then we have
> to handle all the X and GTK specific cmd line arguments such as
> --g-fatal-warnings or --display. InitGTK "eats" all the GTK and X cmd
> line arguments, so we only have to handle the gnubg specific ones
> afterwards.

But if you look at the code, it appears that all the getopt processing
of the command line simply sets flags - it doesn't do any function
calls out of the switch statements, so it appears (without having
studied ti closely) that a single call to getopts_long() and a single
following switch statement would suffice. This was a side comment, not
directly relevant.


> BTW, I haven't followed the discussion closely: please remind me why we
> need a command line argument for something that can be set with an env.
> variable?

According to Holger, there's no setenv command (or export LANG=xxx) or
whatever available to Windows users (or I've completely misunderstood
him). It would be nice if the language choice could be selected within
gnubg and saved as part of the config file, but again this has
far-reaching implications - you'd have to look for the setting in the
config file in a separate pass, as it appears that you can't
change gtk's locale once it is started.

Making a command line argument was more a proof-of-concept that gnubg
could set it's own locale, but it's not a complete solution.


-- 
Jim Segrave           address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]