]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/statusbr.cpp
Added missing include
[wxWidgets.git] / src / generic / statusbr.cpp
index 958d61a5d992e1d2bcf2dde0c4183a352c4d0d84..d5330414b0963650c7b923093a4bb37cec24b153 100644 (file)
@@ -27,7 +27,6 @@
 
 #ifdef __WXGTK20__
     #include <gtk/gtk.h>
-    #include "wx/gtk/win_gtk.h"
 #endif
 
 // we only have to do it here when we use wxStatusBarGeneric in addition to the
@@ -81,13 +80,14 @@ bool wxStatusBarGeneric::Create(wxWindow *parent,
     SetFont(*wxSMALL_FONT);
 #endif
 
-    // Set the height according to the font and the border size
-    wxClientDC dc(this);
-    dc.SetFont(GetFont());
-
-    wxCoord y;
-    dc.GetTextExtent(_T("X"), NULL, &y );
+       wxCoord y;
+       {
+               // Set the height according to the font and the border size
+               wxClientDC dc(this);
+               dc.SetFont(GetFont());
 
+               dc.GetTextExtent(_T("X"), NULL, &y );
+       }
     int height = (int)( (11*y)/10 + 2*GetBorderY());
 
     SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height);
@@ -203,7 +203,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
         if (GetLayoutDirection() == wxLayout_RightToLeft)
         {
             gtk_paint_resize_grip( m_widget->style,
-                               GTK_PIZZA(m_wxwindow)->bin_window,
+                               GTKGetDrawingWindow(),
                                (GtkStateType) GTK_WIDGET_STATE (m_widget),
                                NULL,
                                m_widget,
@@ -214,7 +214,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
         else
         {
             gtk_paint_resize_grip( m_widget->style,
-                               GTK_PIZZA(m_wxwindow)->bin_window,
+                               GTKGetDrawingWindow(),
                                (GtkStateType) GTK_WIDGET_STATE (m_widget),
                                NULL,
                                m_widget,
@@ -250,7 +250,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i)
 
     wxString text(GetStatusText(i));
 
-    long x = 0, y = 0;
+    wxCoord x = 0, y = 0;
 
     dc.GetTextExtent(text, &x, &y);
 
@@ -422,7 +422,7 @@ void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event)
         if (!GTK_IS_WINDOW (ancestor))
             return;
 
-        GdkWindow *source = GTK_PIZZA(m_wxwindow)->bin_window;
+        GdkWindow *source = GTKGetDrawingWindow();
 
         int org_x = 0;
         int org_y = 0;
@@ -469,7 +469,7 @@ void wxStatusBarGeneric::OnRightDown(wxMouseEvent& event)
         if (!GTK_IS_WINDOW (ancestor))
             return;
 
-        GdkWindow *source = GTK_PIZZA(m_wxwindow)->bin_window;
+        GdkWindow *source = GTKGetDrawingWindow();
 
         int org_x = 0;
         int org_y = 0;