From: Robert Roebling Date: Fri, 22 Jun 2007 12:34:03 +0000 (+0000) Subject: Forgot this part of the event change patch from 2_8 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4a3f5ad0f57884c7cd5c5016cdc292ed53d328f3 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 --- diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 4b2f349fb2..26e65214af 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -757,6 +757,18 @@ bool wxTextCtrl::Create( wxWindow *parent, 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()) { SetValue( value ); @@ -772,13 +784,9 @@ bool wxTextCtrl::Create( wxWindow *parent, if ( style & (wxTE_RIGHT | wxTE_CENTRE) ) GTKSetJustification(); - // We want to be notified about text changes. if (multi_line) { - g_signal_connect (m_buffer, "changed", - G_CALLBACK (gtk_text_changed_callback), this); - - // .. and handle URLs on multi-line controls with wxTE_AUTO_URL style + // Handle URLs on multi-line controls with wxTE_AUTO_URL style if (style & wxTE_AUTO_URL) { GtkTextIter start, end; @@ -814,12 +822,7 @@ bool wxTextCtrl::Create( wxWindow *parent, 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_CALLBACK (gtk_copy_clipboard_callback), this); g_signal_connect (m_text, "cut-clipboard",