# HG changeset patch # User jld # Date 1284133701 0 # Node ID 5774e957adc24b24a6d8b0a35347fad7c821c720 # Parent 93b4b6fbee30fadad32a0f78809061d1cf64a727 * standalone/wxwin/configtooldoc.cpp: Allow import/export of eCos minimal configuration files with non-standard file suffixes. Based on patch from Ross Younger. [ Bugzilla 85580 ] 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,9 @@ +2010-09-10 John Dallaway + + * standalone/wxwin/configtooldoc.cpp: Allow import/export of + eCos minimal configuration files with non-standard file suffixes. + Based on patch from Ross Younger. [ Bugzilla 85580 ] + 2010-02-17 John Dallaway * standalone/common/ecosconfig.cxx: Fix compilation on recent diff --git a/host/tools/configtool/standalone/wxwin/configtooldoc.cpp b/host/tools/configtool/standalone/wxwin/configtooldoc.cpp --- a/host/tools/configtool/standalone/wxwin/configtooldoc.cpp +++ b/host/tools/configtool/standalone/wxwin/configtooldoc.cpp @@ -1,7 +1,7 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2006, 2008, 2009, 2010 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 @@ -2144,12 +2144,17 @@ const wxString ecConfigToolDoc::CurrentM bool ecConfigToolDoc::ExportFile() { + wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Export eCos Minimal Configuration"), + wxT(""), wxT(""), +#ifdef __WXMSW__ + wxT("eCos Minimal Configuration Files (*.ecm)|*.ecm|All Files (*.*)|*.*"), +#else + wxT("eCos Minimal Configuration Files (*.ecm)|*.ecm|All Files (*)|*"), +#endif #if wxCHECK_VERSION(2, 6, 0) - wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Export eCos Minimal Configuration"), - wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxSAVE|wxOVERWRITE_PROMPT); + wxSAVE|wxOVERWRITE_PROMPT); #else - wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Export eCos Minimal Configuration"), - wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxSAVE|wxOVERWRITE_PROMPT|wxHIDE_READONLY); + wxSAVE|wxOVERWRITE_PROMPT|wxHIDE_READONLY); #endif if (dialog.ShowModal() == wxID_OK) @@ -2178,12 +2183,17 @@ bool ecConfigToolDoc::ExportFile() bool ecConfigToolDoc::ImportFile() { + wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Import eCos Minimal Configuration"), + wxT(""), wxT(""), +#ifdef __WXMSW__ + wxT("eCos Minimal Configuration Files (*.ecm)|*.ecm|All Files (*.*)|*.*"), +#else + wxT("eCos Minimal Configuration Files (*.ecm)|*.ecm|All Files (*)|*"), +#endif #if wxCHECK_VERSION(2, 6, 0) - wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Import eCos Minimal Configuration"), - wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxOPEN|wxFILE_MUST_EXIST); + wxOPEN|wxFILE_MUST_EXIST); #else - wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Import eCos Minimal Configuration"), - wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY); + wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY); #endif if (dialog.ShowModal() == wxID_OK)