+ const int text_length = gtk_entry_get_text_length(entry);
+#if GTK_CHECK_VERSION(3,0,0) || defined(GSEAL_ENABLE)
+ const int text_max_length = gtk_entry_buffer_get_max_length(gtk_entry_get_buffer(entry));
+#else
+ const int text_max_length = entry->text_max_length;
+#endif
+ wxCHECK_RET(text_max_length, "shouldn't be called");