use #if wxUSE_UNICODE instead of #ifdefs (which totally broke ANSI build)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -685,7 +685,7 @@ bool wxTextCtrl::Create( wxWindow *parent,
|
|||||||
|
|
||||||
if (style & wxNO_BORDER)
|
if (style & wxNO_BORDER)
|
||||||
g_object_set (m_text, "has-frame", FALSE, NULL);
|
g_object_set (m_text, "has-frame", FALSE, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_parent->DoAddChild( this );
|
m_parent->DoAddChild( this );
|
||||||
@@ -959,16 +959,16 @@ void wxTextCtrl::DoSetValue( const wxString &value, int flags )
|
|||||||
{
|
{
|
||||||
if ( !(flags & SetValue_SendEvent) )
|
if ( !(flags & SetValue_SendEvent) )
|
||||||
EnableTextChangedEvents(false);
|
EnableTextChangedEvents(false);
|
||||||
|
|
||||||
gtk_text_buffer_set_text( m_buffer, "", 0 );
|
gtk_text_buffer_set_text( m_buffer, "", 0 );
|
||||||
|
|
||||||
if ( !(flags & SetValue_SendEvent) )
|
if ( !(flags & SetValue_SendEvent) )
|
||||||
EnableTextChangedEvents(true);
|
EnableTextChangedEvents(true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
const wxCharBuffer buffer(value.utf8_str());
|
const wxCharBuffer buffer(value.utf8_str());
|
||||||
#else
|
#else
|
||||||
wxFontEncoding enc = m_defaultStyle.HasFont()
|
wxFontEncoding enc = m_defaultStyle.HasFont()
|
||||||
@@ -1024,7 +1024,7 @@ void wxTextCtrl::WriteText( const wxString &text )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
const wxCharBuffer buffer(text.utf8_str());
|
const wxCharBuffer buffer(text.utf8_str());
|
||||||
#else
|
#else
|
||||||
// check if we have a specific style for the current position
|
// check if we have a specific style for the current position
|
||||||
|
Reference in New Issue
Block a user