Avoid deprecated gtk_text_iter_begins_tag()

This commit is contained in:
Paul Cornett
2017-12-17 21:51:36 -08:00
parent ba4da9fdf9
commit b2ea617145
2 changed files with 19 additions and 4 deletions

View File

@@ -10,10 +10,23 @@
#ifndef _WX_GTK_PRIVATE_COMPAT3_H_
#define _WX_GTK_PRIVATE_COMPAT3_H_
#if defined(__WXGTK3__)
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
#ifndef __WXGTK4__
// ----------------------------------------------------------------------------
// the following were introduced in GTK+ 3.20
static inline gboolean wx_gtk_text_iter_starts_tag(const GtkTextIter* iter, GtkTextTag* tag)
{
return gtk_text_iter_begins_tag(iter, tag);
}
#define gtk_text_iter_starts_tag wx_gtk_text_iter_starts_tag
#endif // !__WXGTK4__
#ifdef __WXGTK3__
// ----------------------------------------------------------------------------
// the following were introduced in GTK+ 3.12
@@ -29,7 +42,8 @@ static inline void wx_gtk_widget_set_margin_end(GtkWidget* widget, gint margin)
}
#define gtk_widget_set_margin_end wx_gtk_widget_set_margin_end
#endif // __WXGTK3__
wxGCC_WARNING_RESTORE()
#endif // __WXGTK3__
#endif // _WX_GTK_PRIVATE_COMPAT3_H_