[Libreoffice-commits] core.git: include/vcl vcl/source vcl/unx
Caolán McNamara
caolanm at redhat.com
Fri Mar 23 10:39:29 UTC 2018
include/vcl/weld.hxx | 1 +
vcl/source/app/salvtables.cxx | 5 +++++
vcl/unx/gtk3/gtk3gtkinst.cxx | 5 +++++
3 files changed, 11 insertions(+)
New commits:
commit 144bc302b8e610422f0bdbfceb1726822454dfbc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 23 09:02:37 2018 +0000
add set editable support
Change-Id: I4ec9d3de426f760c38600d4960e2d37a3be8a9bb
Reviewed-on: https://gerrit.libreoffice.org/51768
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 88c53b7e2336..0cdf21d06ed4 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -330,6 +330,7 @@ public:
virtual void set_max_length(int nChars) = 0;
virtual void select_region(int nStartPos, int nEndPos) = 0;
virtual void set_position(int nCursorPos) = 0;
+ virtual void set_editable(bool bEditable) = 0;
void connect_changed(const Link<Entry&, void>& rLink) { m_aChangeHdl = rLink; }
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 27a0c288c593..47e0037c81c9 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -838,6 +838,11 @@ public:
m_xEntry->SetSelection(Selection(nCursorPos, nCursorPos));
}
+ virtual void set_editable(bool bEditable) override
+ {
+ m_xEntry->SetReadOnly(!bEditable);
+ }
+
virtual ~SalInstanceEntry() override
{
m_xEntry->SetTextFilter(nullptr);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index ee3ae83fbfdd..6d1c3eebb7e9 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2068,6 +2068,11 @@ public:
gtk_editable_set_position(GTK_EDITABLE(m_pEntry), nCursorPos);
}
+ virtual void set_editable(bool bEditable) override
+ {
+ gtk_editable_set_editable(GTK_EDITABLE(m_pEntry), bEditable);
+ }
+
virtual void disable_notify_events() override
{
g_signal_handler_block(m_pEntry, m_nInsertTextSignalId);
More information about the Libreoffice-commits
mailing list