]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Chnaged text id for clipboard to "text/plain"
[wxWidgets.git] / src / gtk1 / window.cpp
index 89b75f8a9d54fc4b2912145e98800c26cdca4c18..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)
@@ -171,7 +169,6 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char *window )
 //-----------------------------------------------------------------------------
 
 extern wxList     wxPendingDelete;
-extern wxList     wxTopLevelWindows;
 extern bool       g_blockEventsOnDrag;
 extern bool       g_blockEventsOnScroll;
 static bool       g_capturing = FALSE;
@@ -1436,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);
@@ -1932,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
@@ -1997,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
@@ -2750,7 +2747,7 @@ void wxWindow::InitDialog()
 static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
 {
     menu->SetInvokingWindow( win );
-    wxNode *node = menu->m_items.First();
+    wxNode *node = menu->GetItems().First();
     while (node)
     {
         wxMenuItem *menuitem = (wxMenuItem*)node->Data();