From e115e77131d5a7a68d0cfb2fb41fcb98deefdd29 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 9 Oct 1999 13:32:40 +0000 Subject: [PATCH] Applied a few patches, Put some life into iODBC again, git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 24 +++++++++++++++++++++--- configure.in | 17 +++++++---------- distrib/msw/tmake/unx.t | 22 ++++++++++++++++++++-- include/wx/db.h | 1 + include/wx/defs.h | 14 ++++++++------ samples/db/dbtest.h | 7 +++---- src/common/db.cpp | 6 ++++++ src/common/imagbmp.cpp | 2 +- src/gtk/listbox.cpp | 6 ++++++ src/gtk1/listbox.cpp | 6 ++++++ 10 files changed, 79 insertions(+), 26 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7c2cabbc9f..3be6793df7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # -# This file was automatically generated by tmake at 11:14, 1999/10/09 +# This file was automatically generated by tmake at 14:12, 1999/10/09 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T! # @@ -44,8 +44,9 @@ VP6 = @top_srcdir@/src/html VP7 = @top_srcdir@/src/png VP8 = @top_srcdir@/src/jpeg VP9 = @top_srcdir@/src/zlib +VP10 = @top_srcdir@/src/iodbc -VPATH = $(VP1):$(VP2):$(VP3):$(VP4):$(VP5):$(VP6):$(VP7):$(VP8):$(VP9) +VPATH = $(VP1):$(VP2):$(VP3):$(VP4):$(VP5):$(VP6):$(VP7):$(VP8):$(VP9):$(VP10) top_srcdir = @top_srcdir@ prefix = @prefix@ @@ -1928,6 +1929,23 @@ JPEGOBJS = \ jquant2.o \ jdmerge.o +IODBCOBJS = \ + catalog.o \ + connect.o \ + dlf.o \ + dlproc.o \ + execute.o \ + fetch.o \ + hdbc.o \ + henv.o \ + herr.o \ + hstmt.o \ + info.o \ + itrace.o \ + misc.o \ + prepare.o \ + result.o + GUIOBJS = @GUIOBJS@ GUIDEPS = @GUIDEPS@ GUIHEADERS = @GUIHEADERS@ @@ -1938,7 +1956,7 @@ GENERICDEPS = @GENERICDEPS@ UNIXOBJS = @UNIXOBJS@ UNIXDEPS = @UNIXDEPS@ -OBJECTS = @ALL_OBJECTS@ +OBJECTS = @ALL_OBJECTS@ $(IODBCOBJS) DEPFILES = @ALL_DEPFILES@ diff --git a/configure.in b/configure.in index 5eb7e82736..0e2fe1cd60 100644 --- a/configure.in +++ b/configure.in @@ -774,7 +774,7 @@ else DEFAULT_wxUSE_ZLIB=yes DEFAULT_wxUSE_LIBPNG=yes DEFAULT_wxUSE_LIBJPEG=yes - DEFAULT_wxUSE_ODBC=no + DEFAULT_wxUSE_ODBC=yes DEFAULT_wxUSE_STD_IOSTREAM=no DEFAULT_wxUSE_FILE=yes @@ -2334,14 +2334,9 @@ if test "$wxUSE_LONGLONG" = "yes"; then fi if test "$wxUSE_SOCKETS" = "yes" ; then - if test "$wxUSE_THREADS" = "yes" ; then - AC_DEFINE(wxUSE_SOCKETS) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wxsocket" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol" - else - AC_MSG_WARN(Socket classes require --with-threads and won't be compiled without it) - wxUSE_SOCKETS=0 - fi + AC_DEFINE(wxUSE_SOCKETS) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wxsocket" + INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol" fi if test "$wxUSE_DIALUP_MANAGER" = "yes" ; then @@ -2468,6 +2463,7 @@ dnl ---------------------------------------------------------------- IODBC_C_SRC="" if test "$wxUSE_ODBC" = "yes" ; then AC_DEFINE(wxUSE_ODBC) + WXODBCFLAG="-D_IODBC_" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" fi @@ -2823,7 +2819,7 @@ if test "$GXX" = yes ; then dnl doing this... (VZ) dnl CXXWARNINGS="-Wall -Werror" fi -EXTRA_CFLAGS="$WXDEBUG $PROFILE $OPTIMISE $INCLUDES" +EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE $INCLUDES" CPPFLAGS="-I\${top_srcdir}/include $CPPFLAGS" CFLAGS="$CFLAGS $EXTRA_CFLAGS" @@ -2938,6 +2934,7 @@ AC_OUTPUT([ samples/checklst/Makefile samples/config/Makefile samples/controls/Makefile + samples/db/Makefile samples/dialogs/Makefile samples/docview/Makefile samples/docvwmdi/Makefile diff --git a/distrib/msw/tmake/unx.t b/distrib/msw/tmake/unx.t index 0215c79554..c0edcfa59e 100644 --- a/distrib/msw/tmake/unx.t +++ b/distrib/msw/tmake/unx.t @@ -217,8 +217,9 @@ VP6 = @top_srcdir@/src/html VP7 = @top_srcdir@/src/png VP8 = @top_srcdir@/src/jpeg VP9 = @top_srcdir@/src/zlib +VP10 = @top_srcdir@/src/iodbc -VPATH = $(VP1):$(VP2):$(VP3):$(VP4):$(VP5):$(VP6):$(VP7):$(VP8):$(VP9) +VPATH = $(VP1):$(VP2):$(VP3):$(VP4):$(VP5):$(VP6):$(VP7):$(VP8):$(VP9):$(VP10) top_srcdir = @top_srcdir@ prefix = @prefix@ @@ -487,6 +488,23 @@ JPEGOBJS = \ jquant2.o \ jdmerge.o +IODBCOBJS = \ + catalog.o \ + connect.o \ + dlf.o \ + dlproc.o \ + execute.o \ + fetch.o \ + hdbc.o \ + henv.o \ + herr.o \ + hstmt.o \ + info.o \ + itrace.o \ + misc.o \ + prepare.o \ + result.o + GUIOBJS = @GUIOBJS@ GUIDEPS = @GUIDEPS@ GUIHEADERS = @GUIHEADERS@ @@ -497,7 +515,7 @@ GENERICDEPS = @GENERICDEPS@ UNIXOBJS = @UNIXOBJS@ UNIXDEPS = @UNIXDEPS@ -OBJECTS = @ALL_OBJECTS@ +OBJECTS = @ALL_OBJECTS@ $(IODBCOBJS) DEPFILES = @ALL_DEPFILES@ diff --git a/include/wx/db.h b/include/wx/db.h index 979f566ae7..7ba5b74748 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -429,6 +429,7 @@ struct DbList #if __WXDEBUG__ > 0 +#include "wx/object.h" class CstructTablesInUse : public wxObject { public: diff --git a/include/wx/defs.h b/include/wx/defs.h index d17af9918c..e9a831e991 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -47,10 +47,6 @@ #endif #endif // Sun - #if defined(__hpux) && !defined(__HPUX__) - #define __HPUX__ - #endif // HP-UX - #elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) ) // MacOS #elif defined(__OS2__) @@ -206,6 +202,12 @@ #undef PACKAGE #undef VERSION +// this has to be done after including setup.h which might +// define __HPUX__ 1 itself +#if defined(__hpux) && !defined(__HPUX__) + #define __HPUX__ +#endif // HP-UX + // if we're on a Unixsystem but didn't use configure (so that setup.h didn't // define __UNIX__), do define __UNIX__ now #if !defined(__UNIX__) && defined(__UNIX_LIKE__) @@ -873,11 +875,11 @@ enum wxStretch /* * wxGauge flags */ -#define wxGA_PROGRESSBAR 0x0004 #define wxGA_HORIZONTAL wxHORIZONTAL #define wxGA_VERTICAL wxVERTICAL +#define wxGA_PROGRESSBAR 0x0010 // Windows only -#define wxGA_SMOOTH 0x0010 +#define wxGA_SMOOTH 0x0020 /* * wxSlider flags diff --git a/samples/db/dbtest.h b/samples/db/dbtest.h index 2a18570f9b..a1e2e5ec39 100644 --- a/samples/db/dbtest.h +++ b/samples/db/dbtest.h @@ -24,6 +24,9 @@ enum DialogModes {mView,mCreate,mEdit,mSearch}; #define EDIT_PARAMETERS 200 #define ABOUT_DEMO 300 +// this seems to be missing, Robert Roebling (?) +#define MAX_PATH 200 + // Name of the table to be created/opened const char CONTACT_TABLE_NAME[] = "contacts"; @@ -40,11 +43,7 @@ enum Language {langENGLISH, langFRENCH, langGERMAN, langSPANISH, langOTHER}; class CeditorDlg; class CparameterDlg; -#ifdef __UNIX__ -const char paramFilename[] = "../dbtest.cfg"; -#else const char paramFilename[] = "dbtest.cfg"; -#endif /* diff --git a/src/common/db.cpp b/src/common/db.cpp index 6f9c399bff..b5a4ae5a4d 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -86,6 +86,12 @@ DbList* WXDLLEXPORT PtrBegDbList = 0; #if __WXDEBUG__ > 0 + #if wxMAJOR_VERSION == 2 + #include "wx/object.h" + #include "wx/list.h" + #include "wx/utils.h" + #include "wx/msgdlg.h" + #endif extern wxList TablesInUse; #endif diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index dca81ce5fc..7b6f02cb3f 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -366,7 +366,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE ptr[poffset] = temp; temp = (aWord & gmask) >> gshift; ptr[poffset + 1] = temp; - temp = (aWord & bmask) >> gshift; + temp = (aWord & bmask) >> bshift; ptr[poffset + 2] = temp; column++; } diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 0336ffec91..b465206877 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -291,6 +291,12 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_list) ); #endif + /* make list scroll when moving the focus down using cursor keys */ + gtk_container_set_focus_vadjustment( + GTK_CONTAINER(m_list), + gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(m_widget))); + gtk_widget_show( GTK_WIDGET(m_list) ); wxSize newSize = size; diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 0336ffec91..b465206877 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -291,6 +291,12 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_list) ); #endif + /* make list scroll when moving the focus down using cursor keys */ + gtk_container_set_focus_vadjustment( + GTK_CONTAINER(m_list), + gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(m_widget))); + gtk_widget_show( GTK_WIDGET(m_list) ); wxSize newSize = size; -- 2.45.2