]> git.saurik.com Git - wxWidgets.git/commitdiff
Forgot this part of the event change patch from 2_8
authorRobert Roebling <robert@roebling.de>
Fri, 22 Jun 2007 12:34:03 +0000 (12:34 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 22 Jun 2007 12:34:03 +0000 (12:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp

index 4b2f349fb2f767b45037d4da9715f3b7500010cd..26e65214afff677e047b6ca62c72d8b063d94d5e 100644 (file)
@@ -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",