diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-19 10:24:42 +0000 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2019-12-23 12:30:56 +0100 |
commit | 60f469f585899e97f3dbc9b98b12d36d9b665eff (patch) | |
tree | baff96abe43972356abf2d845168fc1f5fbd1f1c /vcl | |
parent | 9df327e2dda452dd557eb6bcc0b6f54cfe1fef68 (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/85507
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.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 186b3f2bb2a0..e0bbf6dd4cdc 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1402,6 +1402,14 @@ protected: return pThis->signal_popup_menu(aCEvt); } + 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; @@ -1627,10 +1635,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 @@ -8344,6 +8348,7 @@ public: , m_bBlockOutput(false) , m_bBlank(false) { + localizeDecimalSeparator(); } virtual int get_value() const override |