X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aae91497f6ac36a76d3313cf405cae0f098ea1d1..b8d24d4edd1f91339918134d2420af39c324aa1f:/src/motif/toolbar.cpp diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index a4279e48bf..6bdc23d9cd 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -239,7 +239,6 @@ bool wxToolBar::Create(wxWindow *parent, if( rSize.x == -1 && GetParent() ) rSize.x = GetParent()->GetSize().x; - SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, rPos.x, rPos.y, rSize.x, rSize.y); @@ -361,8 +360,8 @@ bool wxToolBar::Realize() if( !tool->GetButtonWidget() ) { - DoChangeBackgroundColour((WXWidget) button, - m_backgroundColour, TRUE); + wxDoChangeBackgroundColour((WXWidget) button, + m_backgroundColour, TRUE); tool->SetWidget(button); } @@ -389,13 +388,13 @@ bool wxToolBar::Realize() wxColour col; col.SetPixel(backgroundPixel); - if( bmp.GetMask() ) + if( bmp.Ok() && bmp.GetMask() ) { bmp = wxCreateMaskedBitmap(bmp, col); tool->SetNormalBitmap(bmp); } - if( insensBmp.GetMask() ) + if( insensBmp.Ok() && insensBmp.GetMask() ) { insensBmp = wxCreateMaskedBitmap(insensBmp, col); tool->SetDisabledBitmap(insensBmp); @@ -415,12 +414,12 @@ bool wxToolBar::Realize() wxColour col; col.SetPixel(backgroundPixel); - pixmap = (Pixmap) bmp.GetPixmap(); + pixmap = (Pixmap) bmp.GetDrawable(); { wxBitmap tmp = tool->GetDisabledBitmap(); insensPixmap = tmp.Ok() ? - (Pixmap)tmp.GetPixmap() : + (Pixmap)tmp.GetDrawable() : tool->GetInsensPixmap(); }