summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-04 21:10:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-06-05 18:31:16 +0200
commit3cca2c605313576187878a195fb612eb25bd6150 (patch)
treeaefde04eed4c4d81a6512057f7eeb09eb21de575 /svtools
parente6b5c2dc0bb12c7e0d23857bdd0e22076d587ca3 (diff)
restore %PRODUCTNAME to accessible descriptions that need them
The original problem was that %PRODUCTNAME wasn't replaced for accessibility descriptions (which are reused for extended tips) under gtk. Universally querying all a11y descs on load to potentially replace %PRODUCTNAME in a11y descs at runtime led to tdf146971 which was a huge startup slowdown. The half way 7.3 fix was to leave a11y descs alone, but do the replacement when querying for the extended tip case. So the extended tooltips were ok, but screen readers would still say a raw "%PRODUCTNAME" text, hence the rewording effort to remove %PRODUCTNAME from the a11y descs entirely for 7.4. But there is now a few cases where some options paths exists in the a11y descs which is not exactly correct wrt to the text shown in the options dialog. Reworking the options dialog to not have %PRODUCTNAME there at all and updating everything to fit that sort of change would not be popular. So move the cases where a11y descs really should have %PRODUCTNAME in them out of the .ui files and into .hrc files and use specific set_accessibility_description calls for them via ResID which will do the %PRODUCTNAME replacement automatically. Hopefully the a11y runtime cost for just this handful of cases is negligible in the overall scheme of things. Change-Id: Ieb17d26fd581cd5804a52b371b3bb5ea43023aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135432 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/prnsetup.cxx1
-rw-r--r--svtools/uiconfig/ui/printersetupdialog.ui5
2 files changed, 1 insertions, 5 deletions
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 5f41e355e3a8..60dba4348ec3 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -250,6 +250,7 @@ PrinterSetupDialog::~PrinterSetupDialog()
void PrinterSetupDialog::SetOptionsHdl(const Link<weld::Button&, void>& rLink)
{
m_xBtnOptions->connect_clicked(rLink);
+ m_xBtnOptions->set_accessible_description(SvtResId(STR_A11Y_DESC_OPTIONS));
m_xBtnOptions->set_visible(rLink.IsSet());
}
diff --git a/svtools/uiconfig/ui/printersetupdialog.ui b/svtools/uiconfig/ui/printersetupdialog.ui
index ef107138655a..84332795aeef 100644
--- a/svtools/uiconfig/ui/printersetupdialog.ui
+++ b/svtools/uiconfig/ui/printersetupdialog.ui
@@ -41,11 +41,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="options-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="printersetupdialog|extended_tip|options">Opens the Printer Options dialog where you can override the global printer options set on the Tools - Options - Writer/Web - Print panel for the current document.</property>
- </object>
- </child>
</object>
<packing>
<property name="expand">False</property>