Forgot this part of the event change patch from 2_8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -757,6 +757,18 @@ bool wxTextCtrl::Create( wxWindow *parent,
|
|||||||
gtk_widget_show(m_text);
|
gtk_widget_show(m_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We want to be notified about text changes.
|
||||||
|
if (multi_line)
|
||||||
|
{
|
||||||
|
g_signal_connect (m_buffer, "changed",
|
||||||
|
G_CALLBACK (gtk_text_changed_callback), this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_signal_connect (m_text, "changed",
|
||||||
|
G_CALLBACK (gtk_text_changed_callback), this);
|
||||||
|
}
|
||||||
|
|
||||||
if (!value.empty())
|
if (!value.empty())
|
||||||
{
|
{
|
||||||
SetValue( value );
|
SetValue( value );
|
||||||
@@ -772,13 +784,9 @@ bool wxTextCtrl::Create( wxWindow *parent,
|
|||||||
if ( style & (wxTE_RIGHT | wxTE_CENTRE) )
|
if ( style & (wxTE_RIGHT | wxTE_CENTRE) )
|
||||||
GTKSetJustification();
|
GTKSetJustification();
|
||||||
|
|
||||||
// We want to be notified about text changes.
|
|
||||||
if (multi_line)
|
if (multi_line)
|
||||||
{
|
{
|
||||||
g_signal_connect (m_buffer, "changed",
|
// Handle URLs on multi-line controls with wxTE_AUTO_URL style
|
||||||
G_CALLBACK (gtk_text_changed_callback), this);
|
|
||||||
|
|
||||||
// .. and handle URLs on multi-line controls with wxTE_AUTO_URL style
|
|
||||||
if (style & wxTE_AUTO_URL)
|
if (style & wxTE_AUTO_URL)
|
||||||
{
|
{
|
||||||
GtkTextIter start, end;
|
GtkTextIter start, end;
|
||||||
@@ -814,12 +822,7 @@ bool wxTextCtrl::Create( wxWindow *parent,
|
|||||||
au_check_range(&start, &end);
|
au_check_range(&start, &end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
g_signal_connect (m_text, "changed",
|
|
||||||
G_CALLBACK (gtk_text_changed_callback), this);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_signal_connect (m_text, "copy-clipboard",
|
g_signal_connect (m_text, "copy-clipboard",
|
||||||
G_CALLBACK (gtk_copy_clipboard_callback), this);
|
G_CALLBACK (gtk_copy_clipboard_callback), this);
|
||||||
g_signal_connect (m_text, "cut-clipboard",
|
g_signal_connect (m_text, "cut-clipboard",
|
||||||
|
Reference in New Issue
Block a user