win32: use the input locale to decide the default input method
win32: use the input locale to decide the default input method

GTK+ tries to automatically assign the best input module based on the
'system locale'. In the specific case of the IME input method, it will
be the default for the whole GTK+ application if the system locale is
either Japanese (ja), Korean (ko) or Chinese (zh). Other defaults are
equally applicable, e.g. if system locale is Catalan (ca), the special
'Cedilla' input module is chosen.

System locale can be changed (e.g. Win7) through the following sequence
(reboot required):
  Control Panel
    Region and Language
      Administrative
        Language for non-Unicode Programs
          Change system locale...

The problem with this behaviour is that changing the 'default input
language' (e.g. from English to Japanese+IME) doesn't affect the GTK+
application. Therefore, I can have an English system locale (where GTK+
will choose Simple IM by default) but then have Japanese+IME as input
language.

Default input language can be changed (e.g. Win7) through the following
sequence (no reboot required):
  System locale can be changed (e.g. Win7) through:
    Control Panel
      Region and Language
        Keyboards and Languages
          Keyboards and other input languages
            Change keyboards...

Default input language can also be changed using the language bar directly.

So, instead of using the system-wide default locale to decide which input
method to use as default, better use the input language specified by the
user, which may be the same as the system-wide default locale, or different.
Following the previous example, with an English system locale and a
Japanese+IME input language, the default input method will now be IME
instead of Simple, which is closer to what's expected by the user.

This change only affects the application during startup; i.e. if the user
changes the input language while the application is running, we wouldn't be
changing the default input method to use. We could do this processing the
WM_INPUTLANGCHANGE messages, though.

https://bugzilla.gnome.org/show_bug.cgi?id=700428

jigpu/gtk,jessevdk/gtk,msteinert/gtk,davidgumberg/gtk,grubersjoe/adwaita,alexlarsson/gtk,jadahl/gtk,jessevdk/gtk,ahodesuka/gtk,msteinert/gtk,chergert/gtk,Lyude/gtk-,msteinert/gtk,jadahl/gtk,davidgumberg/gtk,ebassi/gtk,Sidnioulz/SandboxGtk,Lyude/gtk-,ahodesuka/gtk,Sidnioulz/SandboxGtk,Adamovskiy/gtk,jadahl/gtk,jigpu/gtk,ahodesuka/gtk,davidgumberg/gtk,jadahl/gtk,Lyude/gtk-,davidgumberg/gtk,alexlarsson/gtk,jadahl/gtk,grubersjoe/adwaita,Adamovskiy/gtk,alexlarsson/gtk,msteinert/gtk,jessevdk/gtk,ebassi/gtk,jigpu/gtk,davidgumberg/gtk,jadahl/gtk,chergert/gtk,jadahl/gtk,chergert/gtk,ahodesuka/gtk,jessevdk/gtk,chergert/gtk,jadahl/gtk,ebassi/gtk,Lyude/gtk-,alexlarsson/gtk,chergert/gtk,Sidnioulz/SandboxGtk,alexlarsson/gtk,grubersjoe/adwaita,jessevdk/gtk,grubersjoe/adwaita,chergert/gtk,jessevdk/gtk,ebassi/gtk,grubersjoe/adwaita,grubersjoe/adwaita,Adamovskiy/gtk,jigpu/gtk,ebassi/gtk,jessevdk/gtk,jigpu/gtk,alexlarsson/gtk,davidgumberg/gtk,Adamovskiy/gtk,Lyude/gtk-,davidgumberg/gtk,Adamovskiy/gtk,Sidnioulz/SandboxGtk,jigpu/gtk,alexlarsson/gtk,alexlarsson/gtk,Sidnioulz/SandboxGtk,jigpu/gtk,Sidnioulz/SandboxGtk,grubersjoe/adwaita,grubersjoe/adwaita,msteinert/gtk,ahodesuka/gtk,Adamovskiy/gtk,msteinert/gtk,chergert/gtk,ahodesuka/gtk,Lyude/gtk-,chergert/gtk,Lyude/gtk-,Adamovskiy/gtk,jigpu/gtk,Adamovskiy/gtk,davidgumberg/gtk,ahodesuka/gtk,ahodesuka/gtk,Lyude/gtk-,ebassi/gtk