changeset 3276:53088a1817a7

* standalone/wxwin/standalone/wxwin/finddlg.cpp, standalone/wxwin/msgdlgex.cpp, standalone/wxwin/packagesdlg.cpp, standalone/wxwin/packagesdlg.h, standalone/wxwin/settingsdlg.cpp, standalone/wxwin/templatesdlg.cpp: Eliminate deprecated wxWidgets calls. [ Bugzilla 1001947 ] * standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.cpp: Update copyright strings.
author jld
date Fri, 28 Feb 2014 09:47:26 +0000
parents 5a5723396af5
children 047bbfee43f6
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/configtool.cpp host/tools/configtool/standalone/wxwin/finddlg.cpp host/tools/configtool/standalone/wxwin/mainwin.cpp host/tools/configtool/standalone/wxwin/msgdlgex.cpp host/tools/configtool/standalone/wxwin/packagesdlg.cpp host/tools/configtool/standalone/wxwin/packagesdlg.h host/tools/configtool/standalone/wxwin/settingsdlg.cpp host/tools/configtool/standalone/wxwin/templatesdlg.cpp
diffstat 9 files changed, 88 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,15 @@
+2014-02-28  Andy Jackson  <andy@xylanta.com>
+
+	* standalone/wxwin/standalone/wxwin/finddlg.cpp,
+	  standalone/wxwin/msgdlgex.cpp,
+	  standalone/wxwin/packagesdlg.cpp,
+	  standalone/wxwin/packagesdlg.h,
+	  standalone/wxwin/settingsdlg.cpp,
+	  standalone/wxwin/templatesdlg.cpp: Eliminate deprecated wxWidgets
+	calls. [ Bugzilla 1001947 ]
+	* standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.cpp:
+	Update copyright strings.
+
 2013-03-15  John Dallaway  <john@dallaway.org.uk>
 
 	* standalone/wxwin/admindlg.cpp: Pass POSIX-style paths to
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtool.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012, 2013, 2014 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     
@@ -284,7 +284,7 @@ bool ecApp::OnInit()
         wxLog::SetActiveTarget(new wxLogStderr);
 #endif
         wxString msg;
-        msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2013 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
+        msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2014 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
         wxLogMessage(msg);
         return FALSE;
     }
