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]

Use a character string for configtool version number


This patch implements the use of a character string to represent the
configtool version number throughout the application for consistency.

John Dallaway
eCosCentric Limited

--cut here--

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.40
diff -u -5 -r1.40 ChangeLog
--- ChangeLog	19 Mar 2003 17:39:03 -0000	1.40
+++ ChangeLog	25 Mar 2003 11:15:40 -0000
@@ -1,5 +1,13 @@
+2003-03-25  John Dallaway  <jld at ecoscentric dot com>
+
+	* standalone/wxwin/symbols.h,
+	  standalone/wxwin/aboutdlg.cpp,
+	  standalone/wxwin/configtool.cpp,
+	  standalone/wxwin/mainwin.cpp: Use a character string to represent
+	the configtool version number.
+
 2003-03-19  John Dallaway  <jld at ecoscentric dot com>
 
 	* standalone/wxwin/appsettings.cpp,
 	  standalone/wxwin/configtooldoc.cpp,
 	  standalone/wxwin/ecpch.h,
Index: standalone/wxwin/aboutdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/aboutdlg.cpp,v
retrieving revision 1.3
diff -u -5 -r1.3 aboutdlg.cpp
--- standalone/wxwin/aboutdlg.cpp	12 Sep 2001 00:59:18 -0000	1.3
+++ standalone/wxwin/aboutdlg.cpp	25 Mar 2003 11:15:42 -0000
@@ -105,13 +105,11 @@
     {
         htmlText.Printf(wxT("<html><head><title>Warning</title></head><body><P>Sorry, could not find resource for About dialog<P></body></html>"));
     }
 
     // Customize the HTML
-    wxString verString;
-    verString.Printf("%.2f", ecCONFIGURATION_TOOL_VERSION);
-    htmlText.Replace(wxT("$VERSION$"), verString);
+    htmlText.Replace(wxT("$VERSION$"), ecCONFIGURATION_TOOL_VERSION);
     htmlText.Replace(wxT("$DATE$"), __DATE__);
     
     wxSize htmlSize(420, 390);
 
     // Note: in later versions of wxWin this will be fixed so wxRAISED_BORDER
Index: standalone/wxwin/configtool.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.cpp,v
retrieving revision 1.14
diff -u -5 -r1.14 configtool.cpp
--- standalone/wxwin/configtool.cpp	18 Mar 2003 17:04:32 -0000	1.14
+++ standalone/wxwin/configtool.cpp	25 Mar 2003 11:16:02 -0000
@@ -244,11 +244,11 @@
     {
 #ifdef __WXGTK__
         wxLog::SetActiveTarget(new wxLogStderr);
 #endif
         wxString msg;
-        msg.Printf(wxT("eCos Configuration Tool (c) Red Hat, 2001 Version %.2f, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
+        msg.Printf(wxT("eCos Configuration Tool (c) Red Hat, 2001 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
         wxLogMessage(msg);
         return FALSE;
     }
 
 /*
@@ -656,11 +656,11 @@
         dc.SetFont(wxFont(11, wxSWISS, wxNORMAL, wxBOLD, FALSE));

         // Bottom left of area to start drawing at
 
         wxString verString;
-        verString.Printf("%.2f", ecCONFIGURATION_TOOL_VERSION);
+        verString.Printf("%s", ecCONFIGURATION_TOOL_VERSION);

         int x = 339; int y = 231;
 #ifdef __WXMSW__
         y += 5; // For some reason
 #endif
Index: standalone/wxwin/mainwin.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/mainwin.cpp,v
retrieving revision 1.12
diff -u -5 -r1.12 mainwin.cpp
--- standalone/wxwin/mainwin.cpp	18 Mar 2003 17:04:32 -0000	1.12
+++ standalone/wxwin/mainwin.cpp	25 Mar 2003 11:16:15 -0000
@@ -87,10 +87,11 @@
 #include "configtooldoc.h"
 #include "configtoolview.h"
 #include "folderdlg.h"
 #include "reposdlg.h"
 #include "docsystem.h"
+#include "symbols.h"
 
 #ifdef __WXMSW__
 #include "wx/msw/winundef.h"
 #endif
 
@@ -547,11 +548,13 @@
 
 void ecMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
 //    ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool"));
 //    dialog.ShowModal();
-    wxMessageBox(_("eCos Configuration Tool 2.13.net\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003"), _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK);
+	wxString msg;
+	msg.Printf("eCos Configuration Tool %s (%s %s)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__);
+    wxMessageBox(msg, _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK);
 }

 void ecMainFrame::OnSize(wxSizeEvent& WXUNUSED(event))
 {
     // First, we need to resize the sash windows proportionately,
Index: standalone/wxwin/symbols.h
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/symbols.h,v
retrieving revision 1.12
diff -u -5 -r1.12 symbols.h
--- standalone/wxwin/symbols.h	5 Feb 2003 13:53:22 -0000	1.12
+++ standalone/wxwin/symbols.h	25 Mar 2003 11:16:15 -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
@@ -41,10 +42,10 @@
 //
 //####DESCRIPTIONEND####
 //
 //===========================================================================

-#define ecCONFIGURATION_TOOL_VERSION        2.12
+#define ecCONFIGURATION_TOOL_VERSION        "2.13.net"

 // Use /ecos-x notation for drive specification
 #define ecUSE_ECOS_X_NOTATION               1



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