]> git.lyx.org Git - features.git/commit
Respect OS-level keyboard language
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 16 Jul 2019 23:01:49 +0000 (01:01 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:37 +0000 (15:48 +0200)
commit76992dfb9c06bd38f3db3b46e6f8e00909590e61
treea784b2073cee36cdf72dacc81a93f506d71ca176
parentf146483ce3c66a2f993ffe2652bc50574a1c5d75
Respect OS-level keyboard language

This bug provides two features:

1/ when a new document is created the language is set to the current
  keyboard language.

2/ when keyboard is switched at OS level, the input language of
   current window is changed. The language is set preferably to one of
   those of the document. Ex. if the keyboard changes to en_GB but one
   is typing a document in US English and Hebrew, then US English will
   be selected rather that adding UK English to the list.

The implementation depends a lot on Qt. The platform status is :

* working on Windows 10

* not working with Linux (although 1/ works with Qt4); it seems that
  Qt5 supports switching through ibus, but I do not know what this
  means.

* not yet tested on macOS.

This addresses bugs #6450, #6247 and somehow #10514.
src/Buffer.cpp
src/BufferView.cpp
src/BufferView.h
src/Language.cpp
src/Language.h
src/frontends/Application.h
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h