Strip mnemonics from the label in wxGTK wxToolBar

For consistency with the other platforms, don't show mnemonics in the toolbar
label even if they're defined in the label string.
This commit is contained in:
Andreas Falkenhahn
2015-10-23 18:57:36 +02:00
committed by Vadim Zeitlin
parent d45ba8ce62
commit 82060f816a

View File

@@ -535,8 +535,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
}
if (!tool->GetLabel().empty())
{
wxString const
label = wxControl::RemoveMnemonics(tool->GetLabel());
gtk_tool_button_set_label(
GTK_TOOL_BUTTON(tool->m_item), wxGTK_CONV(tool->GetLabel()));
GTK_TOOL_BUTTON(tool->m_item), wxGTK_CONV(label));
// needed for labels in horizontal toolbar with wxTB_HORZ_LAYOUT
gtk_tool_item_set_is_important(tool->m_item, true);
}