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
This commit is contained in:
Robert Roebling
1999-04-01 12:14:30 +00:00
parent 1a33c3ba91
commit d345e841da
24 changed files with 119 additions and 89 deletions

6
configure vendored
View File

@@ -6755,7 +6755,7 @@ else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
fi 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 $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:6761: checking for GTK - version >= $min_gtk_version" >&5 echo "configure:6761: checking for GTK - version >= $min_gtk_version" >&5
no_gtk="" no_gtk=""
@@ -6786,7 +6786,7 @@ main ()
exit(1); exit(1);
} }
if (gtk_minor_version > 0) return FALSE; if (gtk_minor_version == 1) return FALSE;
return !((gtk_major_version > major) || return !((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
@@ -6821,7 +6821,7 @@ fi
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
GTK_CFLAGS="" GTK_CFLAGS=""
GTK_LIBS="" 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 fi

View File

@@ -62,7 +62,7 @@ main ()
exit(1); exit(1);
} }
if (gtk_minor_version > 0) return FALSE; if (gtk_minor_version == 1) return FALSE;
return !((gtk_major_version > major) || return !((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
@@ -1101,10 +1101,10 @@ WX_LINK=
MAKEINCLUDE= MAKEINCLUDE=
if test "$wxUSE_GTK" = 1; then 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_INCLUDE="$GTK_CFLAGS"
GUI_TK_LIBRARY="$GTK_LIBS" 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=GTK
TOOLKIT_DEF=__WXGTK__ TOOLKIT_DEF=__WXGTK__
WX_LINK=-lwx_gtk2 WX_LINK=-lwx_gtk2

View File

@@ -17,6 +17,14 @@
#include "wx/defs.h" #include "wx/defs.h"
//-------------------------------------------------------------------------
// conditional compilation
//-------------------------------------------------------------------------
#if (GTK_MINOR_VERSION > 0)
#define NEW_GTK_DND_CODE
#endif
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
#include "wx/object.h" #include "wx/object.h"
@@ -26,16 +34,6 @@
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/gdicmn.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 // classes
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -17,6 +17,14 @@
#include "wx/defs.h" #include "wx/defs.h"
//-------------------------------------------------------------------------
// conditional compilation
//-------------------------------------------------------------------------
#if (GTK_MINOR_VERSION > 0)
#define NEW_GTK_DND_CODE
#endif
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
#include "wx/object.h" #include "wx/object.h"
@@ -26,16 +34,6 @@
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/gdicmn.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 // classes
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -14,11 +14,11 @@
/* Bump-up with each new version */ /* Bump-up with each new version */
#define wxMAJOR_VERSION 2 #define wxMAJOR_VERSION 2
#define wxMINOR_VERSION 0 #define wxMINOR_VERSION 1
#define wxRELEASE_NUMBER 1 #define wxRELEASE_NUMBER 0
#define wxVERSION_STRING "wxWindows 2.0.1" #define wxVERSION_STRING "wxWindows 2.1.0"
#define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER #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) #define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
#endif #endif

View File

@@ -3,8 +3,8 @@ NONE =
# define library name # define library name
LIB_TARGET=wx_gtk2 LIB_TARGET=wx_gtk2
LIB_MAJOR=0 LIB_MAJOR=1
LIB_MINOR=1 LIB_MINOR=0
# define library sources # define library sources

View File

@@ -287,9 +287,11 @@ void wxApp::OnIdle( wxIdleEvent &event )
inOnIdle = TRUE; inOnIdle = TRUE;
#if wxUSE_THREADS
/* Resend in the main thread events which have been prepared in other /* Resend in the main thread events which have been prepared in other
threads */ threads */
ProcessPendingEvents(); ProcessPendingEvents();
#endif
/* 'Garbage' collection of windows deleted with Close(). */ /* 'Garbage' collection of windows deleted with Close(). */
DeletePendingObjects(); DeletePendingObjects();

View File

@@ -385,6 +385,26 @@ bool wxClipboard::AddData( wxDataObject *data )
/* Add handlers if someone requests 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, gtk_selection_add_handler( m_clipboardWidget,
g_clipboardAtom, g_clipboardAtom,
format, format,
@@ -396,6 +416,7 @@ bool wxClipboard::AddData( wxDataObject *data )
format, format,
selection_handler, selection_handler,
(gpointer) NULL ); (gpointer) NULL );
#endif
/* Tell the world we offer clipboard data */ /* Tell the world we offer clipboard data */

View File

@@ -434,7 +434,7 @@ void wxComboBox::Copy()
wxCHECK_RET( m_widget != NULL, "invalid combobox" ); wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry; GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gtk_editable_copy_clipboard( GTK_EDITABLE(entry) ); gtk_editable_copy_clipboard( GTK_EDITABLE(entry) );
#else #else
gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 ); gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 );
@@ -446,7 +446,7 @@ void wxComboBox::Cut()
wxCHECK_RET( m_widget != NULL, "invalid combobox" ); wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry; GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gtk_editable_cut_clipboard( GTK_EDITABLE(entry) ); gtk_editable_cut_clipboard( GTK_EDITABLE(entry) );
#else #else
gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 ); gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 );
@@ -458,7 +458,7 @@ void wxComboBox::Paste()
wxCHECK_RET( m_widget != NULL, "invalid combobox" ); wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry; GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gtk_editable_paste_clipboard( GTK_EDITABLE(entry) ); gtk_editable_paste_clipboard( GTK_EDITABLE(entry) );
#else #else
gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 );

