diff options
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 7034386c35f3..53ab57ae32dd 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -21395,6 +21395,18 @@ private: gtk_widget_hide(pWidget); } +#if !GTK_CHECK_VERSION(4, 0, 0) + // tdf#142704 %PRODUCTNAME shown in extended tips + AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget); + const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr; + if (pDesc && pDesc[0]) + { + OUString aDesc(pDesc, strlen(pDesc), RTL_TEXTENCODING_UTF8); + aDesc = (*m_pStringReplace)(aDesc); + atk_object_set_description(pAtkObject, OUStringToOString(aDesc, RTL_TEXTENCODING_UTF8).getStr()); + } +#endif + // expand placeholder and collect potentially missing mnemonics if (GTK_IS_BUTTON(pWidget)) { |