]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toolbar.cpp
include "wx/toolbar.h" instead of tbar(base|smpl).h
[wxWidgets.git] / src / motif / toolbar.cpp
index a4279e48bf899d2d7355cf98b0bf384860b2e062..6bdc23d9cd9e37c9a4fccf7ccf0d0a9b6a8f4cb0 100644 (file)
@@ -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();
                 }