View File

@@ -126,7 +126,7 @@ gdk_window_transparent_new ( GdkWindow *parent,
gprivate->window_type = attributes->window_type; gprivate->window_type = attributes->window_type;
gprivate->extension_events = FALSE; gprivate->extension_events = FALSE;
#ifndef NEW_GTK_DND_CODE #if (GTK_MINOR_VERSION == 0)
gprivate->dnd_drag_data_type = None; gprivate->dnd_drag_data_type = None;
gprivate->dnd_drag_data_typesavail = gprivate->dnd_drag_data_typesavail =
gprivate->dnd_drop_data_typesavail = NULL; gprivate->dnd_drop_data_typesavail = NULL;
@@ -215,7 +215,7 @@ gdk_window_transparent_new ( GdkWindow *parent,
if (attributes_mask & GDK_WA_TITLE) if (attributes_mask & GDK_WA_TITLE)
title = attributes->title; title = attributes->title;
else 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. title = "Unknown"; // GLH: Well I don't know for the moment what to write here.
#else #else
title = gdk_progname; title = gdk_progname;

View File

@@ -33,10 +33,8 @@
// conditional compilation // conditional compilation
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
#if (GTK_MICRO_VERSION >= 5) #define NEW_GTK_SCROLL_CODE
#define NEW_GTK_SCROLL_CODE
#endif
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -224,7 +222,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name ); debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name );
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
GtkViewport *viewport = GTK_VIEWPORT(s_window->child); GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child );
#else #else
GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
#endif #endif

View File

@@ -674,7 +674,7 @@ void wxTextCtrl::Cut()
{ {
wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); 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) ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 );
@@ -685,7 +685,7 @@ void wxTextCtrl::Copy()
{ {
wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); 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) ); gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 );
@@ -696,7 +696,7 @@ void wxTextCtrl::Paste()
{ {
wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); 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) ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 );

View File

