diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index 74091057a8..df78390d10 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -73,12 +73,17 @@ void wxToolTip::GTKApply(GtkWidget* widget, const char* tip) void wxToolTip::Enable( bool flag ) { +#ifdef __WXGTK4__ + wxUnusedVar(flag); +#else #if GTK_CHECK_VERSION(2, 12, 0) if (wx_is_at_least_gtk2(12)) { GtkSettings* settings = gtk_settings_get_default(); + wxGCC_WARNING_SUPPRESS(deprecated-declarations) if (settings) gtk_settings_set_long_property(settings, "gtk-enable-tooltips", flag, NULL); + wxGCC_WARNING_RESTORE() } else #endif @@ -93,16 +98,22 @@ void wxToolTip::Enable( bool flag ) gtk_tooltips_disable( gs_tooltips ); #endif } +#endif // !__WXGTK4__ } void wxToolTip::SetDelay( long msecs ) { +#ifdef __WXGTK4__ + wxUnusedVar(msecs); +#else #if GTK_CHECK_VERSION(2, 12, 0) if (wx_is_at_least_gtk2(12)) { GtkSettings* settings = gtk_settings_get_default(); + wxGCC_WARNING_SUPPRESS(deprecated-declarations) if (settings) gtk_settings_set_long_property(settings, "gtk-tooltip-timeout", msecs, NULL); + wxGCC_WARNING_RESTORE() } else #endif @@ -114,6 +125,7 @@ void wxToolTip::SetDelay( long msecs ) gtk_tooltips_set_delay( gs_tooltips, (int)msecs ); #endif } +#endif // !__WXGTK4__ } void wxToolTip::SetAutoPop( long WXUNUSED(msecs) )