diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-19 10:24:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-20 09:55:26 +0100 |
commit | e59bbb72b1145e4865742c5f03d9372a177b9df9 (patch) | |
tree | b1a7fae2922fec09d57b111873c4ac96b56f2e34 /vcl | |
parent | 3e71e97e00be0f337c102beef9755ccbe573103a (diff) |
Resolves: tdf#129484 just install decimal key handler for spinbuttons
as a simple interim fix
Change-Id: I7e393fe20f4fb7ea277c423f9fc9789d658b1e18
Reviewed-on: https://gerrit.libreoffice.org/85505
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 5d80c7eb8ac3..260bc605cf7e 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1895,6 +1895,14 @@ protected: return AllSettings::GetLayoutRTL(); } + void localizeDecimalSeparator() + { + // tdf#128867 if localize decimal separator is active we will always + // need to be able to change the output of the decimal key press + if (!m_nKeyPressSignalId && Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep()) + m_nKeyPressSignalId = g_signal_connect(m_pWidget, "key-press-event", G_CALLBACK(signalKey), this); + } + private: bool m_bTakeOwnership; bool m_bFrozen; @@ -2174,10 +2182,6 @@ public: , m_nDragDropReceivedSignalId(0) , m_nDragLeaveSignalId(0) { - // tdf#128867 if localize decimal separator is active we will always - // need to be able to change the output of the decimal key press - if (Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep()) - m_nKeyPressSignalId = g_signal_connect(m_pWidget, "key-press-event", G_CALLBACK(signalKey), this); } virtual void connect_key_press(const Link<const KeyEvent&, bool>& rLink) override @@ -10508,6 +10512,7 @@ public: , m_bBlockOutput(false) , m_bBlank(false) { + localizeDecimalSeparator(); } virtual int get_value() const override |