X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a47d3c193a8358f9be6a9249af28b6cb10eacff..062c4861718a681a27384d6a2313fc26cda3b3e4:/src/common/tbarsmpl.cpp diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp index 10d7117d60..c0d5dbded3 100644 --- a/src/common/tbarsmpl.cpp +++ b/src/common/tbarsmpl.cpp @@ -75,7 +75,7 @@ wxToolBarSimple::~wxToolBarSimple () { } -void wxToolBarSimple::OnPaint (wxPaintEvent& event) +void wxToolBarSimple::OnPaint (wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); PrepareDC(dc); @@ -103,7 +103,7 @@ void wxToolBarSimple::OnSize ( wxSizeEvent& event ) wxToolBarBase::OnSize(event); } -void wxToolBarSimple::OnKillFocus (wxFocusEvent& event) +void wxToolBarSimple::OnKillFocus (wxFocusEvent& WXUNUSED(event)) { OnMouseEnter(m_pressedTool = m_currentTool = -1); } @@ -212,8 +212,10 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) if (bitmap && bitmap->Ok()) { +#ifndef __WXGTK__ if (bitmap->GetPalette()) memDC.SetPalette(*bitmap->GetPalette()); +#endif int ax = (int)tool->m_x, ay = (int)tool->m_y, @@ -246,17 +248,19 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) &memDC, 0, 0); } memDC.SelectObject(wxNullBitmap); +#ifndef __WXGTK__ memDC.SetPalette(wxNullPalette); +#endif } // No second bitmap, so draw a thick line around bitmap, or invert if mono else if (tool->m_toggleState) { bool drawBorder = FALSE; - #ifdef __X__ // X doesn't invert properly on colour +#ifdef __X__ // X doesn't invert properly on colour drawBorder = wxColourDisplay(); - #else // Inversion works fine under Windows +#else // Inversion works fine under Windows drawBorder = FALSE; - #endif +#endif if (!drawBorder) { @@ -315,7 +319,8 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) void wxToolBarSimple::ToggleTool(int index, bool toggle) { - wxNode *node = m_tools.Find((long)index); + wxNode *node = (wxNode*) NULL; + node = m_tools.Find((long)index); if (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); @@ -340,7 +345,8 @@ void wxToolBarSimple::ToggleTool(int index, bool toggle) // void wxToolBarSimple::SpringUpButton(int index) { - wxNode *node=m_tools.Find((long)index); + wxNode *node = (wxNode*) NULL; + node=m_tools.Find((long)index); if (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); if (tool && !tool->m_isToggle && tool->m_toggleState){ @@ -358,7 +364,7 @@ void wxToolBarSimple::SpringUpButton(int index) } } -void wxToolBarSimple::Layout(void) +void wxToolBarSimple::LayoutTools(void) { m_currentRowsOrColumns = 0; m_lastX = m_xMargin;