Re: gtk_set_locale
Irene Vatton <[email protected]>
| Newsgroups | gmane.comp.web.amaya.devel |
|---|---|
| Organization | INRIA |
| Message-ID | <[email protected]> |
On Tue, 26 Nov 2002 10:45:09 +0300 Grigory Bakunov <[email protected]> wrote: > > On Tue, 26 Nov 2002 11:16:47 +0900 > [email protected] (Atsuhiko Yamanaka) wrote: > > > AY> Hi, > > AY> To enable XIM for GTK-Amaya, 'ENABLE_MUTKIKEY' must be setted > AY> to 'yes'. This problem has come from the fact that > AY> 'gtk_set_locale' is not called by the default. > AY> I think almost all gtk-based programs, which care for I18N, > AY> have called 'gtk_set_locale' by the default. > AY> Is it a bad idea to call 'gtk_set_locale' by the default? > > AY> FYI, the current GTK-Amaya calls 'gtk_set_locale' in > AY> 'thotlib/dialogue/dialogapi.c' by checking the variable > AY> 'ENABLE_MUTKIKEY'. > > AY> I mean that how about commenting out following two lines? > AY> /* > AY> ptr = TtaGetEnvString("ENABLE_MUKTIKEY"); > AY> if (ptr && !strcasecmp (ptr, "yes")) > AY> */ > AY> gtk_set_locale (); > > I think it's much better to rewrite this piece of code like so: > > ptr = TtaGetEnvString("DISABLE_MUKTIKEY"); > if (ptr && !strcasecmp (ptr, "yes")) > setlocale(LC_ALL,"POSIX") > else > gtk_set_locale (); > > > where setlocale() it's a function from <locale.h>. > This call conforming to POSIX.1 I think Atsuhiko Yamanaka is right. The ENABLE_MUKTIKEY comes from the Motif version and there is no reason in the GTK version to test that variable. -- Irene.