work around probable bug in GTK+ 2.18 when calling WriteText on a new, empty control, #11409

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2009-11-04 05:18:38 +00:00
parent 80842e1632
commit 69cecdb1c4

View File

@ -351,7 +351,7 @@ extern "C" {
static void
au_check_word( GtkTextIter *s, GtkTextIter *e )
{
static const char *URIPrefixes[] =
static const char *const URIPrefixes[] =
{
"http://",
"ftp://",
@ -704,6 +704,9 @@ bool wxTextCtrl::Create( wxWindow *parent,
// a single-line text control: no need for scrollbars
m_widget =
m_text = gtk_entry_new();
// work around probable bug in GTK+ 2.18 when calling WriteText on a
// new, empty control, see http://trac.wxwidgets.org/ticket/11409
gtk_entry_get_text((GtkEntry*)m_text);
if (style & wxNO_BORDER)
g_object_set (m_text, "has-frame", FALSE, NULL);