summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-29 21:15:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-30 11:41:54 +0200
commit3014e5f362c77c546452d45fcde96fcbae27235e (patch)
treeafbefbd2f10bbf971dd52ea0732031ee009c3d30
parent5e71673ae0bbd4c0c1b32a1269155b4cd2cb5f45 (diff)
hook up can-focus to ability to tab into the widget
Change-Id: I55915254d784a0887a8d5bf6128396ab875e7ae6 Reviewed-on: https://gerrit.libreoffice.org/53634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--starmath/uiconfig/smath/ui/catalogdialog.ui2
-rw-r--r--vcl/source/window/window2.cxx8
2 files changed, 9 insertions, 1 deletions
diff --git a/starmath/uiconfig/smath/ui/catalogdialog.ui b/starmath/uiconfig/smath/ui/catalogdialog.ui
index 407dab1aa29c..21524bccc0f9 100644
--- a/starmath/uiconfig/smath/ui/catalogdialog.ui
+++ b/starmath/uiconfig/smath/ui/catalogdialog.ui
@@ -166,7 +166,7 @@
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 57ce81e51464..8b7e07dbc19e 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1604,6 +1604,14 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
if (toBool(rValue))
GrabFocus();
}
+ else if (rKey == "can-focus")
+ {
+ WinBits nBits = GetStyle();
+ nBits &= ~WB_TABSTOP;
+ if (toBool(rValue))
+ nBits |= WB_TABSTOP;
+ SetStyle(nBits);
+ }
else
{
SAL_INFO("vcl.layout", "unhandled property: " << rKey);