Fixed Dialog Editor compilation and window sizing bug. Various warning-related
fixed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -111,7 +111,7 @@ and other intermediate compiler files.
|
|||||||
|
|
||||||
Gotchas:
|
Gotchas:
|
||||||
|
|
||||||
- libwx.a is 28 MB or more - but only 2.9 MB if compiled with no
|
- libwx.a is 48 MB or more - but much less if compiled with no
|
||||||
debug info (-g0) and level 4 optimization (-O4).
|
debug info (-g0) and level 4 optimization (-O4).
|
||||||
- install.exe doesn't have built-in decompression because lzexpand.lib
|
- install.exe doesn't have built-in decompression because lzexpand.lib
|
||||||
isn't available with Gnu-Win32. However, you can use it with external
|
isn't available with Gnu-Win32. However, you can use it with external
|
||||||
|
@@ -1,37 +1,6 @@
|
|||||||
Current issues and bugs
|
Current issues and bugs
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
Debugging code
|
|
||||||
--------------
|
|
||||||
|
|
||||||
wxDebugContext and global memory operators doesn't work correctly,
|
|
||||||
for different (unresolved) reasons on different compilers.
|
|
||||||
|
|
||||||
1) In VC++ 5.0, if you use wxDebugAlloc for new and wxDebugFree
|
|
||||||
for delete, you get a crash to do with deallocating the debug
|
|
||||||
buffer in wxDebugContext. So although the global operators are
|
|
||||||
defined, they are #ifdefed to just call malloc and free to avoid
|
|
||||||
the problem. This means that non-object memory checking doesn't work.
|
|
||||||
The problem does seem to be something to do with a pointer
|
|
||||||
mysteriously changing its address, very similar to 2).
|
|
||||||
|
|
||||||
2) In BC++ 4.5, there isn't a crash, but instead the ofstream
|
|
||||||
pointer passed to SetStream from SetFile (which is called in
|
|
||||||
memcheck.cpp) gets mysteriously changed as it's passed to SetStream.
|
|
||||||
This means that when counting the number of outstanding memory
|
|
||||||
blocks, we can't compare the allocated block with m_debugStream
|
|
||||||
to say 'ignore this block because we can't free it before the
|
|
||||||
very end of the application'. Therefore it always looks like
|
|
||||||
there's a memory leak of one object, in memory.cpp, unless you
|
|
||||||
don't call wxDebugContext::SetFile.
|
|
||||||
|
|
||||||
The fact that pointers appear to change in both cases must
|
|
||||||
indicate a common problem and solution. If we could use the
|
|
||||||
standard global memory operators for ofstream and
|
|
||||||
wxDebugStreamBuf it might help, but I don't know how to do that -
|
|
||||||
I've redefined 'new' throughout as WXDEBUG_NEW (which is itself
|
|
||||||
defined as the 3-argument operator).
|
|
||||||
|
|
||||||
Owner-draw menus
|
Owner-draw menus
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@@ -1135,7 +1135,7 @@ const wxEventTable theClass::sm_eventTable =\
|
|||||||
const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
|
const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
|
||||||
|
|
||||||
#define END_EVENT_TABLE() \
|
#define END_EVENT_TABLE() \
|
||||||
{ 0, 0, 0, 0 } };
|
{ 0, 0, 0, 0, 0 } };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Event table macros
|
* Event table macros
|
||||||
|
@@ -193,6 +193,9 @@ public:
|
|||||||
class LineList
|
class LineList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
void SetNext(LineList *pNext) { m_pNext = pNext; }
|
||||||
|
void SetPrev(LineList *pPrev) { m_pPrev = pPrev; }
|
||||||
|
|
||||||
// ctor
|
// ctor
|
||||||
LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str)
|
LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str)
|
||||||
{ SetNext(pNext); SetPrev((LineList *) NULL); }
|
{ SetNext(pNext); SetPrev((LineList *) NULL); }
|
||||||
@@ -200,8 +203,6 @@ public:
|
|||||||
//
|
//
|
||||||
LineList *Next() const { return m_pNext; }
|
LineList *Next() const { return m_pNext; }
|
||||||
LineList *Prev() const { return m_pPrev; }
|
LineList *Prev() const { return m_pPrev; }
|
||||||
void SetNext(LineList *pNext) { m_pNext = pNext; }
|
|
||||||
void SetPrev(LineList *pPrev) { m_pPrev = pPrev; }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
void SetText(const wxString& str) { m_strLine = str; }
|
void SetText(const wxString& str) { m_strLine = str; }
|
||||||
@@ -316,9 +317,9 @@ public:
|
|||||||
wxFileConfig *Config() const { return m_pConfig; }
|
wxFileConfig *Config() const { return m_pConfig; }
|
||||||
bool IsDirty() const { return m_bDirty; }
|
bool IsDirty() const { return m_bDirty; }
|
||||||
|
|
||||||
bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
|
|
||||||
const ArrayEntries& Entries() const { return m_aEntries; }
|
const ArrayEntries& Entries() const { return m_aEntries; }
|
||||||
const ArrayGroups& Groups() const { return m_aSubgroups; }
|
const ArrayGroups& Groups() const { return m_aSubgroups; }
|
||||||
|
bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
|
||||||
|
|
||||||
// find entry/subgroup (NULL if not found)
|
// find entry/subgroup (NULL if not found)
|
||||||
ConfigGroup *FindSubgroup(const char *szName) const;
|
ConfigGroup *FindSubgroup(const char *szName) const;
|
||||||
|
@@ -83,16 +83,16 @@ class wxAcceleratorTable: public wxObject
|
|||||||
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
||||||
~wxAcceleratorTable();
|
~wxAcceleratorTable();
|
||||||
|
|
||||||
inline wxAcceleratorTable(const wxAcceleratorTable& accel)
|
inline wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject()
|
||||||
{ Ref(accel); }
|
{ Ref(accel); }
|
||||||
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
|
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
|
||||||
{ if (accel) Ref(*accel); }
|
{ if (accel) Ref(*accel); }
|
||||||
inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
|
|
||||||
{ if (*this == accel) return (*this); Ref(accel); return *this; }
|
|
||||||
inline bool operator == (const wxAcceleratorTable& accel)
|
inline bool operator == (const wxAcceleratorTable& accel)
|
||||||
{ return m_refData == accel.m_refData; }
|
{ return m_refData == accel.m_refData; }
|
||||||
inline bool operator != (const wxAcceleratorTable& accel)
|
inline bool operator != (const wxAcceleratorTable& accel)
|
||||||
{ return m_refData != accel.m_refData; }
|
{ return m_refData != accel.m_refData; }
|
||||||
|
inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
|
||||||
|
{ if (*this == accel) return (*this); Ref(accel); return *this; }
|
||||||
|
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ class wxRegion : public wxGDIObject
|
|||||||
wxRegion(void);
|
wxRegion(void);
|
||||||
~wxRegion(void);
|
~wxRegion(void);
|
||||||
|
|
||||||
inline wxRegion( const wxRegion& r )
|
inline wxRegion( const wxRegion& r ): wxGDIObject()
|
||||||
{ Ref(r); }
|
{ Ref(r); }
|
||||||
inline wxRegion& operator = ( const wxRegion& r )
|
inline wxRegion& operator = ( const wxRegion& r )
|
||||||
{ Ref(r); return (*this); }
|
{ Ref(r); return (*this); }
|
||||||
|
@@ -83,16 +83,16 @@ class wxAcceleratorTable: public wxObject
|
|||||||
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
||||||
~wxAcceleratorTable();
|
~wxAcceleratorTable();
|
||||||
|
|
||||||
inline wxAcceleratorTable(const wxAcceleratorTable& accel)
|
inline wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject()
|
||||||
{ Ref(accel); }
|
{ Ref(accel); }
|
||||||
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
|
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
|
||||||
{ if (accel) Ref(*accel); }
|
{ if (accel) Ref(*accel); }
|
||||||
inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
|
|
||||||
{ if (*this == accel) return (*this); Ref(accel); return *this; }
|
|
||||||
inline bool operator == (const wxAcceleratorTable& accel)
|
inline bool operator == (const wxAcceleratorTable& accel)
|
||||||
{ return m_refData == accel.m_refData; }
|
{ return m_refData == accel.m_refData; }
|
||||||
inline bool operator != (const wxAcceleratorTable& accel)
|
inline bool operator != (const wxAcceleratorTable& accel)
|
||||||
{ return m_refData != accel.m_refData; }
|
{ return m_refData != accel.m_refData; }
|
||||||
|
inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
|
||||||
|
{ if (*this == accel) return (*this); Ref(accel); return *this; }
|
||||||
|
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ class wxRegion : public wxGDIObject
|
|||||||
wxRegion(void);
|
wxRegion(void);
|
||||||
~wxRegion(void);
|
~wxRegion(void);
|
||||||
|
|
||||||
inline wxRegion( const wxRegion& r )
|
inline wxRegion( const wxRegion& r ): wxGDIObject()
|
||||||
{ Ref(r); }
|
{ Ref(r); }
|
||||||
inline wxRegion& operator = ( const wxRegion& r )
|
inline wxRegion& operator = ( const wxRegion& r )
|
||||||
{ Ref(r); return (*this); }
|
{ Ref(r); return (*this); }
|
||||||
|
@@ -142,6 +142,7 @@ public:
|
|||||||
|
|
||||||
// @@ no check is done that the list is really keyed on strings
|
// @@ no check is done that the list is really keyed on strings
|
||||||
const char *GetKeyString() const { return m_key.string; }
|
const char *GetKeyString() const { return m_key.string; }
|
||||||
|
long GetKeyInteger() const { return m_key.integer; }
|
||||||
|
|
||||||
#ifdef wxLIST_COMPATIBILITY
|
#ifdef wxLIST_COMPATIBILITY
|
||||||
// compatibility methods
|
// compatibility methods
|
||||||
|
@@ -125,12 +125,6 @@
|
|||||||
// be WXDEBUG_NEW (see object.h).
|
// be WXDEBUG_NEW (see object.h).
|
||||||
// If this causes problems (e.g. link errors), set this to 0.
|
// If this causes problems (e.g. link errors), set this to 0.
|
||||||
|
|
||||||
// GnuWin32 (b19) can't copy with these operators.
|
|
||||||
#ifdef __GNUWIN32__
|
|
||||||
#undef wxUSE_GLOBAL_MEMORY_OPERATORS 1
|
|
||||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define REMOVE_UNUSED_ARG 1
|
#define REMOVE_UNUSED_ARG 1
|
||||||
// Set this to 0 if your compiler can't cope
|
// Set this to 0 if your compiler can't cope
|
||||||
// with omission of prototype parameters.
|
// with omission of prototype parameters.
|
||||||
|
@@ -49,6 +49,7 @@ private: // static member functions
|
|||||||
public:
|
public:
|
||||||
wxTime(); // current time
|
wxTime(); // current time
|
||||||
wxTime(clockTy s) { sec = s; }
|
wxTime(clockTy s) { sec = s; }
|
||||||
|
void operator=(const wxTime& t) { sec = t.sec; } // Ordering required for some compilers
|
||||||
wxTime(const wxTime& t) { (*this) = t ; }
|
wxTime(const wxTime& t) { (*this) = t ; }
|
||||||
wxTime(hourTy h, minuteTy m, secondTy s =0, bool dst =FALSE);
|
wxTime(hourTy h, minuteTy m, secondTy s =0, bool dst =FALSE);
|
||||||
wxTime(const wxDate&, hourTy h =0, minuteTy m =0, secondTy s=0, bool dst =FALSE);
|
wxTime(const wxDate&, hourTy h =0, minuteTy m =0, secondTy s=0, bool dst =FALSE);
|
||||||
@@ -61,7 +62,6 @@ public:
|
|||||||
bool operator>=(const wxTime& t) const { return sec >= t.sec; }
|
bool operator>=(const wxTime& t) const { return sec >= t.sec; }
|
||||||
bool operator==(const wxTime& t) const { return sec == t.sec; }
|
bool operator==(const wxTime& t) const { return sec == t.sec; }
|
||||||
bool operator!=(const wxTime& t) const { return sec != t.sec; }
|
bool operator!=(const wxTime& t) const { return sec != t.sec; }
|
||||||
void operator=(const wxTime& t) { sec = t.sec; }
|
|
||||||
friend wxTime operator+(const wxTime& t, long s) { return wxTime(t.sec+s); }
|
friend wxTime operator+(const wxTime& t, long s) { return wxTime(t.sec+s); }
|
||||||
friend wxTime operator+(long s, const wxTime& t) { return wxTime(t.sec+s); }
|
friend wxTime operator+(long s, const wxTime& t) { return wxTime(t.sec+s); }
|
||||||
long operator-(const wxTime& t) const { return sec - t.sec; }
|
long operator-(const wxTime& t) const { return sec - t.sec; }
|
||||||
|
@@ -26,7 +26,6 @@ $(OBJDIR):
|
|||||||
|
|
||||||
memcheck$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
memcheck$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||||
$(CC) $(LDFLAGS) -o memcheck$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
$(CC) $(LDFLAGS) -o memcheck$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||||
$(RSRC) memcheck.$(RESSUFF) memcheck.exe
|
|
||||||
|
|
||||||
$(OBJDIR)/memcheck.$(OBJSUFF): memcheck.$(SRCSUFF)
|
$(OBJDIR)/memcheck.$(OBJSUFF): memcheck.$(SRCSUFF)
|
||||||
$(CC) -c $(CPPFLAGS) -o $@ memcheck.$(SRCSUFF)
|
$(CC) -c $(CPPFLAGS) -o $@ memcheck.$(SRCSUFF)
|
||||||
|
@@ -221,13 +221,14 @@ MSWOBJS = \
|
|||||||
wave.$(OBJSUFF) \
|
wave.$(OBJSUFF) \
|
||||||
window.$(OBJSUFF)
|
window.$(OBJSUFF)
|
||||||
|
|
||||||
# OLE not supported yet by GnuWin32 (?)
|
# OLE not supported yet by GnuWin32
|
||||||
# $(OLEDIR)/droptgt.$(OBJSUFF) \
|
# $(OLEDIR)/droptgt.$(OBJSUFF) \
|
||||||
# $(OLEDIR)/dropsrc.$(OBJSUFF) \
|
# $(OLEDIR)/dropsrc.$(OBJSUFF) \
|
||||||
# $(OLEDIR)/dataobj.$(OBJSUFF) \
|
# $(OLEDIR)/dataobj.$(OBJSUFF) \
|
||||||
# $(OLEDIR)/oleutils.$(OBJSUFF) \
|
# $(OLEDIR)/oleutils.$(OBJSUFF) \
|
||||||
# $(OLEDIR)/uuid.$(OBJSUFF)
|
# $(OLEDIR)/uuid.$(OBJSUFF)
|
||||||
|
|
||||||
|
|
||||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS)
|
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS)
|
||||||
|
|
||||||
all: $(OBJECTS) $(WXLIB)
|
all: $(OBJECTS) $(WXLIB)
|
||||||
|
@@ -653,7 +653,7 @@ wxItemResource *wxResourceManager::FindResourceForWindow(wxWindow *win)
|
|||||||
wxWindow *w = (wxWindow *)node->Data();
|
wxWindow *w = (wxWindow *)node->Data();
|
||||||
if (w == win)
|
if (w == win)
|
||||||
{
|
{
|
||||||
return (wxItemResource *)node->key.integer;
|
return (wxItemResource *)node->GetKeyInteger();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
|
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
|
||||||
#include <strstrea.h>
|
#include <strstrea.h>
|
||||||
|
#include <fstream.h>
|
||||||
#else
|
#else
|
||||||
#include <strstream.h>
|
#include <strstream.h>
|
||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "wx/scrolbar.h"
|
#include "wx/scrolbar.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
|
@@ -133,7 +133,7 @@ bool wxResourceSymbolTable::WriteIncludeFile(const wxString& filename)
|
|||||||
wxNode* node = m_hashTable.Next();
|
wxNode* node = m_hashTable.Next();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
char* str = node->key.string;
|
const char* str = node->GetKeyString();
|
||||||
int id = (int) node->Data() ;
|
int id = (int) node->Data() ;
|
||||||
|
|
||||||
if (!IsStandardSymbol(str))
|
if (!IsStandardSymbol(str))
|
||||||
@@ -181,7 +181,7 @@ wxString wxResourceSymbolTable::GetSymbolForId(int id)
|
|||||||
wxNode* node = m_hashTable.Next();
|
wxNode* node = m_hashTable.Next();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
char* str = node->key.string;
|
const char* str = node->GetKeyString();
|
||||||
if (str && ( ((int) node->Data()) == id) )
|
if (str && ( ((int) node->Data()) == id) )
|
||||||
return wxString(str);
|
return wxString(str);
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ bool wxResourceSymbolTable::FillComboBox(wxComboBox* comboBox)
|
|||||||
wxNode* node = m_hashTable.Next();
|
wxNode* node = m_hashTable.Next();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
char* str = node->key.string;
|
const char* str = node->GetKeyString();
|
||||||
|
|
||||||
comboBox->Append(str);
|
comboBox->Append(str);
|
||||||
node = m_hashTable.Next();
|
node = m_hashTable.Next();
|
||||||
|
@@ -308,7 +308,7 @@ wxProperty *wxWindowPropertyInfo::GetProperty(wxString& name)
|
|||||||
}
|
}
|
||||||
else if (name == "height")
|
else if (name == "height")
|
||||||
{
|
{
|
||||||
return new wxProperty("width", (long)resource->GetHeight(), "integer");
|
return new wxProperty("height", (long)resource->GetHeight(), "integer");
|
||||||
}
|
}
|
||||||
else if (name == "id")
|
else if (name == "id")
|
||||||
{
|
{
|
||||||
|
@@ -438,7 +438,8 @@ bool wxPropertyListView::CreateControls(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// May need to be changed in future to eliminate clashes with app.
|
// May need to be changed in future to eliminate clashes with app.
|
||||||
panel->SetClientData((char *)this);
|
// WHAT WAS THIS FOR?
|
||||||
|
// panel->SetClientData((char *)this);
|
||||||
|
|
||||||
// These buttons are at the bottom of the window, but create them now
|
// These buttons are at the bottom of the window, but create them now
|
||||||
// so the constraints are evaluated in the correct order
|
// so the constraints are evaluated in the correct order
|
||||||
|
Reference in New Issue
Block a user