Only use underline-rgba property with GTK > 3.16
This avoids glib warnings object class 'GtkTextTag' has no property named 'underline-rgba-set' when calling g_object_get() with older GTK and just avoids doing useless work.
This commit is contained in:
@@ -1924,6 +1924,8 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
|
|||||||
|
|
||||||
wxColour underlineColour = wxNullColour;
|
wxColour underlineColour = wxNullColour;
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
|
if ( wx_is_at_least_gtk3(16) )
|
||||||
|
{
|
||||||
GSList* tags = gtk_text_iter_get_tags(&positioni);
|
GSList* tags = gtk_text_iter_get_tags(&positioni);
|
||||||
for ( GSList* tagp = tags; tagp != NULL; tagp = tagp->next )
|
for ( GSList* tagp = tags; tagp != NULL; tagp = tagp->next )
|
||||||
{
|
{
|
||||||
@@ -1942,6 +1944,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
|
|||||||
}
|
}
|
||||||
if ( tags )
|
if ( tags )
|
||||||
g_slist_free(tags);
|
g_slist_free(tags);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( underlineType != wxTEXT_ATTR_UNDERLINE_NONE )
|
if ( underlineType != wxTEXT_ATTR_UNDERLINE_NONE )
|
||||||
|
Reference in New Issue
Block a user