Fix SetToolTip(NULL) in newer GTK versions.
Backport of r61549 from HEAD. Closes #11158. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3907,7 +3907,21 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip )
|
||||
wxWindowBase::DoSetToolTip(tip);
|
||||
|
||||
if (m_tooltip)
|
||||
{
|
||||
m_tooltip->Apply( (wxWindow *)this );
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkWidget *w = GetConnectWidget();
|
||||
wxToolTip::Apply(w, wxCharBuffer());
|
||||
#if GTK_CHECK_VERSION(2, 12, 0)
|
||||
// Just applying NULL doesn't work on 2.12.0, so also use
|
||||
// gtk_widget_set_has_tooltip. It is part of the new GtkTooltip API
|
||||
// but seems also to work with the old GtkTooltips.
|
||||
if (gtk_check_version(2, 12, 0) == NULL)
|
||||
gtk_widget_set_has_tooltip(w, FALSE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
|
||||
|
Reference in New Issue
Block a user