@@ -14,11 +14,9 @@
// conditional compilation // conditional compilation
//------------------------------------------------------------------------- */ //------------------------------------------------------------------------- */
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
#if (GTK_MICRO_VERSION >= 5)
#define NEW_GTK_CONSTRUCT_CODE #define NEW_GTK_CONSTRUCT_CODE
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@@ -46,7 +44,7 @@ static void gtk_myfixed_add (GtkContainer *container,
static void gtk_myfixed_remove (GtkContainer *container, static void gtk_myfixed_remove (GtkContainer *container,
GtkWidget *widget); GtkWidget *widget);
static void gtk_myfixed_foreach (GtkContainer *container, static void gtk_myfixed_foreach (GtkContainer *container,
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gboolean include_internals, gboolean include_internals,
#endif #endif
GtkCallback callback, GtkCallback callback,
@@ -118,7 +116,7 @@ gtk_myfixed_class_init (GtkMyFixedClass *klass)
container_class->add = gtk_myfixed_add; container_class->add = gtk_myfixed_add;
container_class->remove = gtk_myfixed_remove; container_class->remove = gtk_myfixed_remove;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
container_class->forall = gtk_myfixed_foreach; container_class->forall = gtk_myfixed_foreach;
#else #else
container_class->foreach = gtk_myfixed_foreach; container_class->foreach = gtk_myfixed_foreach;
@@ -508,7 +506,7 @@ gtk_myfixed_remove (GtkContainer *container,
static void static void
gtk_myfixed_foreach (GtkContainer *container, gtk_myfixed_foreach (GtkContainer *container,
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gboolean include_internals, gboolean include_internals,
#endif #endif
GtkCallback callback, GtkCallback callback,

View File

@@ -125,11 +125,9 @@
// conditional compilation // conditional compilation
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
#if (GTK_MICRO_VERSION >= 5)
#define NEW_GTK_SCROLL_CODE #define NEW_GTK_SCROLL_CODE
#endif #endif
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// (debug) // (debug)
@@ -1435,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(m_widget), m_wxwindow ); 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 #else
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); 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 ); GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
GtkWidget *viewport = scroll_window->child; GtkWidget *viewport = GTK_BIN(scroll_window)->child;
#else #else
GtkWidget *viewport = scroll_window->viewport; GtkWidget *viewport = scroll_window->viewport;
#endif #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 ); GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
GtkWidget *viewport = scroll_window->child; GtkWidget *viewport = GTK_BIN(scroll_window)->child;
#else #else
GtkWidget *viewport = scroll_window->viewport; GtkWidget *viewport = scroll_window->viewport;
#endif #endif

View File

@@ -287,9 +287,11 @@ void wxApp::OnIdle( wxIdleEvent &event )
inOnIdle = TRUE; inOnIdle = TRUE;
#if wxUSE_THREADS
/* Resend in the main thread events which have been prepared in other /* Resend in the main thread events which have been prepared in other
threads */ threads */
ProcessPendingEvents(); ProcessPendingEvents();
#endif
/* 'Garbage' collection of windows deleted with Close(). */ /* 'Garbage' collection of windows deleted with Close(). */
DeletePendingObjects(); DeletePendingObjects();

View File

@@ -385,6 +385,26 @@ bool wxClipboard::AddData( wxDataObject *data )
/* Add handlers if someone requests 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, gtk_selection_add_handler( m_clipboardWidget,
g_clipboardAtom, g_clipboardAtom,
format, format,
@@ -396,6 +416,7 @@ bool wxClipboard::AddData( wxDataObject *data )
format, format,
selection_handler, selection_handler,
(gpointer) NULL ); (gpointer) NULL );
#endif
/* Tell the world we offer clipboard data */ /* Tell the world we offer clipboard data */

View File

@@ -434,7 +434,7 @@ void wxComboBox::Copy()
wxCHECK_RET( m_widget != NULL, "invalid combobox" ); wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry; GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gtk_editable_copy_clipboard( GTK_EDITABLE(entry) ); gtk_editable_copy_clipboard( GTK_EDITABLE(entry) );
#else #else
gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 ); gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 );
@@ -446,7 +446,7 @@ void wxComboBox::Cut()
wxCHECK_RET( m_widget != NULL, "invalid combobox" ); wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry; GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gtk_editable_cut_clipboard( GTK_EDITABLE(entry) ); gtk_editable_cut_clipboard( GTK_EDITABLE(entry) );
#else #else
gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 ); gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 );
@@ -458,7 +458,7 @@ void wxComboBox::Paste()
wxCHECK_RET( m_widget != NULL, "invalid combobox" ); wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry; GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gtk_editable_paste_clipboard( GTK_EDITABLE(entry) ); gtk_editable_paste_clipboard( GTK_EDITABLE(entry) );
#else #else
gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 );

View File

@@ -126,7 +126,7 @@ gdk_window_transparent_new ( GdkWindow *parent,
gprivate->window_type = attributes->window_type; gprivate->window_type = attributes->window_type;
gprivate->extension_events = FALSE; gprivate->extension_events = FALSE;
#ifndef NEW_GTK_DND_CODE #if (GTK_MINOR_VERSION == 0)
gprivate->dnd_drag_data_type = None; gprivate->dnd_drag_data_type = None;
gprivate->dnd_drag_data_typesavail = gprivate->dnd_drag_data_typesavail =
gprivate->dnd_drop_data_typesavail = NULL; gprivate->dnd_drop_data_typesavail = NULL;
@@ -215,7 +215,7 @@ gdk_window_transparent_new ( GdkWindow *parent,
if (attributes_mask & GDK_WA_TITLE) if (attributes_mask & GDK_WA_TITLE)
title = attributes->title; title = attributes->title;
else 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. title = "Unknown"; // GLH: Well I don't know for the moment what to write here.
#else #else
title = gdk_progname; title = gdk_progname;

View File

@@ -33,10 +33,8 @@
// conditional compilation // conditional compilation
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
#if (GTK_MICRO_VERSION >= 5) #define NEW_GTK_SCROLL_CODE
#define NEW_GTK_SCROLL_CODE
#endif
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -224,7 +222,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name ); debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name );
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
GtkViewport *viewport = GTK_VIEWPORT(s_window->child); GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child );
#else #else
GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
#endif #endif

View File

@@ -674,7 +674,7 @@ void wxTextCtrl::Cut()
{ {
wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); 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) ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 );
@@ -685,7 +685,7 @@ void wxTextCtrl::Copy()
{ {
wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); 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) ); gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 );
@@ -696,7 +696,7 @@ void wxTextCtrl::Paste()
{ {
wxCHECK_RET( m_text != NULL, "invalid text ctrl" ); 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) ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 );

