From: Vadim Zeitlin Date: Thu, 11 Sep 2008 11:16:35 +0000 (+0000) Subject: partially revert 55488: don't use message box with copy button as it doesn't behave... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/13c7fb28ff4a376104822232b2a39afe52058d89 partially revert 55488: don't use message box with copy button as it doesn't behave correctly unfortunately (Esc doesn't work, copying the text unexpectedly closes the dialog) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 1393f0879e..f0c18bb999 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -364,27 +364,7 @@ void wxLogGui::Flush() // situation without it if ( !str.empty() ) { - // we use a message dialog with 2 buttons to be able to use one of them - // for copying the message text to clipboard -#if wxUSE_CLIPBOARD - wxMessageDialog dlg(NULL, str, title, style | wxYES_NO); - if ( !dlg.SetYesNoLabels(wxID_COPY, wxID_OK) ) -#endif // wxUSE_CLIPBOARD - { - // but if custom labels are not supported it makes no sense to keep - // two buttons so revert to a single one - dlg.SetMessageDialogStyle(style | wxOK); - } - -#if wxUSE_CLIPBOARD - if ( dlg.ShowModal() == wxID_YES ) - { - // this means the wxID_COPY button was selected - wxClipboardLocker clip; - if ( !clip || !wxTheClipboard->AddData(new wxTextDataObject(str)) ) - wxLogError(_("Failed to copy dialog contents to the clipboard.")); - } -#endif // wxUSE_CLIPBOARD + wxMessageBox(str, title, wxOK | style); // no undisplayed messages whatsoever Clear();