]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
don't declare inline function with dllexport declaration, this provokes mingw32 warni...
[wxWidgets.git] / src / gtk / window.cpp
index f7c8878b378ebc275257468aab9f560fab6278f0..bb6ec9e921f128ec893a30b27d7cfbd483ddbcc7 100644 (file)
@@ -2161,7 +2161,7 @@ static void wxInsertChildInWindow( wxWindowGTK* parent, wxWindowGTK* child )
     child->m_y += gtk_pizza_get_yoffset( pizza );
 
     gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                     GTK_WIDGET(child->m_widget),
+                     child->m_widget,
                      child->m_x,
                      child->m_y,
                      child->m_width,
@@ -2229,7 +2229,6 @@ void wxWindowGTK::Init()
 
     m_sizeSet = false;
     m_hasVMT = false;
-    m_needParent = true;
     m_isBeingDeleted = false;
 
     m_showOnIdle= false;
@@ -2452,7 +2451,10 @@ wxWindowGTK::~wxWindowGTK()
 
 bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos,  const wxSize &size )
 {
-    wxCHECK_MSG( !m_needParent || parent, false, wxT("Need complete parent.") );
+    if ( GTKNeedsParent() )
+    {
+        wxCHECK_MSG( parent, false, wxT("Must have non-NULL parent") );
+    }
 
     // Use either the given size, or the default if -1 is given.
     // See wxWindowBase for these functions.
@@ -2669,7 +2671,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
     if (wxDynamicCast(GetParent(), wxToolBar))
     {
        // don't take the x,y values, they're wrong because toolbar sets them
-       GtkWidget  *widget = GTK_WIDGET(m_widget);
+       GtkWidget  *widget = m_widget;
        gtk_widget_set_size_request (widget, m_width, m_height);
     }
     else
@@ -3321,7 +3323,7 @@ void wxWindowGTK::RemoveChild(wxWindowBase *child)
 /* static */
 wxLayoutDirection wxWindowGTK::GTKGetLayout(GtkWidget *widget)
 {
-    return gtk_widget_get_direction(GTK_WIDGET(widget)) == GTK_TEXT_DIR_RTL
+    return gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL
                 ? wxLayout_RightToLeft
                 : wxLayout_LeftToRight;
 }
@@ -3331,7 +3333,7 @@ void wxWindowGTK::GTKSetLayout(GtkWidget *widget, wxLayoutDirection dir)
 {
     wxASSERT_MSG( dir != wxLayout_Default, _T("invalid layout direction") );
 
-    gtk_widget_set_direction(GTK_WIDGET(widget),
+    gtk_widget_set_direction(widget,
                              dir == wxLayout_RightToLeft ? GTK_TEXT_DIR_RTL
                                                          : GTK_TEXT_DIR_LTR);
 }