changeset 2966:5774e957adc2

* 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 ]
author jld
date Fri, 10 Sep 2010 15:48:21 +0000
parents 93b4b6fbee30
children a98ace8abb52
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/configtooldoc.cpp
diffstat 2 files changed, 25 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-10  John Dallaway  <john@dallaway.org.uk>
+
+	* 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  <john@dallaway.org.uk>
 
 	* standalone/common/ecosconfig.cxx: Fix compilation on recent
--- 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)