]> git.saurik.com Git - wxWidgets.git/commitdiff
always call GTKSetActivatesDefault(), not only if wxTE_PROCESS_ENTER style was given...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 28 Nov 2007 02:10:32 +0000 (02:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 28 Nov 2007 02:10:32 +0000 (02:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp

index ccdba0721ec09a11513f568f1262aa8c7c2a532a..cfb354c9f4c3f510a7ff1ef4bf9d719804f4eaea 100644 (file)
@@ -737,9 +737,6 @@ bool wxTextCtrl::Create( wxWindow *parent,
     if (style & wxTE_READONLY)
         GTKSetEditable();
 
-    if (style & wxTE_PROCESS_ENTER)
-        GTKSetActivatesDefault();
-
     // left justification (alignment) is the default anyhow
     if ( style & (wxTE_RIGHT | wxTE_CENTRE) )
         GTKSetJustification();
@@ -782,6 +779,13 @@ bool wxTextCtrl::Create( wxWindow *parent,
             au_check_range(&start, &end);
         }
     }
+    else // single line
+    {
+        // do the right thing with Enter presses depending on whether we have
+        // wxTE_PROCESS_ENTER or not
+        GTKSetActivatesDefault();
+    }
+
 
     g_signal_connect (m_text, "copy-clipboard",
                       G_CALLBACK (gtk_copy_clipboard_callback), this);