Avoid deprecated gtk_text_iter_begins_tag()
This commit is contained in:
@@ -10,10 +10,23 @@
|
|||||||
#ifndef _WX_GTK_PRIVATE_COMPAT3_H_
|
#ifndef _WX_GTK_PRIVATE_COMPAT3_H_
|
||||||
#define _WX_GTK_PRIVATE_COMPAT3_H_
|
#define _WX_GTK_PRIVATE_COMPAT3_H_
|
||||||
|
|
||||||
#if defined(__WXGTK3__)
|
|
||||||
|
|
||||||
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
|
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
|
// 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
|
#define gtk_widget_set_margin_end wx_gtk_widget_set_margin_end
|
||||||
|
|
||||||
|
#endif // __WXGTK3__
|
||||||
|
|
||||||
wxGCC_WARNING_RESTORE()
|
wxGCC_WARNING_RESTORE()
|
||||||
|
|
||||||
#endif // __WXGTK3__
|
|
||||||
#endif // _WX_GTK_PRIVATE_COMPAT3_H_
|
#endif // _WX_GTK_PRIVATE_COMPAT3_H_
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include "wx/gtk/private/gtk2-compat.h"
|
#include "wx/gtk/private/gtk2-compat.h"
|
||||||
|
#include "wx/gtk/private/gtk3-compat.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// helpers
|
// helpers
|
||||||
@@ -2006,7 +2007,7 @@ void wxTextCtrl::OnUrlMouseEvent(wxMouseEvent& event)
|
|||||||
SetCursor(wxCursor(wxCURSOR_HAND));
|
SetCursor(wxCursor(wxCURSOR_HAND));
|
||||||
|
|
||||||
start = end;
|
start = end;
|
||||||
if(!gtk_text_iter_begins_tag(&start, tag))
|
if (!gtk_text_iter_starts_tag(&start, tag))
|
||||||
gtk_text_iter_backward_to_tag_toggle(&start, tag);
|
gtk_text_iter_backward_to_tag_toggle(&start, tag);
|
||||||
if(!gtk_text_iter_ends_tag(&end, tag))
|
if(!gtk_text_iter_ends_tag(&end, tag))
|
||||||
gtk_text_iter_forward_to_tag_toggle(&end, tag);
|
gtk_text_iter_forward_to_tag_toggle(&end, tag);
|
||||||
|
Reference in New Issue
Block a user