View File

@@ -14,11 +14,9 @@
// conditional compilation // conditional compilation
//------------------------------------------------------------------------- */ //------------------------------------------------------------------------- */
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
#if (GTK_MICRO_VERSION >= 5)
#define NEW_GTK_CONSTRUCT_CODE #define NEW_GTK_CONSTRUCT_CODE
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@@ -46,7 +44,7 @@ static void gtk_myfixed_add (GtkContainer *container,
static void gtk_myfixed_remove (GtkContainer *container, static void gtk_myfixed_remove (GtkContainer *container,
GtkWidget *widget); GtkWidget *widget);
static void gtk_myfixed_foreach (GtkContainer *container, static void gtk_myfixed_foreach (GtkContainer *container,
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gboolean include_internals, gboolean include_internals,
#endif #endif
GtkCallback callback, GtkCallback callback,
@@ -118,7 +116,7 @@ gtk_myfixed_class_init (GtkMyFixedClass *klass)
container_class->add = gtk_myfixed_add; container_class->add = gtk_myfixed_add;
container_class->remove = gtk_myfixed_remove; container_class->remove = gtk_myfixed_remove;
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
container_class->forall = gtk_myfixed_foreach; container_class->forall = gtk_myfixed_foreach;
#else #else
container_class->foreach = gtk_myfixed_foreach; container_class->foreach = gtk_myfixed_foreach;
@@ -508,7 +506,7 @@ gtk_myfixed_remove (GtkContainer *container,
static void static void
gtk_myfixed_foreach (GtkContainer *container, gtk_myfixed_foreach (GtkContainer *container,
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
gboolean include_internals, gboolean include_internals,
#endif #endif
GtkCallback callback, GtkCallback callback,

View File

@@ -125,11 +125,9 @@
// conditional compilation // conditional compilation
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 1) #if (GTK_MINOR_VERSION > 0)
#if (GTK_MICRO_VERSION >= 5)
#define NEW_GTK_SCROLL_CODE #define NEW_GTK_SCROLL_CODE
#endif #endif
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// (debug) // (debug)
@@ -1435,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(m_widget), m_wxwindow ); 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 #else
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport); 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 ); GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
GtkWidget *viewport = scroll_window->child; GtkWidget *viewport = GTK_BIN(scroll_window)->child;
#else #else
GtkWidget *viewport = scroll_window->viewport; GtkWidget *viewport = scroll_window->viewport;
#endif #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 ); GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
#ifdef NEW_GTK_SCROLL_CODE #ifdef NEW_GTK_SCROLL_CODE
GtkWidget *viewport = scroll_window->child; GtkWidget *viewport = GTK_BIN(scroll_window)->child;
#else #else
GtkWidget *viewport = scroll_window->viewport; GtkWidget *viewport = scroll_window->viewport;
#endif #endif

View File

@@ -36,7 +36,7 @@ while test $# -gt 0; do
echo $exec_prefix echo $exec_prefix
;; ;;
--version) --version)
echo 2.0.1 echo 2.1.0
;; ;;
--cflags) --cflags)
if test @includedir@ != /usr/include ; then if test @includedir@ != /usr/include ; then

View File

@@ -1,13 +1,13 @@
Summary: The GTK+ 1.0 port of wxWindows library Summary: The GTK+ 1.2 port of wxWindows library
Name: wxGTK Name: wxGTK
Version: 2.0.1 Version: 2.1.0
Release: 1 Release: 1
Copyright: wxWindows Licence Copyright: wxWindows Licence
Group: X11/Libraries 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 URL: http://www.freiburg.linux.de/~wxxt/docs.html
Packager: Robert Roebling <roebling@ruf.uni-freiburg.de> Packager: Robert Roebling <roebling@ruf.uni-freiburg.de>
Requires: gtk+ >= 1.0.4 Requires: gtk+ >= 1.2.0
# all packages providing an implementation of wxWindows library (regardless of # all packages providing an implementation of wxWindows library (regardless of
# the toolkit used) should provide the (virtual) wxwin package, this makes it # the toolkit used) should provide the (virtual) wxwin package, this makes it
@@ -41,7 +41,7 @@ make install
/usr/include/wx /usr/include/wx
/usr/lib/wx /usr/lib/wx
/usr/lib/libwx_gtk2.so /usr/lib/libwx_gtk2.so
/usr/lib/libwx_gtk2.so.0 /usr/lib/libwx_gtk2.so.1
/usr/lib/libwx_gtk2.so.0.1 /usr/lib/libwx_gtk2.so.1.0
/usr/bin/wx-config /usr/bin/wx-config