From a6e2b3a8316c430a68f91b3c894e856987dd972e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 6 Mar 2000 17:16:12 +0000 Subject: [PATCH] patches from Ricky Gonzales : 1. BC++ 5.5 compilation/building fixes 2. wxMSW listctrl will use correct ILC_COLOR flag depending on current display depth 3. wxFrame::Show() argument is TRUE by default undet GTK/Motif too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/frame.h | 2 +- include/wx/gtk1/frame.h | 2 +- include/wx/motif/frame.h | 2 +- src/generic/listctrl.cpp | 2 +- src/jpeg/jmorecfg.h | 4 ++-- src/makeb32.env | 5 +++-- src/makeprog.b32 | 4 ++-- src/msw/imaglist.cpp | 11 ++++++++++- 8 files changed, 21 insertions(+), 11 deletions(-) diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h index 582554c7ef..34cb29433b 100644 --- a/include/wx/gtk/frame.h +++ b/include/wx/gtk/frame.h @@ -87,7 +87,7 @@ public: void SetToolBar(wxToolBar *toolbar); #endif // wxUSE_TOOLBAR - virtual bool Show(bool show); + virtual bool Show(bool show = TRUE); virtual void SetTitle( const wxString &title ); virtual wxString GetTitle() const { return m_title; } diff --git a/include/wx/gtk1/frame.h b/include/wx/gtk1/frame.h index 582554c7ef..34cb29433b 100644 --- a/include/wx/gtk1/frame.h +++ b/include/wx/gtk1/frame.h @@ -87,7 +87,7 @@ public: void SetToolBar(wxToolBar *toolbar); #endif // wxUSE_TOOLBAR - virtual bool Show(bool show); + virtual bool Show(bool show = TRUE); virtual void SetTitle( const wxString &title ); virtual wxString GetTitle() const { return m_title; } diff --git a/include/wx/motif/frame.h b/include/wx/motif/frame.h index 7eef0ba08b..e3e1e553ea 100644 --- a/include/wx/motif/frame.h +++ b/include/wx/motif/frame.h @@ -43,7 +43,7 @@ public: virtual ~wxFrame(); - bool Show(bool show); + virtual bool Show(bool show = TRUE); // Set menu bar void SetMenuBar(wxMenuBar *menu_bar); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index e1928cc532..bc36ba9125 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -25,7 +25,7 @@ #include "wx/generic/imaglist.h" #ifndef wxUSE_GENERIC_LIST_EXTENSIONS -#define wxUSE_GENERIC_LIST_EXTENSIONS 0 +#define wxUSE_GENERIC_LIST_EXTENSIONS 1 #endif // ============================================================================ diff --git a/src/jpeg/jmorecfg.h b/src/jpeg/jmorecfg.h index a8fc0e7892..2733047bac 100644 --- a/src/jpeg/jmorecfg.h +++ b/src/jpeg/jmorecfg.h @@ -158,12 +158,12 @@ typedef short INT16; /* INT32 must hold at least signed 32-bit values. */ /* Modified JACS 23/4/99. 1200 means VC++ 6 */ -#if !defined(XMD_H) && !(_MSC_VER >= 1200) /* X11/xmd.h correctly defines INT32 */ +#if !defined(XMD_H) && !(_MSC_VER >= 1200) && !(__BORLANDC__ >= 0x550) /* X11/xmd.h correctly defines INT32 */ typedef long INT32; #endif /* Added JACS 23/4/99, to get INT32 definition */ -#if (_MSC_VER >= 1200) +#if (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550) #include #endif diff --git a/src/makeb32.env b/src/makeb32.env index 145d7e611e..3c90826c45 100644 --- a/src/makeb32.env +++ b/src/makeb32.env @@ -7,8 +7,9 @@ WXLIBDIR2 = $(WXDIR)\contrib\lib WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc WIN95FLAG = -D__WIN95__ -D__WINDOWS__ -# This should be changed to ilink32 for C++Builder 4 and above -LINK=tlink32 +# This should be changed to tlink32 if ilink32 is not available +# Available on C++ 5.02 and above +LINK=ilink32 !ifndef FINAL FINAL=0 diff --git a/src/makeprog.b32 b/src/makeprog.b32 index b51ac397b9..414ac24c4a 100644 --- a/src/makeprog.b32 +++ b/src/makeprog.b32 @@ -16,11 +16,11 @@ WXDIR = $(WXWIN) LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32 !if "$(FINAL)" == "0" -LINKFLAGS=/v /c /Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib $(EXTRALINKFLAGS) +LINKFLAGS=/v /c /Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS) OPT = -Od DEBUG_FLAGS= -v !else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib $(EXTRALINKFLAGS) +LINKFLAGS=/Tpe /L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS) OPT = -Od DEBUG_FLAGS = !endif diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index 89ff4b11ec..380f211450 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -82,7 +82,16 @@ wxImageList::wxImageList() // Creates an image list bool wxImageList::Create(int width, int height, bool mask, int initial) { - UINT flags = 0; // TODO shouldallow to specify ILC_COLORxxx here + UINT flags = 0; + + // set appropriate color depth + int dd = wxDisplayDepth(); + if (dd <= 4) flags |= ILC_COLOR; // 16 color + else if (dd <= 8) flags |= ILC_COLOR8; // 256 color + else if (dd <= 16) flags |= ILC_COLOR16; // 64k hi-color + else if (dd <= 24) flags |= ILC_COLOR24; // 16m truecolor + else if (dd <= 32) flags |= ILC_COLOR32; // 16m truecolor + if ( mask ) flags |= ILC_MASK; -- 2.45.2