# HG changeset patch # User jld # Date 1297082674 0 # Node ID 29b1ad0ac76d8007860e7e375093c35de3fe835f # Parent 5698d1884c8c757a76a39dc809bdeea9121845cf * standalone/wxwin/configitem.cpp: Escape newline chars in CDL values for display and in-cell editing. [ Bugzilla 1001144 ] * standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.cpp: Update copyright strings. diff --git a/host/tools/configtool/ChangeLog b/host/tools/configtool/ChangeLog --- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,3 +1,10 @@ +2011-02-07 John Dallaway + + * standalone/wxwin/configitem.cpp: Escape newline chars in CDL + values for display and in-cell editing. [ Bugzilla 1001144 ] + * standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.cpp: + Update copyright strings. + 2010-09-10 John Dallaway * standalone/wxwin/configtooldoc.cpp: Allow import/export of diff --git a/host/tools/configtool/standalone/wxwin/configitem.cpp b/host/tools/configtool/standalone/wxwin/configitem.cpp --- a/host/tools/configtool/standalone/wxwin/configitem.cpp +++ b/host/tools/configtool/standalone/wxwin/configitem.cpp @@ -1,7 +1,7 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -434,6 +434,7 @@ wxString ecConfigItem::GetDisplayValue() { if (GetCdlValuable()) str = StringValue(); + str.Replace("\n", "\\n"); // escape any newline chars (eg CYGDAT_UITRON_TASK_INITIALIZERS) } break; default: @@ -610,7 +611,9 @@ bool ecConfigItem::TransferDataFromWindo wxASSERT ( GetOptionType() == ecString ); // TODO: do checking - doc->SetValue(*this, win->GetValue()); + wxString str(win->GetValue()); + str.Replace("\\n", "\n"); // remove escaping of newline chars + doc->SetValue(*this, str); } else if (window->IsKindOf(CLASSINFO(ecDoubleEditorCtrl))) { @@ -1380,6 +1383,7 @@ void ecTextEditorCtrl::OnLeftDClick(wxMo ecConfigToolDoc* doc = wxGetApp().GetConfigToolDoc(); wxString initialValue(GetValue()); + initialValue.Replace("\\n", "\n"); // remove escaping of newline chars ecEditStringDialog dialog(initialValue, wxGetApp().GetTopWindow(), ecID_EDIT_STRING_DIALOG); if (dialog.ShowModal() == wxID_OK) diff --git a/host/tools/configtool/standalone/wxwin/configtool.cpp b/host/tools/configtool/standalone/wxwin/configtool.cpp --- a/host/tools/configtool/standalone/wxwin/configtool.cpp +++ b/host/tools/configtool/standalone/wxwin/configtool.cpp @@ -1,7 +1,7 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -284,7 +284,7 @@ bool ecApp::OnInit() wxLog::SetActiveTarget(new wxLogStderr); #endif wxString msg; - msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2009 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__); + msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2011 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__); wxLogMessage(msg); return FALSE; } diff --git a/host/tools/configtool/standalone/wxwin/mainwin.cpp b/host/tools/configtool/standalone/wxwin/mainwin.cpp --- a/host/tools/configtool/standalone/wxwin/mainwin.cpp +++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp @@ -1,7 +1,7 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -571,7 +571,7 @@ void ecMainFrame::OnAbout(wxCommandEvent int iTclVerMajor, iTclVerMinor, iTclVerPatchLevel; Tcl_GetVersion (&iTclVerMajor, &iTclVerMinor, &iTclVerPatchLevel, NULL); msg.Printf("eCos Configuration Tool %s (%s %s)\n\n" - "Copyright (c) Free Software Foundation, Inc. 1998-2009\n\n" + "Copyright (c) Free Software Foundation, Inc. 1998-2011\n\n" "Using %s %s and Tcl %d.%d.%d", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__, wxPlatformInfo::Get().GetPortIdName().c_str(), wxVERSION_NUM_DOT_STRING,