include/sfx2/strings.hrc | 3 --- sfx2/source/sidebar/DeckTitleBar.cxx | 12 +----------- sfx2/source/sidebar/PanelTitleBar.cxx | 2 -- sfx2/uiconfig/ui/decktitlebar.ui | 9 ++++++++- sfx2/uiconfig/ui/paneltitlebar.ui | 9 ++++++++- solenv/sanitizers/ui/sfx.suppr | 2 -- 6 files changed, 17 insertions(+), 20 deletions(-)
New commits: commit 2f80334f1d4fe0d486f858776687c1180077a5fa Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Feb 15 14:26:44 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 15 17:23:28 2021 +0100 Related: tdf#140387 give toolbuttons a11y names Change-Id: I046957afaf89e3f88cde4c2a3cffa470af657175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110939 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc index ddf2745ebb05..0fc589d8d4a6 100644 --- a/include/sfx2/strings.hrc +++ b/include/sfx2/strings.hrc @@ -295,9 +295,6 @@ #define STR_CLOSE_PANE NC_("STR_CLOSE_PANE", "Close Pane") -#define SFX_STR_SIDEBAR_MORE_OPTIONS NC_("SFX_STR_SIDEBAR_MORE_OPTIONS", "More Options") -#define SFX_STR_SIDEBAR_CLOSE_DECK NC_("SFX_STR_SIDEBAR_CLOSE_DECK", "Close Sidebar Deck") - // Translators: default Impress template names #define STR_TEMPLATE_NAME1 NC_("STR_TEMPLATE_NAME1", "") #define STR_TEMPLATE_NAME2 NC_("STR_TEMPLATE_NAME2", "Beehive") diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index f7e0a8df7b7e..91d95d69f264 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -119,17 +119,7 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible) mbIsCloserVisible = bIsCloserVisible; - if (mbIsCloserVisible) - { - mxToolBox->set_item_visible("button", true); - mxToolBox->set_item_icon_name("button", "sfx2/res/closedoc.png"); - mxToolBox->set_item_tooltip_text("button", - SfxResId(SFX_STR_SIDEBAR_CLOSE_DECK)); - } - else - { - mxToolBox->set_item_visible("button", false); - } + mxToolBox->set_item_visible("button", mbIsCloserVisible); } void DeckTitleBar::HandleToolBoxItemClick() diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index a9ddbc79fcb5..7f2ff3214722 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -109,8 +109,6 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName, *mxToolBox, *m_xBuilder, msMoreOptionsCommand, rxFrame, rxController, true); mxToolBox->set_item_visible(msIdent, true); - mxToolBox->set_item_icon_name(msIdent, "sfx2/res/symphony/morebutton.png"); - mxToolBox->set_item_tooltip_text(msIdent, SfxResId(SFX_STR_SIDEBAR_MORE_OPTIONS)); } void PanelTitleBar::HandleToolBoxItemClick() diff --git a/sfx2/uiconfig/ui/decktitlebar.ui b/sfx2/uiconfig/ui/decktitlebar.ui index 68ecdc6469be..bbfcba7bf69b 100644 --- a/sfx2/uiconfig/ui/decktitlebar.ui +++ b/sfx2/uiconfig/ui/decktitlebar.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.1 --> +<!-- Generated with glade 3.38.2 --> <interface domain="sfx"> <requires lib="gtk+" version="3.20"/> <object class="GtkBox" id="DeckTitleBar"> @@ -61,7 +61,14 @@ <object class="GtkToolButton" id="button"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="tooltip-text" translatable="yes" context="decktitlebar|SFX_STR_SIDEBAR_CLOSE_DECK">Close Sidebar Deck</property> <property name="use-underline">True</property> + <property name="icon-name">sfx2/res/closedoc.png</property> + <child internal-child="accessible"> + <object class="AtkObject" id="button-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" context="decktitlebar|SFX_STR_SIDEBAR_CLOSE_DECK">Close Sidebar Deck</property> + </object> + </child> </object> <packing> <property name="expand">False</property> diff --git a/sfx2/uiconfig/ui/paneltitlebar.ui b/sfx2/uiconfig/ui/paneltitlebar.ui index 6fd621856b82..2e352bf21a4f 100644 --- a/sfx2/uiconfig/ui/paneltitlebar.ui +++ b/sfx2/uiconfig/ui/paneltitlebar.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.1 --> +<!-- Generated with glade 3.38.2 --> <interface domain="sfx"> <requires lib="gtk+" version="3.20"/> <object class="GtkBox" id="PanelTitleBar"> @@ -68,7 +68,14 @@ <object class="GtkToolButton" id="button"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="tooltip-text" translatable="yes" context="paneltitlebar|SFX_STR_SIDEBAR_MORE_OPTIONS">More Options</property> <property name="use-underline">True</property> + <property name="icon-name">sfx2/res/symphony/morebutton.png</property> + <child internal-child="accessible"> + <object class="AtkObject" id="button-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes" context="paneltitlebar|SFX_STR_SIDEBAR_MORE_OPTIONS">More Options</property> + </object> + </child> </object> <packing> <property name="expand">False</property> diff --git a/solenv/sanitizers/ui/sfx.suppr b/solenv/sanitizers/ui/sfx.suppr index 58a6dc14654f..31def4bb9fb1 100644 --- a/solenv/sanitizers/ui/sfx.suppr +++ b/solenv/sanitizers/ui/sfx.suppr @@ -12,7 +12,6 @@ sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='type'] orphan-label sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='value'] orphan-label sfx2/uiconfig/ui/decktitlebar.ui://GtkImage[@id='addonimage'] no-labelled-by sfx2/uiconfig/ui/decktitlebar.ui://GtkLabel[@id='label'] orphan-label -sfx2/uiconfig/ui/decktitlebar.ui://GtkToolButton[@id='button'] button-no-label sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showcreate'] orphan-label sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showmodify'] orphan-label sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showsigned'] orphan-label @@ -47,7 +46,6 @@ sfx2/uiconfig/ui/templatepanel.ui://GtkToggleToolButton[@id='6'] button-no-label sfx2/uiconfig/ui/templatepanel.ui://GtkToggleToolButton[@id='65535'] button-no-label sfx2/uiconfig/ui/templatedlg.ui://GtkLabel[@id='label1'] orphan-label sfx2/uiconfig/ui/paneltitlebar.ui://GtkImage[@id='addonimage'] no-labelled-by -sfx2/uiconfig/ui/paneltitlebar.ui://GtkToolButton[@id='button'] button-no-label sfx2/uiconfig/ui/versioncommentdialog.ui://GtkLabel[@id='timestamp'] orphan-label sfx2/uiconfig/ui/versioncommentdialog.ui://GtkLabel[@id='author'] orphan-label sfx2/uiconfig/ui/versioncommentdialog.ui://GtkTextView[@id='textview'] no-labelled-by _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits