From: Vadim Zeitlin Date: Wed, 28 Nov 2007 02:10:32 +0000 (+0000) Subject: always call GTKSetActivatesDefault(), not only if wxTE_PROCESS_ENTER style was given... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3cfe87da6e54dc7ce367c6028cf659667e695413?ds=inline always call GTKSetActivatesDefault(), not only if wxTE_PROCESS_ENTER style was given (patch 1835260) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index ccdba0721e..cfb354c9f4 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -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);