From 04165bec2cdc510a84f794fe69ebfe4a802e2ee1 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 4 Jan 2000 17:20:21 +0000 Subject: [PATCH] Compilation fix, wxGTK requires GTK 1.2.3. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 6 ++++-- configure.in | 3 ++- docs/gtk/changes.txt | 5 +++++ include/wx/gtk/control.h | 32 +++++++++++++++++++------------- include/wx/gtk1/control.h | 32 +++++++++++++++++++------------- src/gtk/control.cpp | 23 +++++++++-------------- src/gtk1/control.cpp | 23 +++++++++-------------- 7 files changed, 67 insertions(+), 57 deletions(-) diff --git a/configure b/configure index 7077f949cd..09d8372b6c 100755 --- a/configure +++ b/configure @@ -6928,7 +6928,7 @@ else echo "$ac_t""no" 1>&6 fi - min_gtk_version=1.2.1 + min_gtk_version=1.2.3 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 echo "configure:6934: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" @@ -6999,7 +6999,7 @@ fi echo "$ac_t""no" 1>&6 GTK_CFLAGS="" GTK_LIBS="" - { echo "configure: error: Is gtk-config in path and GTK+ is version 1.2.1 or above?" 1>&2; exit 1; } + { echo "configure: error: Is gtk-config in path and GTK+ is version 1.2.3 or above?" 1>&2; exit 1; } fi @@ -13196,6 +13196,7 @@ trap 'rm -fr `echo " samples/png/Makefile samples/printing/Makefile samples/proplist/Makefile + samples/propsize/Makefile samples/richedit/Makefile samples/resource/Makefile samples/sashtest/Makefile @@ -13423,6 +13424,7 @@ CONFIG_FILES=\${CONFIG_FILES-"wx-config samples/png/Makefile samples/printing/Makefile samples/proplist/Makefile + samples/propsize/Makefile samples/richedit/Makefile samples/resource/Makefile samples/sashtest/Makefile diff --git a/configure.in b/configure.in index c3846a6da0..80d2c0646b 100644 --- a/configure.in +++ b/configure.in @@ -1491,7 +1491,7 @@ fi if test "$wxUSE_GTK" = 1; then dnl avoid calling AM_PATH_GTK twice, so check first for the newer version dnl and only then, if it wasn't found, for an older one - AM_PATH_GTK(1.2.1, WXGTK12=1, AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.1 or above?)) + AM_PATH_GTK(1.2.3, WXGTK12=1, AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.3 or above?)) dnl it doesn't really work with 1.3.0 now... dnl AM_PATH_GTK(1.3.0, dnl WXGTK13=1, @@ -3297,6 +3297,7 @@ AC_OUTPUT([ samples/png/Makefile samples/printing/Makefile samples/proplist/Makefile + samples/propsize/Makefile samples/richedit/Makefile samples/resource/Makefile samples/sashtest/Makefile diff --git a/docs/gtk/changes.txt b/docs/gtk/changes.txt index 2c748f0ea3..6679fdb156 100644 --- a/docs/gtk/changes.txt +++ b/docs/gtk/changes.txt @@ -6,6 +6,9 @@ and/or 16 bit colour mode? I need this for testing purposes, i.e. this person could help me by running a small testprogram and sending me the output. +Improved support for GTK's themes, changes in font sizes (and +the dialogs' ability to react to that) and related things. + Added Calendar control. Added classes for recoding text (e.g. from Windows encoding to ISO encoding @@ -54,6 +57,8 @@ Added wxNotebookSizer for combining notebooks and sizers. Added wxDir class. Useful as a replacement for wxFileGetFirst() and wxFileGetNext(). +Fixed Y2000 bug in file dialog (sic.) + Added wxStopWatch class. wxBitmap now derives from wxGDIObject. diff --git a/include/wx/gtk/control.h b/include/wx/gtk/control.h index 93b2e82566..2a5227180e 100644 --- a/include/wx/gtk/control.h +++ b/include/wx/gtk/control.h @@ -35,22 +35,28 @@ class wxControl : public wxControlBase { public: wxControl(); - wxControl( wxWindow *parent, - wxWindowID id, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = 0, - const wxString &name = wxControlNameStr ); + wxControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, +#if wxUSE_VALIDATORS + const wxValidator& validator = wxDefaultValidator, +#endif + const wxString& name = wxControlNameStr) + { + Create(parent, id, pos, size, style, +#if wxUSE_VALIDATORS + validator, +#endif + name); + } + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, #if wxUSE_VALIDATORS - wxControl( wxWindow *parent, - wxWindowID id, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxControlNameStr ); + const wxValidator& validator = wxDefaultValidator, #endif + const wxString& name = wxControlNameStr); // this function will filter out '&' characters and will put the accelerator // char (the one immediately after '&') into m_chAccel (TODO not yet) diff --git a/include/wx/gtk1/control.h b/include/wx/gtk1/control.h index 93b2e82566..2a5227180e 100644 --- a/include/wx/gtk1/control.h +++ b/include/wx/gtk1/control.h @@ -35,22 +35,28 @@ class wxControl : public wxControlBase { public: wxControl(); - wxControl( wxWindow *parent, - wxWindowID id, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = 0, - const wxString &name = wxControlNameStr ); + wxControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, +#if wxUSE_VALIDATORS + const wxValidator& validator = wxDefaultValidator, +#endif + const wxString& name = wxControlNameStr) + { + Create(parent, id, pos, size, style, +#if wxUSE_VALIDATORS + validator, +#endif + name); + } + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, #if wxUSE_VALIDATORS - wxControl( wxWindow *parent, - wxWindowID id, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxControlNameStr ); + const wxValidator& validator = wxDefaultValidator, #endif + const wxString& name = wxControlNameStr); // this function will filter out '&' characters and will put the accelerator // char (the one immediately after '&') into m_chAccel (TODO not yet) diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index d8f6b14c9d..dee6ebb691 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -26,30 +26,25 @@ wxControl::wxControl() m_needParent = TRUE; } -wxControl::wxControl( wxWindow *parent, +bool wxControl::Create( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, - const wxString &name ) -{ - (void)Create(parent, id, pos, size, style, name); -} - #if wxUSE_VALIDATORS -wxControl::wxControl( wxWindow *parent, - wxWindowID id, - const wxPoint &pos, - const wxSize &size, - long style, const wxValidator& validator, - const wxString &name) +#endif + const wxString &name ) { - (void)Create(parent, id, pos, size, style, name); + bool ret = wxWindow::Create(parent, id, pos, size, style, name); + +#if wxUSE_VALIDATORS SetValidator(validator); -} #endif + return ret; +} + void wxControl::SetLabel( const wxString &label ) { m_label.Empty(); diff --git a/src/gtk1/control.cpp b/src/gtk1/control.cpp index d8f6b14c9d..dee6ebb691 100644 --- a/src/gtk1/control.cpp +++ b/src/gtk1/control.cpp @@ -26,30 +26,25 @@ wxControl::wxControl() m_needParent = TRUE; } -wxControl::wxControl( wxWindow *parent, +bool wxControl::Create( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, - const wxString &name ) -{ - (void)Create(parent, id, pos, size, style, name); -} - #if wxUSE_VALIDATORS -wxControl::wxControl( wxWindow *parent, - wxWindowID id, - const wxPoint &pos, - const wxSize &size, - long style, const wxValidator& validator, - const wxString &name) +#endif + const wxString &name ) { - (void)Create(parent, id, pos, size, style, name); + bool ret = wxWindow::Create(parent, id, pos, size, style, name); + +#if wxUSE_VALIDATORS SetValidator(validator); -} #endif + return ret; +} + void wxControl::SetLabel( const wxString &label ) { m_label.Empty(); -- 2.45.2