Applied some of patch [ 688466 ] MSVC7 build & bug fixes
by Darren Whobrey git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -199,7 +199,7 @@ public:
|
||||
|
||||
// Enables or disables the given tool.
|
||||
|
||||
virtual void EnableTool(const int toolIndex, const bool enable = TRUE);
|
||||
virtual void EnableTool(int toolIndex, bool enable = TRUE);
|
||||
|
||||
// Responds to size events, calling Layout.
|
||||
|
||||
|
@@ -512,6 +512,9 @@ void cbBarHintsPlugin::OnLeftUp( cbLeftUpEvent& event )
|
||||
if ( i == 0 )
|
||||
{
|
||||
mpLayout->SetBarState( mpClickedBar, wxCBAR_HIDDEN, TRUE );
|
||||
// Notify bar child window of close event:
|
||||
if(mpClickedBar->mpBarWnd!=NULL)
|
||||
mpClickedBar->mpBarWnd->Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -492,7 +492,7 @@ void wxDynamicToolBar::SetLayout( LayoutManagerBase* pLayout )
|
||||
Layout();
|
||||
}
|
||||
|
||||
void wxDynamicToolBar::EnableTool(const int toolIndex, const bool enable )
|
||||
void wxDynamicToolBar::EnableTool(int toolIndex, bool enable )
|
||||
{
|
||||
wxDynToolInfo* pInfo = GetToolInfo( toolIndex );
|
||||
|
||||
|
@@ -45,7 +45,6 @@ All GUI ports:
|
||||
- WXR resources can now be used in Unicode builds
|
||||
- it is now possible to use several wxFileHistory objects in the same menu
|
||||
by giving them different base IDs (Dimitri Schoolwerth)
|
||||
|
||||
- changed to type-safe wxSizerItemList for wxSizer child items
|
||||
Deprecated:
|
||||
wxSizer::Remove( wxWindow* )
|
||||
@@ -64,8 +63,12 @@ All GUI ports:
|
||||
wxListBase::operator wxList&()
|
||||
- use typesafe lists instead
|
||||
- Added wxTLW::SetShape with implementations for wxMSW and wxGTK (so
|
||||
far).
|
||||
|
||||
far)
|
||||
- FL: rmoved const from EnableTool parameters
|
||||
- FL: signal child window when toolbar is closed
|
||||
- In various places, changed tests for pathsep on last char of string to call
|
||||
wxEndsWithPathSeparator(s)
|
||||
- Added to defs.h a couple of macros (wxPtrToULong & wxULongToPtr)
|
||||
|
||||
Unix:
|
||||
|
||||
@@ -97,6 +100,12 @@ wxMSW:
|
||||
- fixed calling wxFrame::Maximize(FALSE) before the window is shown
|
||||
- all libraries built with makefile.g95 have a _min or _cyg suffix
|
||||
(for MinGW and Cygwin)
|
||||
- When using DLL, wxLocalFSHandler was not being exported - added
|
||||
WXEXPORTDLL
|
||||
- A wxEvtHandler object was not removed from wxPendingEvents on deletion.
|
||||
wxPendingEventsLocker was being deleted in App before all wxEvtHandler
|
||||
objects have been destroyed resulting in stale handler/lock
|
||||
ptrs; fixed
|
||||
|
||||
wxMotif:
|
||||
|
||||
|
@@ -794,6 +794,12 @@ typedef float wxFloat32 ;
|
||||
#define wxUINT64_SWAP_ON_BE(val) (val)
|
||||
#endif
|
||||
|
||||
// Macros to convert from unsigned long to void pointer.
|
||||
// High order truncation occurs if the respective type is not large enough.
|
||||
#define WXPTRULONGSLICE (((wxBYTE_ORDER==wxBIG_ENDIAN)&&(sizeof(void*)==8)&&(sizeof(unsigned long)<8))?1:0)
|
||||
#define wxPtrToULong(p) (((unsigned long*)(&(p)))[WXPTRULONGSLICE])
|
||||
#define wxULongToPtr(p,n) (p=NULL,wxPtrToULong(p)=(unsigned long)(n),p)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Geometric flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -241,7 +241,7 @@ special characters :
|
||||
*/
|
||||
|
||||
|
||||
class wxLocalFSHandler : public wxFileSystemHandler
|
||||
class WXDLLEXPORT wxLocalFSHandler : public wxFileSystemHandler
|
||||
{
|
||||
public:
|
||||
virtual bool CanOpen(const wxString& location);
|
||||
|
@@ -179,7 +179,7 @@ public: \
|
||||
CLASSNAME( size_type sz = 10, const hasher& hfun = hasher(), \
|
||||
const key_equal& k_eq = key_equal(), \
|
||||
const key_extractor& k_ex = key_extractor() ) \
|
||||
: m_tableBuckets( GetNextPrime( sz ) ), \
|
||||
: m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), \
|
||||
m_items( 0 ), \
|
||||
m_hasher( hfun ), \
|
||||
m_equals( k_eq ), \
|
||||
@@ -252,7 +252,7 @@ public: \
|
||||
delete *node; \
|
||||
(*node) = temp; \
|
||||
if( SHOULD_SHRINK( m_tableBuckets, m_items ) ) \
|
||||
ResizeTable( GetPreviousPrime( m_tableBuckets ) - 1 ); \
|
||||
ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); \
|
||||
return 1; \
|
||||
} \
|
||||
\
|
||||
@@ -324,7 +324,7 @@ protected: \
|
||||
\
|
||||
void ResizeTable( size_t newSize ) \
|
||||
{ \
|
||||
newSize = GetNextPrime( newSize ); \
|
||||
newSize = GetNextPrime( (unsigned long)newSize ); \
|
||||
Node** srcTable = m_table; \
|
||||
size_t srcBuckets = m_tableBuckets; \
|
||||
m_table = (Node**)AllocTable( newSize ); \
|
||||
@@ -441,7 +441,7 @@ public:
|
||||
|
||||
// TODO: this might not work well on architectures with 64 bit pointers but
|
||||
// 32 bit longs, we should use % ULONG_MAX there
|
||||
unsigned long operator()( const void* k ) const { return (unsigned long)k; }
|
||||
unsigned long operator()( const void* k ) const { return (unsigned long)wxPtrToULong(k); }
|
||||
|
||||
wxPointerHash& operator=(const wxPointerHash&) { return *this; }
|
||||
};
|
||||
|
@@ -67,7 +67,7 @@ public:
|
||||
// ---------
|
||||
|
||||
// get number of pages in the dialog
|
||||
int GetPageCount() const { return m_pages.GetCount(); }
|
||||
int GetPageCount() const { return (int) m_pages.GetCount(); }
|
||||
|
||||
// get the panel which represents the given page
|
||||
wxNotebookPage *GetPage(int nPage) { return m_pages[nPage]; }
|
||||
|
@@ -258,7 +258,7 @@ private:
|
||||
bool AssignCopy(size_t, const wxChar *);
|
||||
|
||||
// append a (sub)string
|
||||
bool ConcatSelf(int nLen, const wxChar *src);
|
||||
bool ConcatSelf(size_t nLen, const wxChar *src);
|
||||
|
||||
// functions called before writing to the string: they copy it if there
|
||||
// are other references to our data (should be the only owner when writing)
|
||||
|
@@ -77,7 +77,7 @@
|
||||
#include "wx/choicdlg.h"
|
||||
#include "wx/textdlg.h"
|
||||
#include "wx/filedlg.h"
|
||||
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/validate.h" // always include, even if !wxUSE_VALIDATORS
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
|
@@ -656,6 +656,15 @@ wxEvtHandler::~wxEvtHandler()
|
||||
# if !defined(__VISAGECPP__)
|
||||
delete m_eventsLocker;
|
||||
# endif
|
||||
|
||||
// Remove us from wxPendingEvents if necessary.
|
||||
if(wxPendingEventsLocker)
|
||||
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
|
||||
if ( wxPendingEvents ) {
|
||||
wxPendingEvents->DeleteObject(this);
|
||||
}
|
||||
if(wxPendingEventsLocker)
|
||||
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
||||
#endif
|
||||
|
||||
// we only delete object data, not untyped
|
||||
|
@@ -1406,7 +1406,7 @@ wxString wxFindFirstFile(const wxChar *spec, int flags)
|
||||
wxSplitPath(spec, &gs_dirPath, NULL, NULL);
|
||||
if ( gs_dirPath.IsEmpty() )
|
||||
gs_dirPath = wxT(".");
|
||||
if ( gs_dirPath.Last() != wxFILE_SEP_PATH )
|
||||
if ( !wxEndsWithPathSeparator(gs_dirPath ) )
|
||||
gs_dirPath << wxFILE_SEP_PATH;
|
||||
|
||||
if (gs_dir)
|
||||
|
@@ -608,7 +608,7 @@ wxString& wxString::operator=(const wchar_t *pwz)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// add something to this string
|
||||
bool wxString::ConcatSelf(int nSrcLen, const wxChar *pszSrcData)
|
||||
bool wxString::ConcatSelf(size_t nSrcLen, const wxChar *pszSrcData)
|
||||
{
|
||||
STATISTICS_ADD(SummandLength, nSrcLen);
|
||||
|
||||
|
@@ -939,7 +939,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
|
||||
{
|
||||
wxString eachFilename(dirs[i]);
|
||||
path = dirName;
|
||||
if (path.Last() != wxFILE_SEP_PATH)
|
||||
if (!wxEndsWithPathSeparator(path))
|
||||
path += wxString(wxFILE_SEP_PATH);
|
||||
path += eachFilename;
|
||||
|
||||
@@ -966,7 +966,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
|
||||
{
|
||||
wxString eachFilename(filenames[i]);
|
||||
path = dirName;
|
||||
if (path.Last() != wxFILE_SEP_PATH)
|
||||
if (!wxEndsWithPathSeparator(path))
|
||||
path += wxString(wxFILE_SEP_PATH);
|
||||
path += eachFilename;
|
||||
//path = dirName + wxString(wxT("/")) + eachFilename;
|
||||
@@ -1010,7 +1010,7 @@ wxTreeItemId wxGenericDirCtrl::FindChild(wxTreeItemId parentId, const wxString&
|
||||
if (data && !data->m_path.IsEmpty())
|
||||
{
|
||||
wxString childPath(data->m_path);
|
||||
if (childPath.Last() != wxFILE_SEP_PATH)
|
||||
if (!wxEndsWithPathSeparator(childPath))
|
||||
childPath += wxString(wxFILE_SEP_PATH);
|
||||
|
||||
// In MSW and PM, case is not significant
|
||||
|
@@ -273,7 +273,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
wxString new_name( _("NewName") );
|
||||
wxString path( data->m_path );
|
||||
if (path.Last() != wxFILE_SEP_PATH)
|
||||
if (!wxEndsWithPathSeparator(path))
|
||||
path += wxFILE_SEP_PATH;
|
||||
path += new_name;
|
||||
if (wxFileExists(path))
|
||||
@@ -287,7 +287,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) )
|
||||
new_name += num;
|
||||
|
||||
path = data->m_path;
|
||||
if (path.Last() != wxFILE_SEP_PATH)
|
||||
if (!wxEndsWithPathSeparator(path))
|
||||
path += wxFILE_SEP_PATH;
|
||||
path += new_name;
|
||||
i++;
|
||||
|
@@ -856,7 +856,7 @@ void wxFileCtrl::GoToParentDir()
|
||||
if (!IsTopMostDir(m_dirName))
|
||||
{
|
||||
size_t len = m_dirName.Len();
|
||||
if (m_dirName[len-1] == wxFILE_SEP_PATH)
|
||||
if (wxEndsWithPathSeparator(m_dirName))
|
||||
m_dirName.Remove( len-1, 1 );
|
||||
wxString fname( wxFileNameFromPath(m_dirName) );
|
||||
m_dirName = wxPathOnly( m_dirName );
|
||||
@@ -1038,7 +1038,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
|
||||
}
|
||||
|
||||
size_t len = m_dir.Len();
|
||||
if ((len > 1) && (m_dir[len-1] == wxFILE_SEP_PATH))
|
||||
if ((len > 1) && (wxEndsWithPathSeparator(m_dir)))
|
||||
m_dir.Remove( len-1, 1 );
|
||||
|
||||
m_path = m_dir;
|
||||
|
@@ -560,13 +560,14 @@ void wxApp::CleanUp()
|
||||
#endif
|
||||
|
||||
delete wxWinHandleHash;
|
||||
wxWinHandleHash = NULL; // Set to null in case anything later tries to ref it.
|
||||
|
||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
||||
// create a module for that as it's part of the core.
|
||||
delete wxPendingEvents;
|
||||
wxPendingEvents = NULL; // Set to null because wxAppBase::wxEvtHandler is destroyed later.
|
||||
|
||||
#if wxUSE_THREADS
|
||||
delete wxPendingEventsLocker;
|
||||
wxPendingEventsLocker = NULL; // Set to null because wxAppBase::wxEvtHandler is destroyed later.
|
||||
// If we don't do the following, we get an apparent memory leak
|
||||
#if wxUSE_VALIDATORS
|
||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
||||
|
@@ -578,7 +578,7 @@ wxString wxFindAppPath(const wxString& argv0, const wxString& cwd, const wxStrin
|
||||
{
|
||||
// Is it a relative path?
|
||||
wxString currentDir(cwd);
|
||||
if (currentDir.Last() != wxFILE_SEP_PATH)
|
||||
if (!wxEndsWithPathSeparator(currentDir))
|
||||
currentDir += wxFILE_SEP_PATH;
|
||||
|
||||
str = currentDir + argv0;
|
||||
|
Reference in New Issue
Block a user