This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Configtool viewer selection
- From: John Dallaway <john at dallaway dot org dot uk>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Tue, 30 Dec 2008 10:19:35 +0000
- Subject: Configtool viewer selection
This patch allows for the selection of text viewer and HTML viewer
executables under Linux. Checked-in.
John Dallaway
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.74
diff -u -5 -r1.74 ChangeLog
--- ChangeLog 22 Dec 2008 21:37:03 -0000 1.74
+++ ChangeLog 30 Dec 2008 10:09:09 -0000
@@ -1,5 +1,10 @@
+2008-12-30 John Dallaway <john@dallaway.org.uk>
+
+ * standalone/wxwin/settingsdlg.cpp: Browse all files when selecting
+ HTML and text viewer applications under Linux.
+
2008-12-12 John Dallaway <jld@ecoscentric.com>
* standalone/wxwin/configtooldoc.cpp: Provide additional default state
for a new test platform.
Index: standalone/wxwin/settingsdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/settingsdlg.cpp,v
retrieving revision 1.5
diff -u -5 -r1.5 settingsdlg.cpp
--- standalone/wxwin/settingsdlg.cpp 13 Aug 2008 09:37:07 -0000 1.5
+++ standalone/wxwin/settingsdlg.cpp 30 Dec 2008 10:09:11 -0000
@@ -26,12 +26,12 @@
// appsettings.cpp :
//
//===========================================================================
//#####DESCRIPTIONBEGIN####
//
-// Author(s): julians
-// Contact(s): julians
+// Author(s): julians, jld
+// Contact(s): julians, jld
// Date: 2000/09/11
// Version: $Id: settingsdlg.cpp,v 1.16 2002/02/15 17:40:01 julians Exp $
// Purpose:
// Description: Implementation file for ecSettingsDialog
// Requires:
@@ -673,11 +673,16 @@
void ecViewerOptionsDialog::OnBrowseForViewer(wxCommandEvent& event)
{
wxString currentViewer = ((wxTextCtrl*) FindWindow(ecID_VIEWER_DIALOG_HEADER_TEXT))->GetValue();
wxFileDialog dialog(this, _("Choose a viewer executable"), wxPathOnly(currentViewer),
- wxFileNameFromPath(currentViewer), wxT("*.exe"));
+ wxFileNameFromPath(currentViewer),
+#ifdef __WXMSW__
+ wxT("Executable files (*.exe)|*.exe"));
+#else
+ wxT("All files (*)|*"));
+#endif
if (dialog.ShowModal() == wxID_OK)
{
((wxTextCtrl*) FindWindow(ecID_VIEWER_DIALOG_HEADER_TEXT))->SetValue(dialog.GetPath());
}
@@ -686,11 +691,16 @@
void ecViewerOptionsDialog::OnBrowseForBrowser(wxCommandEvent& event)
{
wxString currentViewer = ((wxTextCtrl*) FindWindow(ecID_VIEWER_DIALOG_DOC_TEXT))->GetValue();
wxFileDialog dialog(this, _("Choose a browser executable"), wxPathOnly(currentViewer),
- wxFileNameFromPath(currentViewer), wxT("*.exe"));
+ wxFileNameFromPath(currentViewer),
+#ifdef __WXMSW__
+ wxT("Executable files (*.exe)|*.exe"));
+#else
+ wxT("All files (*)|*"));
+#endif
if (dialog.ShowModal() == wxID_OK)
{
((wxTextCtrl*) FindWindow(ecID_VIEWER_DIALOG_DOC_TEXT))->SetValue(dialog.GetPath());
}