This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Eliminate wxWindows configtool dependencies on resource file


This patch eliminates the requirement to use a resource file (configtool.bin)
alongside the wxWindows configtool when built with GNU tools. This involves
supressing the splash screen pending a more elegant solution. The patch also
reverts a previous change in a call to PathRelativePathTo() which is more
correctly addressed in w32api/shlwapi.h header file.

John Dallaway

--cut here--

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.28
diff -u -5 -r1.28 ChangeLog
--- ChangeLog	25 Jan 2003 23:58:59 -0000	1.28
+++ ChangeLog	3 Feb 2003 15:37:13 -0000
@@ -1,5 +1,17 @@
+2003-02-03  John Dallaway  <jld@ecoscentric.com>
+
+	* standalone/wxwin/filename.cpp: Eliminate (const WCHAR*) cast
+	in call to PathRelativePathTo() which is related to an error
+	in w32api/shlwapi.h.
+
+	* standalone/configtool.cpp: Suppress obsolete splash screen and
+	associated resources for now.
+
+	* standalone/mainwin.cpp: Implement simplified 'About' dialog box
+	to eliminate configtool.bin resource file dependency.
+
 2003-01-25  John Dallaway  <jld@ecoscentric.com>
 
 	* standalone/wxwin/configtool.cpp: Use correct data type in call
 	to RegCreateKeyEx() to eliminate compiler warning.
 
Index: standalone/wxwin/configtool.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.cpp,v
retrieving revision 1.10
diff -u -5 -r1.10 configtool.cpp
--- standalone/wxwin/configtool.cpp	25 Jan 2003 23:58:59 -0000	1.10
+++ standalone/wxwin/configtool.cpp	3 Feb 2003 15:37:22 -0000
@@ -1,9 +1,10 @@
 //####COPYRIGHTBEGIN####
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
 // 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 the Free
@@ -25,12 +26,12 @@
 // configtool.cpp :
 //
 //===========================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):   julians
-// Contact(s):  julians
+// Author(s):   julians, jld
+// Contact(s):  julians, jld
 // Date:        2000/08/24
 // Version:     $Id: configtool.cpp,v 1.51 2001/12/11 15:59:51 julians Exp $
 // Purpose:
 // Description: Implementation file for the ConfigTool application class
 // Requires:
@@ -510,21 +511,21 @@
 // Load resources from disk
 bool ecApp::LoadResources()
 {
     wxFileSystem::AddHandler(new wxMemoryFSHandler);
 
-    LoadBitmapResource(m_splashScreenBitmap, wxT("splash16.png"), wxBITMAP_TYPE_PNG, FALSE);
+//    LoadBitmapResource(m_splashScreenBitmap, wxT("splash16.png"), wxBITMAP_TYPE_PNG, FALSE);

-    wxBitmap bitmap1, bitmap2, bitmap3;
-    LoadBitmapResource(bitmap1, wxT("ecoslogo.png"), wxBITMAP_TYPE_PNG, TRUE);
-    LoadBitmapResource(bitmap2, wxT("ecoslogosmall.png"), wxBITMAP_TYPE_PNG, TRUE);
-    LoadBitmapResource(bitmap3, wxT("rhlogo.png"), wxBITMAP_TYPE_PNG, TRUE);
+//    wxBitmap bitmap1, bitmap2, bitmap3;
+//    LoadBitmapResource(bitmap1, wxT("ecoslogo.png"), wxBITMAP_TYPE_PNG, TRUE);
+//    LoadBitmapResource(bitmap2, wxT("ecoslogosmall.png"), wxBITMAP_TYPE_PNG, TRUE);
+//    LoadBitmapResource(bitmap3, wxT("rhlogo.png"), wxBITMAP_TYPE_PNG, TRUE);
 
-    wxString aboutText;
-    LoadTextResource(aboutText, wxT("about.htm"), TRUE);
+//    wxString aboutText;
+//    LoadTextResource(aboutText, wxT("about.htm"), TRUE);

-    VersionStampSplashScreen();
+//    VersionStampSplashScreen();
 
     return TRUE;
 }

 // Load resources from zip resource file or disk
Index: standalone/wxwin/filename.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/filename.cpp,v
retrieving revision 1.5
diff -u -5 -r1.5 filename.cpp
--- standalone/wxwin/filename.cpp	25 Jan 2003 23:07:53 -0000	1.5
+++ standalone/wxwin/filename.cpp	3 Feb 2003 15:37:24 -0000
@@ -1,9 +1,10 @@
 //####COPYRIGHTBEGIN####
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
 // 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 the Free 
@@ -446,11 +447,11 @@
 
 ecFileName ecFileName::Relative(const wxChar* compare,const wxChar* current)
 {
 #ifdef __WXMSW__
     wxString rc;
-    bool b=(TRUE==PathRelativePathTo(rc.GetWriteBuf(1+MAX_PATH),current,FILE_ATTRIBUTE_DIRECTORY,(const WCHAR*)compare,0));
+    bool b=(TRUE==PathRelativePathTo(rc.GetWriteBuf(1+MAX_PATH),current,FILE_ATTRIBUTE_DIRECTORY,compare,0));
     rc.UngetWriteBuf();
     return b?(ecFileName)rc:(ecFileName)compare;
 #else
     wxFAIL_MSG("ecFileName::Relative not implemented on this platform.");
     return ecFileName();
Index: standalone/wxwin/mainwin.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/mainwin.cpp,v
retrieving revision 1.8
diff -u -5 -r1.8 mainwin.cpp
--- standalone/wxwin/mainwin.cpp	20 May 2002 22:19:28 -0000	1.8
+++ standalone/wxwin/mainwin.cpp	3 Feb 2003 15:37:30 -0000
@@ -1,9 +1,10 @@
 //####COPYRIGHTBEGIN####
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
 // 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 the Free
@@ -25,12 +26,12 @@
 // mainwin.cpp :
 //
 //===========================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):   julians
-// Contact(s):  julians
+// Author(s):   julians, jld
+// Contact(s):  julians, jld
 // Date:        2000/08/24
 // Version:     $Id: mainwin.cpp,v 1.57 2002/02/28 18:30:35 julians Exp $
 // Purpose:
 // Description: Implementation file for the ConfigTool main window
 // Requires:
@@ -544,12 +545,13 @@
     event.Enable( (wxGetApp().GetConfigToolDoc() != NULL) && !wxGetApp().GetSettings().m_findText.IsEmpty() );
 }
 
 void ecMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
-    ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool"));
-    dialog.ShowModal();
+//    ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool"));
+//    dialog.ShowModal();
+    wxMessageBox(_("eCos Configuration Tool 2.12.net\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003"), _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK);
 }
 
 void ecMainFrame::OnSize(wxSizeEvent& WXUNUSED(event))
 {
     // First, we need to resize the sash windows proportionately,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]