X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1abca322fd7a9a7abe6cc0b144987786faa0f05..d2b23b67301bd2d286366d4326a21da3132558fa:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index f7c8878b37..bb6ec9e921 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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); }