From d345e841da6719c3de9de784220aafafb5eb1e93 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 1 Apr 1999 12:14:30 +0000 Subject: [PATCH] With the exceptions of DnD, wxGTk now works with both GTK 1.0.6 and GTK 1.2.1 - the latter still produces warnings and blah. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 6 +++--- configure.in | 6 +++--- include/wx/gtk/dnd.h | 18 ++++++++---------- include/wx/gtk1/dnd.h | 18 ++++++++---------- include/wx/version.h | 8 ++++---- src/gtk.inc | 4 ++-- src/gtk/app.cpp | 2 ++ src/gtk/clipbrd.cpp | 21 +++++++++++++++++++++ src/gtk/combobox.cpp | 6 +++--- src/gtk/dcscreen.cpp | 4 ++-- src/gtk/listbox.cpp | 8 +++----- src/gtk/textctrl.cpp | 6 +++--- src/gtk/win_gtk.c | 10 ++++------ src/gtk/window.cpp | 10 ++++------ src/gtk1/app.cpp | 2 ++ src/gtk1/clipbrd.cpp | 21 +++++++++++++++++++++ src/gtk1/combobox.cpp | 6 +++--- src/gtk1/dcscreen.cpp | 4 ++-- src/gtk1/listbox.cpp | 8 +++----- src/gtk1/textctrl.cpp | 6 +++--- src/gtk1/win_gtk.c | 10 ++++------ src/gtk1/window.cpp | 10 ++++------ wx-config.in | 2 +- wxGTK.spec | 12 ++++++------ 24 files changed, 119 insertions(+), 89 deletions(-) diff --git a/configure b/configure index 607c1538fc..62b9e436f2 100755 --- a/configure +++ b/configure @@ -6755,7 +6755,7 @@ else echo "$ac_t""no" 1>&6 fi - min_gtk_version=1.0.4 + min_gtk_version=1.0.0 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 echo "configure:6761: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" @@ -6786,7 +6786,7 @@ main () exit(1); } - if (gtk_minor_version > 0) return FALSE; + if (gtk_minor_version == 1) return FALSE; return !((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || @@ -6821,7 +6821,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.0.4 up-to 1.0.6?" 1>&2; exit 1; } + { echo "configure: error: Is gtk-config in path and GTK+ is version 1.2.X or 1.0.X?" 1>&2; exit 1; } fi diff --git a/configure.in b/configure.in index ad4b955b30..273f96eee1 100644 --- a/configure.in +++ b/configure.in @@ -62,7 +62,7 @@ main () exit(1); } - if (gtk_minor_version > 0) return FALSE; + if (gtk_minor_version == 1) return FALSE; return !((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || @@ -1101,10 +1101,10 @@ WX_LINK= MAKEINCLUDE= if test "$wxUSE_GTK" = 1; then - AM_PATH_GTK(1.0.4, [ + AM_PATH_GTK(1.0.0, [ GUI_TK_INCLUDE="$GTK_CFLAGS" GUI_TK_LIBRARY="$GTK_LIBS" - ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.4 up-to 1.0.6?)) + ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.X or 1.0.X?)) TOOLKIT=GTK TOOLKIT_DEF=__WXGTK__ WX_LINK=-lwx_gtk2 diff --git a/include/wx/gtk/dnd.h b/include/wx/gtk/dnd.h index dc0a2d850d..2eccb9c9d6 100644 --- a/include/wx/gtk/dnd.h +++ b/include/wx/gtk/dnd.h @@ -17,6 +17,14 @@ #include "wx/defs.h" +//------------------------------------------------------------------------- +// conditional compilation +//------------------------------------------------------------------------- + +#if (GTK_MINOR_VERSION > 0) +#define NEW_GTK_DND_CODE +#endif + #if wxUSE_DRAG_AND_DROP #include "wx/object.h" @@ -26,16 +34,6 @@ #include "wx/icon.h" #include "wx/gdicmn.h" -//------------------------------------------------------------------------- -// conditional compilation -//------------------------------------------------------------------------- - -#if (GTK_MINOR_VERSION == 1) -#if (GTK_MICRO_VERSION >= 3) -#define NEW_GTK_DND_CODE -#endif -#endif - //------------------------------------------------------------------------- // classes //------------------------------------------------------------------------- diff --git a/include/wx/gtk1/dnd.h b/include/wx/gtk1/dnd.h index dc0a2d850d..2eccb9c9d6 100644 --- a/include/wx/gtk1/dnd.h +++ b/include/wx/gtk1/dnd.h @@ -17,6 +17,14 @@ #include "wx/defs.h" +//------------------------------------------------------------------------- +// conditional compilation +//------------------------------------------------------------------------- + +#if (GTK_MINOR_VERSION > 0) +#define NEW_GTK_DND_CODE +#endif + #if wxUSE_DRAG_AND_DROP #include "wx/object.h" @@ -26,16 +34,6 @@ #include "wx/icon.h" #include "wx/gdicmn.h" -//------------------------------------------------------------------------- -// conditional compilation -//------------------------------------------------------------------------- - -#if (GTK_MINOR_VERSION == 1) -#if (GTK_MICRO_VERSION >= 3) -#define NEW_GTK_DND_CODE -#endif -#endif - //------------------------------------------------------------------------- // classes //------------------------------------------------------------------------- diff --git a/include/wx/version.h b/include/wx/version.h index 942b51a73a..9f9b60d0a0 100644 --- a/include/wx/version.h +++ b/include/wx/version.h @@ -14,11 +14,11 @@ /* Bump-up with each new version */ #define wxMAJOR_VERSION 2 -#define wxMINOR_VERSION 0 -#define wxRELEASE_NUMBER 1 -#define wxVERSION_STRING "wxWindows 2.0.1" +#define wxMINOR_VERSION 1 +#define wxRELEASE_NUMBER 0 +#define wxVERSION_STRING "wxWindows 2.1.0" #define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER -#define wxBETA_NUMBER 6 +#define wxBETA_NUMBER 1 #define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) #endif diff --git a/src/gtk.inc b/src/gtk.inc index 85ab1775eb..d609f6c4be 100644 --- a/src/gtk.inc +++ b/src/gtk.inc @@ -3,8 +3,8 @@ NONE = # define library name LIB_TARGET=wx_gtk2 -LIB_MAJOR=0 -LIB_MINOR=1 +LIB_MAJOR=1 +LIB_MINOR=0 # define library sources diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 81123a87ca..67a48aab5c 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -287,9 +287,11 @@ void wxApp::OnIdle( wxIdleEvent &event ) inOnIdle = TRUE; +#if wxUSE_THREADS /* Resend in the main thread events which have been prepared in other threads */ ProcessPendingEvents(); +#endif /* 'Garbage' collection of windows deleted with Close(). */ DeletePendingObjects(); diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index 9d6511d58b..1e061e3201 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -385,6 +385,26 @@ bool wxClipboard::AddData( wxDataObject *data ) /* Add handlers if someone requests data */ + +#if (GTK_MINOR_VERSION > 0) + + gtk_selection_add_target( GTK_WIDGET(m_clipboardWidget), + GDK_SELECTION_PRIMARY, + format, + 0 ); /* what is info ? */ + + gtk_selection_add_target( GTK_WIDGET(m_clipboardWidget), + g_clipboardAtom, + format, + 0 ); /* what is info ? */ + + gtk_signal_connect( GTK_OBJECT(m_clipboardWidget), + "selection_get", + GTK_SIGNAL_FUNC(selection_handler), + (gpointer) NULL ); + +#else + gtk_selection_add_handler( m_clipboardWidget, g_clipboardAtom, format, @@ -396,6 +416,7 @@ bool wxClipboard::AddData( wxDataObject *data ) format, selection_handler, (gpointer) NULL ); +#endif /* Tell the world we offer clipboard data */ diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index d8b6178e1c..98b3ba7b82 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -434,7 +434,7 @@ void wxComboBox::Copy() wxCHECK_RET( m_widget != NULL, "invalid combobox" ); GtkWidget *entry = GTK_COMBO(m_widget)->entry; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_copy_clipboard( GTK_EDITABLE(entry) ); #else gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 ); @@ -446,7 +446,7 @@ void wxComboBox::Cut() wxCHECK_RET( m_widget != NULL, "invalid combobox" ); GtkWidget *entry = GTK_COMBO(m_widget)->entry; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_cut_clipboard( GTK_EDITABLE(entry) ); #else gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 ); @@ -458,7 +458,7 @@ void wxComboBox::Paste() wxCHECK_RET( m_widget != NULL, "invalid combobox" ); GtkWidget *entry = GTK_COMBO(m_widget)->entry; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_paste_clipboard( GTK_EDITABLE(entry) ); #else gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); diff --git a/src/gtk/dcscreen.cpp b/src/gtk/dcscreen.cpp index 1d71b4e739..96491de8ad 100644 --- a/src/gtk/dcscreen.cpp +++ b/src/gtk/dcscreen.cpp @@ -126,7 +126,7 @@ gdk_window_transparent_new ( GdkWindow *parent, gprivate->window_type = attributes->window_type; gprivate->extension_events = FALSE; -#ifndef NEW_GTK_DND_CODE +#if (GTK_MINOR_VERSION == 0) gprivate->dnd_drag_data_type = None; gprivate->dnd_drag_data_typesavail = gprivate->dnd_drop_data_typesavail = NULL; @@ -215,7 +215,7 @@ gdk_window_transparent_new ( GdkWindow *parent, if (attributes_mask & GDK_WA_TITLE) title = attributes->title; else -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) title = "Unknown"; // GLH: Well I don't know for the moment what to write here. #else title = gdk_progname; diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 6e98cf6ca5..818775ee73 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -33,10 +33,8 @@ // conditional compilation //------------------------------------------------------------------------- -#if (GTK_MINOR_VERSION == 1) - #if (GTK_MICRO_VERSION >= 5) - #define NEW_GTK_SCROLL_CODE - #endif +#if (GTK_MINOR_VERSION > 0) +#define NEW_GTK_SCROLL_CODE #endif //----------------------------------------------------------------------------- @@ -224,7 +222,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name ); #ifdef NEW_GTK_SCROLL_CODE - GtkViewport *viewport = GTK_VIEWPORT(s_window->child); + GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child ); #else GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); #endif diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 88aae91518..94e4126e60 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -674,7 +674,7 @@ void wxTextCtrl::Cut() { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) ); #else gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); @@ -685,7 +685,7 @@ void wxTextCtrl::Copy() { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) ); #else gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 ); @@ -696,7 +696,7 @@ void wxTextCtrl::Paste() { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) ); #else gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index 0f2d927bea..ebbcadb5ac 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -14,11 +14,9 @@ // conditional compilation //------------------------------------------------------------------------- */ -#if (GTK_MINOR_VERSION == 1) -#if (GTK_MICRO_VERSION >= 5) +#if (GTK_MINOR_VERSION > 0) #define NEW_GTK_CONSTRUCT_CODE #endif -#endif #ifdef __cplusplus extern "C" { @@ -46,7 +44,7 @@ static void gtk_myfixed_add (GtkContainer *container, static void gtk_myfixed_remove (GtkContainer *container, GtkWidget *widget); static void gtk_myfixed_foreach (GtkContainer *container, -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gboolean include_internals, #endif GtkCallback callback, @@ -118,7 +116,7 @@ gtk_myfixed_class_init (GtkMyFixedClass *klass) container_class->add = gtk_myfixed_add; container_class->remove = gtk_myfixed_remove; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) container_class->forall = gtk_myfixed_foreach; #else container_class->foreach = gtk_myfixed_foreach; @@ -508,7 +506,7 @@ gtk_myfixed_remove (GtkContainer *container, static void gtk_myfixed_foreach (GtkContainer *container, -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gboolean include_internals, #endif GtkCallback callback, diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 6a50e9e1fe..e3a3a49f5d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -125,11 +125,9 @@ // conditional compilation //------------------------------------------------------------------------- -#if (GTK_MINOR_VERSION == 1) -#if (GTK_MICRO_VERSION >= 5) +#if (GTK_MINOR_VERSION > 0) #define NEW_GTK_SCROLL_CODE #endif -#endif //----------------------------------------------------------------------------- // (debug) @@ -1435,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, #ifdef NEW_GTK_SCROLL_CODE gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(m_widget), m_wxwindow ); - GtkViewport *viewport = GTK_VIEWPORT(s_window->child); + GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child ); #else gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); @@ -1931,7 +1929,7 @@ void wxWindow::DoSetClientSize( int width, int height ) GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); #ifdef NEW_GTK_SCROLL_CODE - GtkWidget *viewport = scroll_window->child; + GtkWidget *viewport = GTK_BIN(scroll_window)->child; #else GtkWidget *viewport = scroll_window->viewport; #endif @@ -1996,7 +1994,7 @@ void wxWindow::GetClientSize( int *width, int *height ) const GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); #ifdef NEW_GTK_SCROLL_CODE - GtkWidget *viewport = scroll_window->child; + GtkWidget *viewport = GTK_BIN(scroll_window)->child; #else GtkWidget *viewport = scroll_window->viewport; #endif diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 81123a87ca..67a48aab5c 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -287,9 +287,11 @@ void wxApp::OnIdle( wxIdleEvent &event ) inOnIdle = TRUE; +#if wxUSE_THREADS /* Resend in the main thread events which have been prepared in other threads */ ProcessPendingEvents(); +#endif /* 'Garbage' collection of windows deleted with Close(). */ DeletePendingObjects(); diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index 9d6511d58b..1e061e3201 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -385,6 +385,26 @@ bool wxClipboard::AddData( wxDataObject *data ) /* Add handlers if someone requests data */ + +#if (GTK_MINOR_VERSION > 0) + + gtk_selection_add_target( GTK_WIDGET(m_clipboardWidget), + GDK_SELECTION_PRIMARY, + format, + 0 ); /* what is info ? */ + + gtk_selection_add_target( GTK_WIDGET(m_clipboardWidget), + g_clipboardAtom, + format, + 0 ); /* what is info ? */ + + gtk_signal_connect( GTK_OBJECT(m_clipboardWidget), + "selection_get", + GTK_SIGNAL_FUNC(selection_handler), + (gpointer) NULL ); + +#else + gtk_selection_add_handler( m_clipboardWidget, g_clipboardAtom, format, @@ -396,6 +416,7 @@ bool wxClipboard::AddData( wxDataObject *data ) format, selection_handler, (gpointer) NULL ); +#endif /* Tell the world we offer clipboard data */ diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index d8b6178e1c..98b3ba7b82 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -434,7 +434,7 @@ void wxComboBox::Copy() wxCHECK_RET( m_widget != NULL, "invalid combobox" ); GtkWidget *entry = GTK_COMBO(m_widget)->entry; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_copy_clipboard( GTK_EDITABLE(entry) ); #else gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 ); @@ -446,7 +446,7 @@ void wxComboBox::Cut() wxCHECK_RET( m_widget != NULL, "invalid combobox" ); GtkWidget *entry = GTK_COMBO(m_widget)->entry; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_cut_clipboard( GTK_EDITABLE(entry) ); #else gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 ); @@ -458,7 +458,7 @@ void wxComboBox::Paste() wxCHECK_RET( m_widget != NULL, "invalid combobox" ); GtkWidget *entry = GTK_COMBO(m_widget)->entry; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_paste_clipboard( GTK_EDITABLE(entry) ); #else gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); diff --git a/src/gtk1/dcscreen.cpp b/src/gtk1/dcscreen.cpp index 1d71b4e739..96491de8ad 100644 --- a/src/gtk1/dcscreen.cpp +++ b/src/gtk1/dcscreen.cpp @@ -126,7 +126,7 @@ gdk_window_transparent_new ( GdkWindow *parent, gprivate->window_type = attributes->window_type; gprivate->extension_events = FALSE; -#ifndef NEW_GTK_DND_CODE +#if (GTK_MINOR_VERSION == 0) gprivate->dnd_drag_data_type = None; gprivate->dnd_drag_data_typesavail = gprivate->dnd_drop_data_typesavail = NULL; @@ -215,7 +215,7 @@ gdk_window_transparent_new ( GdkWindow *parent, if (attributes_mask & GDK_WA_TITLE) title = attributes->title; else -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) title = "Unknown"; // GLH: Well I don't know for the moment what to write here. #else title = gdk_progname; diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 6e98cf6ca5..818775ee73 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -33,10 +33,8 @@ // conditional compilation //------------------------------------------------------------------------- -#if (GTK_MINOR_VERSION == 1) - #if (GTK_MICRO_VERSION >= 5) - #define NEW_GTK_SCROLL_CODE - #endif +#if (GTK_MINOR_VERSION > 0) +#define NEW_GTK_SCROLL_CODE #endif //----------------------------------------------------------------------------- @@ -224,7 +222,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name ); #ifdef NEW_GTK_SCROLL_CODE - GtkViewport *viewport = GTK_VIEWPORT(s_window->child); + GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child ); #else GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); #endif diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 88aae91518..94e4126e60 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -674,7 +674,7 @@ void wxTextCtrl::Cut() { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) ); #else gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); @@ -685,7 +685,7 @@ void wxTextCtrl::Copy() { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) ); #else gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 ); @@ -696,7 +696,7 @@ void wxTextCtrl::Paste() { wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) ); #else gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); diff --git a/src/gtk1/win_gtk.c b/src/gtk1/win_gtk.c index 0f2d927bea..ebbcadb5ac 100644 --- a/src/gtk1/win_gtk.c +++ b/src/gtk1/win_gtk.c @@ -14,11 +14,9 @@ // conditional compilation //------------------------------------------------------------------------- */ -#if (GTK_MINOR_VERSION == 1) -#if (GTK_MICRO_VERSION >= 5) +#if (GTK_MINOR_VERSION > 0) #define NEW_GTK_CONSTRUCT_CODE #endif -#endif #ifdef __cplusplus extern "C" { @@ -46,7 +44,7 @@ static void gtk_myfixed_add (GtkContainer *container, static void gtk_myfixed_remove (GtkContainer *container, GtkWidget *widget); static void gtk_myfixed_foreach (GtkContainer *container, -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gboolean include_internals, #endif GtkCallback callback, @@ -118,7 +116,7 @@ gtk_myfixed_class_init (GtkMyFixedClass *klass) container_class->add = gtk_myfixed_add; container_class->remove = gtk_myfixed_remove; -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) container_class->forall = gtk_myfixed_foreach; #else container_class->foreach = gtk_myfixed_foreach; @@ -508,7 +506,7 @@ gtk_myfixed_remove (GtkContainer *container, static void gtk_myfixed_foreach (GtkContainer *container, -#if (GTK_MINOR_VERSION == 1) +#if (GTK_MINOR_VERSION > 0) gboolean include_internals, #endif GtkCallback callback, diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 6a50e9e1fe..e3a3a49f5d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -125,11 +125,9 @@ // conditional compilation //------------------------------------------------------------------------- -#if (GTK_MINOR_VERSION == 1) -#if (GTK_MICRO_VERSION >= 5) +#if (GTK_MINOR_VERSION > 0) #define NEW_GTK_SCROLL_CODE #endif -#endif //----------------------------------------------------------------------------- // (debug) @@ -1435,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, #ifdef NEW_GTK_SCROLL_CODE gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(m_widget), m_wxwindow ); - GtkViewport *viewport = GTK_VIEWPORT(s_window->child); + GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child ); #else gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); @@ -1931,7 +1929,7 @@ void wxWindow::DoSetClientSize( int width, int height ) GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); #ifdef NEW_GTK_SCROLL_CODE - GtkWidget *viewport = scroll_window->child; + GtkWidget *viewport = GTK_BIN(scroll_window)->child; #else GtkWidget *viewport = scroll_window->viewport; #endif @@ -1996,7 +1994,7 @@ void wxWindow::GetClientSize( int *width, int *height ) const GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); #ifdef NEW_GTK_SCROLL_CODE - GtkWidget *viewport = scroll_window->child; + GtkWidget *viewport = GTK_BIN(scroll_window)->child; #else GtkWidget *viewport = scroll_window->viewport; #endif diff --git a/wx-config.in b/wx-config.in index 19ec9ce98f..5012430955 100755 --- a/wx-config.in +++ b/wx-config.in @@ -36,7 +36,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo 2.0.1 + echo 2.1.0 ;; --cflags) if test @includedir@ != /usr/include ; then diff --git a/wxGTK.spec b/wxGTK.spec index a0590f9822..c163aa031f 100644 --- a/wxGTK.spec +++ b/wxGTK.spec @@ -1,13 +1,13 @@ -Summary: The GTK+ 1.0 port of wxWindows library +Summary: The GTK+ 1.2 port of wxWindows library Name: wxGTK -Version: 2.0.1 +Version: 2.1.0 Release: 1 Copyright: wxWindows Licence Group: X11/Libraries -Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK201.tgz +Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK210.tgz URL: http://www.freiburg.linux.de/~wxxt/docs.html Packager: Robert Roebling -Requires: gtk+ >= 1.0.4 +Requires: gtk+ >= 1.2.0 # all packages providing an implementation of wxWindows library (regardless of # the toolkit used) should provide the (virtual) wxwin package, this makes it @@ -41,7 +41,7 @@ make install /usr/include/wx /usr/lib/wx /usr/lib/libwx_gtk2.so -/usr/lib/libwx_gtk2.so.0 -/usr/lib/libwx_gtk2.so.0.1 +/usr/lib/libwx_gtk2.so.1 +/usr/lib/libwx_gtk2.so.1.0 /usr/bin/wx-config -- 2.45.2