--- a/host/tools/configtool/standalone/wxwin/finddlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/finddlg.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
+// Copyright (C) 1998, 1999, 2000, 2014 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     
@@ -237,7 +237,11 @@ void ecFindDialog::OnFindNext(wxCommandE
 
             rect2 = GetRect(); // screen coords
 
-            if (rect2.Inside(topLeft) || rect2.Inside(bottomRight))
+#if wxCHECK_VERSION(2, 8, 0)
+            if (rect2.Contains(topLeft) || rect2.Contains(bottomRight))
+#else
+            if (rect2.Inside(topLeft) || rect2.Inside(bottomRight))
+#endif
             {
                 Move(wxPoint(topLeft.x + rect1.width, rect2.y));
             }
--- a/host/tools/configtool/standalone/wxwin/mainwin.cpp
+++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012, 2013, 2014 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     
@@ -571,7 +571,7 @@ void ecMainFrame::OnAbout(wxCommandEvent
 	int iTclVerMajor, iTclVerMinor, iTclVerPatchLevel;
 	Tcl_GetVersion (&iTclVerMajor, &iTclVerMinor, &iTclVerPatchLevel, NULL);
 	msg.Printf("eCos Configuration Tool %s (%s %s)\n\n"
-		"Copyright (c) Free Software Foundation, Inc. 1998-2013\n\n"
+		"Copyright (c) Free Software Foundation, Inc. 1998-2014\n\n"
 		"Using %s %s and Tcl %d.%d.%d",
 		ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__,
 		wxPlatformInfo::Get().GetPortIdName().c_str(), wxVERSION_NUM_DOT_STRING,
--- a/host/tools/configtool/standalone/wxwin/msgdlgex.cpp
+++ b/host/tools/configtool/standalone/wxwin/msgdlgex.cpp
@@ -46,7 +46,10 @@
 #include "wx/statbox.h"
 #include "wx/stattext.h"
 #include "wx/statbmp.h"
-#include "wx/bmpbuttn.h"
+#include "wx/bmpbuttn.h"
+#if wxCHECK_VERSION(2, 8, 0)
+#include "wx/artprov.h"
+#endif
 
 //----------------------------------------------------------------------------
 // wxMessageDialogEx
@@ -73,8 +76,13 @@ wxMessageDialogEx::wxMessageDialogEx( wx
     // 1) icon
     if (style & wxICON_MASK)
     {
-         wxStaticBitmap *icon = new wxStaticBitmap(
-            this, -1, wxTheApp->GetStdIcon((int)(style & wxICON_MASK)));
+#if wxCHECK_VERSION(2, 8, 0)
+         wxStaticBitmap *icon = new wxStaticBitmap(this, wxID_ANY,
+                            wxArtProvider::GetIcon(wxART_INFORMATION));
+#else
+         wxStaticBitmap *icon = new wxStaticBitmap(
+            this, -1, wxTheApp->GetStdIcon((int)(style & wxICON_MASK)));
+#endif
          icon_text->Add( icon, 0, wxCENTER );
     }
 
--- a/host/tools/configtool/standalone/wxwin/packagesdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/packagesdlg.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2009 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2009, 2014 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     
@@ -97,7 +97,11 @@ m_timer(this)
     m_keywords = wxEmptyString;
     m_updateLists = FALSE;
     m_updateInterval = 600; // Milliseconds
-    wxStartTimer();
+#if wxCHECK_VERSION(2, 8, 0)
+    m_StopWatch.Start();
+#else
+    wxStartTimer();
+#endif
     
     SetExtraStyle(wxDIALOG_EX_CONTEXTHELP);
     
@@ -362,10 +366,18 @@ void ecPackagesDialog::Fill()
     // wxGTK doesn't deselect items properly when clearing, I think
     int i;
     for (i = 0; i < availableList->GetCount(); i++)
-        if (availableList->Selected(i))
+#if wxCHECK_VERSION(2, 8, 0)
+        if (availableList->IsSelected(i))
+#else
+        if (availableList->Selected(i))
+#endif
             availableList->Deselect(i);
     for (i = 0; i < useList->GetCount(); i++)
-        if (useList->Selected(i))
+#if wxCHECK_VERSION(2, 8, 0)
+        if (useList->IsSelected(i))
+#else
+        if (useList->Selected(i))
+#endif
             useList->Deselect(i);
     
     availableList->Clear();
@@ -698,7 +710,11 @@ void ecPackagesDialog::OnClearKeywords(w
     TransferDataFromWindow();
     Fill();
     m_updateLists = FALSE;
-    wxStartTimer();
+#if wxCHECK_VERSION(2, 8, 0)
+    m_StopWatch.Start();
+#else
+    wxStartTimer();
+#endif
     FindWindow( ecID_PACKAGES_DIALOG_KEYWORDS )->SetFocus();
 }
 
@@ -713,7 +729,11 @@ void ecPackagesDialog::OnUpdateKeywordTe
     
     TransferDataFromWindow();
     m_updateLists = TRUE;
-    wxStartTimer();
+#if wxCHECK_VERSION(2, 8, 0)
+    m_StopWatch.Start();
+#else
+    wxStartTimer();
+#endif
 }
 
 void ecPackagesDialog::OnClickOmitHardwarePackages(wxCommandEvent& event)
@@ -730,12 +750,20 @@ void ecPackagesDialog::OnClickExactMatch
 
 void ecPackagesDialog::OnIdle(wxIdleEvent& event)
 {
-    long elapsed = wxGetElapsedTime(FALSE);
+#if wxCHECK_VERSION(2, 8, 0)
+    long elapsed = m_StopWatch.Time();
+#else
+    long elapsed = wxGetElapsedTime(FALSE);
+#endif
     if (m_updateLists && (elapsed > m_updateInterval))
     {
         m_updateLists = FALSE;
         Fill();
-        wxStartTimer();
+#if wxCHECK_VERSION(2, 8, 0)
+        m_StopWatch.Start();
+#else
+        wxStartTimer();
+#endif
     }
 }
 
--- a/host/tools/configtool/standalone/wxwin/packagesdlg.h
+++ b/host/tools/configtool/standalone/wxwin/packagesdlg.h
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
+// Copyright (C) 1998, 1999, 2000, 2014 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     
@@ -143,7 +143,10 @@ private:
     wxString        m_keywords;
     bool            m_updateLists; // If true, the keyword changed and we need to update the lists
     long            m_updateInterval; // Interval before display is updated
-    ecPackagesTimer m_timer;
+    ecPackagesTimer m_timer;
+#if wxCHECK_VERSION(2, 8, 0)
+    wxStopWatch     m_StopWatch;
+#endif
 };
 
 #define ecID_PACKAGES_DIALOG_AVAILABLE_LIST     10066
--- a/host/tools/configtool/standalone/wxwin/settingsdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/settingsdlg.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2005, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2005, 2008, 2009, 2014 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     
@@ -443,7 +443,11 @@ void ecDisplayOptionsDialog::OnChangeFon
         wxFontData data;
         data.SetInitialFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(str));
 
-        wxFontDialog dlg(this, & data);
+#if wxCHECK_VERSION(2, 8, 0)
+        wxFontDialog dlg(this, data);
+#else
+        wxFontDialog dlg(this, & data);
+#endif
         if (dlg.ShowModal() == wxID_OK)
         {
             wxGetApp().GetSettings().GetWindowSettings().SetFont(str, dlg.GetFontData().GetChosenFont()) ;
--- a/host/tools/configtool/standalone/wxwin/templatesdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/templatesdlg.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
+// Copyright (C) 1998, 1999, 2000, 2014 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     
@@ -350,8 +350,13 @@ void ecTemplatesDialog::ShowDetails(bool
     }
     else
     {
-        GetSizer()->Remove(win1);
-        GetSizer()->Remove(win2);
+#if wxCHECK_VERSION(2, 8, 0)
+        GetSizer()->Detach(win1);
+        GetSizer()->Detach(win2);
+#else
+        GetSizer()->Remove(win1);
+        GetSizer()->Remove(win2);
+#endif
         button->SetLabel("&Details >>");
     }
     win1->Show(show);