]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
With the exceptions of DnD, wxGTk now works with
[wxWidgets.git] / src / gtk / window.cpp
index 6a50e9e1fe31722d6de068f594e8619e15017261..e3a3a49f5d3279ce3b0578802970e25f8b4415a3 100644 (file)
 // 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