From b3a534dbf77f1c371a04a0d4036baa08ca5e399c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Tue, 12 May 2020 18:56:33 +0200 Subject: [PATCH] Fix dynamic toolbar tooltip updates on wxGTK wxToolbarTool::SetShortHelp() does not refresh the UI (i.e. the internal native representation) in all ports. At some point, wxOSX was affected, but since fixed: https://trac.wxwidgets.org/ticket/12362 wxGTK appears to intentionally take this route (https://github.com/wxWidgets/wxWidgets/blob833ae03c6a80dea21b775fa871af0f32289e0bd4/src/gtk/toolbar.cpp#L808) and addressing it there is impractical because we have to support many wxGTK versions. Fixed by using wxToolbar::SetToolShortHelp() instead. Other nearby code already uses this set of functions, so it seems only appropriate. --- src/wx/main_toolbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wx/main_toolbar.cpp b/src/wx/main_toolbar.cpp index 8572052eb2..e671ef8445 100644 --- a/src/wx/main_toolbar.cpp +++ b/src/wx/main_toolbar.cpp @@ -84,7 +84,7 @@ class WXMainToolbar : public MainToolbar if (on) { tool->SetLabel(_("Sync")); - tool->SetShortHelp(_("Synchronize the translation with Crowdin")); + m_tb->SetToolShortHelp(m_idUpdate, _("Synchronize the translation with Crowdin")); #ifdef __WXGTK3__ SetIcon(4 , "poedit-sync-symbolic"); #else @@ -97,7 +97,7 @@ class WXMainToolbar : public MainToolbar else { tool->SetLabel(MSW_OR_OTHER(_("Update from code"), _("Update from Code"))); - tool->SetShortHelp(_("Update from source code")); + m_tb->SetToolShortHelp(m_idUpdate, _("Update from source code")); #ifdef __WXGTK3__ SetIcon(4 , "poedit-update-symbolic"); #else