// 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.
if ( i == 0 )
{
mpLayout->SetBarState( mpClickedBar, wxCBAR_HIDDEN, TRUE );
+ // Notify bar child window of close event:
+ if(mpClickedBar->mpBarWnd!=NULL)
+ mpClickedBar->mpBarWnd->Close();
}
else
{
Layout();
}
-void wxDynamicToolBar::EnableTool(const int toolIndex, const bool enable )
+void wxDynamicToolBar::EnableTool(int toolIndex, bool enable )
{
wxDynToolInfo* pInfo = GetToolInfo( toolIndex );
- 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* )
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:
- 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:
#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
// ----------------------------------------------------------------------------
*/
-class wxLocalFSHandler : public wxFileSystemHandler
+class WXDLLEXPORT wxLocalFSHandler : public wxFileSystemHandler
{
public:
virtual bool CanOpen(const wxString& location);
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 ), \
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; \
} \
\
\
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 ); \
// 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; }
};
// ---------
// 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]; }
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)
#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
# 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
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)
// ---------------------------------------------------------------------------
// 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);
{
wxString eachFilename(dirs[i]);
path = dirName;
- if (path.Last() != wxFILE_SEP_PATH)
+ if (!wxEndsWithPathSeparator(path))
path += wxString(wxFILE_SEP_PATH);
path += eachFilename;
{
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;
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
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))
new_name += num;
path = data->m_path;
- if (path.Last() != wxFILE_SEP_PATH)
+ if (!wxEndsWithPathSeparator(path))
path += wxFILE_SEP_PATH;
path += new_name;
i++;
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 );
}
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;
#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();
{
// Is it a relative path?
wxString currentDir(cwd);
- if (currentDir.Last() != wxFILE_SEP_PATH)
+ if (!wxEndsWithPathSeparator(currentDir))
currentDir += wxFILE_SEP_PATH;
str = currentDir + argv0;