diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-11 10:58:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-11 11:15:41 +0100 |
commit | 1a3a787766842751b1f9013ac7f0be3633284f75 (patch) | |
tree | 5083f40abf3d6b34409d491c2caffb6532d6cb1e | |
parent | f2734389f517c1f99eee2346ae9d2104cc7de842 (diff) |
import password echo char setting
Change-Id: I36a82a8bb915e72a191787a2e44f9bd814271ea1
-rw-r--r-- | sfx2/uiconfig/ui/password.ui | 8 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sfx2/uiconfig/ui/password.ui b/sfx2/uiconfig/ui/password.ui index 598535c3b8a7..93163167b181 100644 --- a/sfx2/uiconfig/ui/password.ui +++ b/sfx2/uiconfig/ui/password.ui @@ -156,7 +156,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> - <property name="editable">False</property> + <property name="visibility">False</property> <property name="invisible_char">●</property> <property name="invisible_char_set">True</property> </object> @@ -172,7 +172,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> - <property name="editable">False</property> + <property name="visibility">False</property> <property name="invisible_char">●</property> <property name="invisible_char_set">True</property> </object> @@ -252,7 +252,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> - <property name="editable">False</property> + <property name="visibility">False</property> <property name="invisible_char">●</property> <property name="invisible_char_set">True</property> </object> @@ -268,7 +268,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> - <property name="editable">False</property> + <property name="visibility">False</property> <property name="invisible_char">●</property> <property name="invisible_char_set">True</property> </object> diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index d27105193c3e..962df08168ce 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -234,6 +234,14 @@ bool Edit::set_property(const rtl::OString &rKey, const rtl::OString &rValue) SetMaxWidthInChars(rValue.toInt32()); else if (rKey == "editable") SetReadOnly(!toBool(rValue)); + else if (rKey == "visibility") + { + WinBits nBits = GetStyle(); + nBits &= ~(WB_PASSWORD); + if (!toBool(rValue)) + nBits |= WB_PASSWORD; + SetStyle(nBits); + } else return Control::set_property(rKey, rValue); return true; |