changeset 839:706b0bdaf01c

* standalone/wxwin/appsettings.cpp, standalone/wxwin/configtool.cpp: Look for a default repository at ../../packages relative to the configtool location as a last resort. * standalone/wxwin/configtool.cpp: Eliminate scroll bar jitter in the output pane during eCos builds. * standalone/wxwin/configtool.cpp (HasInput), standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.rc, standalone/wxwin/makefile.gnu: Allow configtool to build and run against wxWindows 2.4.0.
author jld
date Tue, 18 Mar 2003 17:04:32 +0000
parents 8d1a6007aeb1
children cd69699b7e0b
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/appsettings.cpp host/tools/configtool/standalone/wxwin/configtool.cpp host/tools/configtool/standalone/wxwin/configtool.rc host/tools/configtool/standalone/wxwin/mainwin.cpp host/tools/configtool/standalone/wxwin/makefile.gnu
diffstat 6 files changed, 43 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,19 @@
+2003-03-18  John Dallaway  <jld@ecoscentric.com>
+
+	* standalone/wxwin/appsettings.cpp,
+	  standalone/wxwin/configtool.cpp: Look for a default repository
+	at ../../packages relative to the configtool location as a last
+	resort.
+
+	* standalone/wxwin/configtool.cpp: Eliminate scroll bar jitter in
+	the output pane during eCos builds.
+
+	* standalone/wxwin/configtool.cpp (HasInput),
+	  standalone/wxwin/mainwin.cpp,
+	  standalone/wxwin/configtool.rc,
+	  standalone/wxwin/makefile.gnu: Allow configtool to build and run
+	against wxWindows 2.4.0.
+
 2003-03-07  John Dallaway  <jld@ecoscentric.com>
 
 	* standalone/wxwin/appsettings.cpp: Look in the right place for the
--- a/host/tools/configtool/standalone/wxwin/appsettings.cpp
+++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp
@@ -770,8 +770,8 @@ wxString ecSettings::FindLatestVersion()
             cont = dir.GetNext(& filename);
         }
     }
-    if (latestDir.IsEmpty())
-        latestDir = wxGetCwd();
+//    if (latestDir.IsEmpty())
+//        latestDir = wxGetCwd();
     return latestDir;
 #else
     wxMessageBox(wxT("FindLatestVersion() is only implemented for Unix."));
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtool.cpp
@@ -488,7 +488,7 @@ bool ecApp::OnInit()
                     wxString msg;
                     msg.Printf(wxT("Sorry, there was a problem compiling the help index."));
                     wxMessageBox(msg, wxGetApp().GetSettings().GetAppName(), wxICON_EXCLAMATION|wxOK);
-                    return FALSE;                   
+                    return FALSE;
                 }
             }
             else
@@ -496,7 +496,7 @@ bool ecApp::OnInit()
                 wxString msg;
                 msg.Printf(wxT("Sorry, there was no current document when compiling the help index."));
                 wxMessageBox(msg, wxGetApp().GetSettings().GetAppName(), wxICON_EXCLAMATION|wxOK);
-                return FALSE;                   
+                return FALSE;
             }
 
             // Return FALSE in order to quit the application
@@ -505,6 +505,21 @@ bool ecApp::OnInit()
     }
     else
     {
+        if (GetSettings().m_strRepository.IsEmpty()) // first invocation by this user
+        {
+            // we have no clues as to the location of the repository so
+            // test for ../../packages relative to the configtool location
+            wxFileName repository = wxFileName (m_appDir, wxEmptyString);
+            repository.Normalize(); // remove trailing "./" if present
+            repository.RemoveDir (repository.GetDirCount()-1);
+            repository.RemoveDir (repository.GetDirCount()-1);
+            repository.AppendDir (wxT("packages"));
+            if (repository.DirExists()) // we've found a repository
+            {
+                repository.RemoveDir (repository.GetDirCount()-1);
+                GetSettings().m_strRepository = repository.GetFullPath();
+            }
+        }
         m_docManager->CreateDocument(wxString(""), wxDOC_NEW);
     }
 
@@ -849,7 +864,7 @@ void ecApp::Log(const wxString& msg)
         if ((msg == wxEmptyString) || (msg.Last() != wxT('\n')))
             frame->GetOutputWindow()->AppendText(wxT("\n"));
 
-        frame->GetOutputWindow()->ShowPosition(frame->GetOutputWindow()->GetLastPosition());
+//        frame->GetOutputWindow()->ShowPosition(frame->GetOutputWindow()->GetLastPosition());
     }
 }
 
@@ -1457,7 +1472,7 @@ bool ecPipedProcess::HasInput()
     bool hasInput = FALSE;
 
     wxInputStream& is = *GetInputStream();
-    if ( !is.Eof() )
+    if ( IsInputAvailable() )
     {
         wxTextInputStream tis(is);
 
@@ -1471,7 +1486,7 @@ bool ecPipedProcess::HasInput()
     }
 
     wxInputStream& es = *GetErrorStream();
-    if ( !es.Eof() )
+    if ( IsErrorAvailable() )
     {
         wxTextInputStream tis(es);
 
--- a/host/tools/configtool/standalone/wxwin/configtool.rc
+++ b/host/tools/configtool/standalone/wxwin/configtool.rc
@@ -44,5 +44,4 @@ text                    ICON  "bitmaps/t
 text_dis                ICON  "bitmaps/text_dis.ico"
 
 #include "wx/msw/wx.rc"
-#include "wx/html/msw/wxhtml.rc"
-
+//#include "wx/html/msw/wxhtml.rc"
--- a/host/tools/configtool/standalone/wxwin/mainwin.cpp
+++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp
@@ -549,7 +549,7 @@ void ecMainFrame::OnAbout(wxCommandEvent
 {
 //    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);
+    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);
 }
 
 void ecMainFrame::OnSize(wxSizeEvent& WXUNUSED(event))
@@ -1329,7 +1329,7 @@ bool ecMainFrame::ProcessEvent(wxEvent& 
     if (& event == s_lastEvent)
         return FALSE;
 
-    if (event.IsCommandEvent())
+    if (event.IsCommandEvent() && !event.IsKindOf(CLASSINFO(wxChildFocusEvent)))
     {
         s_lastEvent = & event;
         
--- a/host/tools/configtool/standalone/wxwin/makefile.gnu
+++ b/host/tools/configtool/standalone/wxwin/makefile.gnu
@@ -32,8 +32,8 @@ ifeq "$(OSTYPE)" "cygwin"
   EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
 else
   PROGRAM=configtool
-  CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D__USE_WXCONFIG__
-  LDFLAGS=-L$(WXDIR)/lib -L/usr/X11R6/lib -lwx_gtk -lgtk -lgdk -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -lXi -lXext -lX11 -lm
+  CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
+  LDFLAGS=`$(WXDIR)/bin/wx-config --libs`
   EXTRAOBJECTS=
 endif