summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-19 10:24:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-19 16:03:42 +0100
commita3909a3431bba2cb41c712a4e2fbc3747312e156 (patch)
tree74e6b3f16498b05effc1c9542f33c9d4db805b00 /vcl
parent0c3a2eeb8310dc30b4d34f45f4d141fe9ecdcf68 (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/85506 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.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 1f7c1617d936..fb7c06b31003 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1881,6 +1881,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;
@@ -2160,10 +2168,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
@@ -10329,6 +10333,7 @@ public:
, m_bBlockOutput(false)
, m_bBlank(false)
{
+ localizeDecimalSeparator();
}
virtual int get_value() const override